PieChart  Eventing

hi,
I am trying to create a piechart model using HTMLB.
Is there any eventhandlers for chartmodels?(like we have onCellClick,onHeaderClick etc. for TableViewModel)
I want to open a jsp page depending on the sector(in the pie chart)clicked by the user.
Awaiting Reply.
Regards
SwarnaDeepika
Message was edited by: SwarnaDeepika

Hi Detlev,
I am not able to view the pie-chart!!
its not throwing any exception but the chart is not getting displayed.i've attached the code below--
Beanclass----
public class PieChartModelBean implements Serializable {
private VectorChartModel model;
public PieChartModelBean() {
     model = new VectorChartModel();
     createNewChart();
public void createNewChart(){
          model.addItem("gr1","A", "7", "20", "Information to block A");
        model.addItem("gr1","B", "4", "20", "Information to block B");
public void setModel(VectorChartModel model){
     this.model=model;
     public VectorChartModel getModel() {
     return model;
JSPdynpage----
public static class PieChartModelDynPage extends JSPDynPage{
    private PieChartModelBean myChartBean;
    VectorChartModel model = null;
    public void doInitialization(){
       myChartBean = new PieChartModelBean();          
       myChartBean.setModel(model);
      IPortalComponentProfile profile = ((IPortalComponentRequest)getRequest()).getComponentContext().getProfile();
      Object o = profile.getValue("myChartBean");
      if(o==null || !(o instanceof PieChartModelBean)){
        myChartBean = new PieChartModelBean();
        profile.putValue("myChartBean",myChartBean);
      } else {
          myChartBean = (PieChartModelBean) o;
JSP page----
<%@taglib uri = "tagLib" prefix = "hbj" %>
<jsp:useBean id="myChartBean" scope="application" class="com.cts.CogNet.PieChartProject.Bean.PieChartModelBean" />
<hbj:content id="myContext" >
  <hbj:page title="PageTitle">
   <hbj:form id="myFormId" >
testing
<hbj:chart
           id="myChart"
           model="myChartBean.model"
           visible="true"
           displayObjectValues="true"
           title="Resource count in company"
           chartType="PIE"
           legendPosition="EAST"
           colorOrder="SNAKE"
    />
test2
   </hbj:form>
  </hbj:page>
</hbj:content>
Where have i gone wrong?(i'm not sure about the dynpage only)Please help.
awaiting reply
SwarnaDeepika
Message was edited by: SwarnaDeepika
Message was edited by: SwarnaDeepika

Similar Messages

  • Dispatching an ItemClick event from a chart

    I am trying to provide a simple drill down by getting a name
    from a pie slice and then putting the slices contents in a datagrid
    based on that name as a filter.
    I am trying to use an event dispatcher and an event listener,
    but im not exactly sure im doing it right.
    The dispatcher would dispatch when something is clicked, and
    the string item of what is clicked would be passed into the
    remote object. (Not sure how the ItemClick string is passed
    by an event)
    I know i'm a newb with events.... thanks for any input.
    here is the chart component
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Panel xmlns:mx="
    http://www.adobe.com/2006/mxml"
    title="Defect Chart (Status not Closed)" layout="absolute"
    width="100%" height="100%">
    <mx:Script>
    <![CDATA[
    import mx.charts.ChartItem;
    import mx.collections.ArrayCollection;
    //Label function for the Defect Pie Chart
    private function labels(dataItem:Object, field:String
    ,Index:int, dataPercent:Number ):String
    return dataItem.BG_SEVERITY + " " + dataItem.CNT;
    private function ItemClick(name:String):void
    dispatchEvent(new ChartItemEvent.);
    trace("event is dispatched");
    ]]>
    </mx:Script>
    <mx:PieChart id="DefectPie"
    width="100%"
    height="100%"
    showDataTips="true"
    y="40"
    itemClick="{ItemClick(event.hitData.chartItem.item.toString())}"
    >
    <mx:series>
    <mx:PieSeries id="series"
    field="CNT"
    nameField="BG_SEVERITY"
    labelPosition="callout"
    labelFunction="labels"
    >
    This is called in main's init()
    this.addEventListener("name" , ItemClickHandler);
    And this is the handler function:
    private function ItemClickHandler(event:Event):void
    trace(event);
    dataManager.soe_bug_list_detail(event['BG_SEVERITY']);
    }

    JoeADSK,
    This might sound like a bit over-kill but you might go ahead
    and use a seperate EventHandler class and a DTO(Data Transfer
    Object) class to accomplish the event even though you are simply
    sending 1 piece of data.
    Here is an example if you need one:
    ==Event Handler Class==
    package event
    import flash.events.Event;
    import myApp.dto.ChartItemDTO;
    public class ChartClickEvent extends Event
    public var chartName:ChartItemDTO;
    public function ChartClickEvent(chartName:ChartItemDTO,
    type:String)
    super(type);
    this.chartName = chartName;
    override public function clone():Event
    return new ChartClickEvent(chartName, type);
    DTO Class:
    package myApp.dto
    public class ChartItemDTO
    public var name:String;
    public function ChartItemDTO(name:String)
    this.name = name;
    Here is how you use it in your mxml for or whatever:
    import event.ChartClickEvent;
    import myApp.dto.ChartItemDTO;
    DONT FORGET TO ADD THIS EVENT BLOCK:
    <mx:Metadata>
    [Event(name="chartName", type="event.ChartClickEvent")]
    </mx:Metadata>
    HERE IS AN EXAMPLE FUNCTION NON-WORKING===
    private function setChartName(name:String):void
    var chrtName:ChartItemDTO = new ChartItemDTO(name);
    var chrtClickEvent:ChartClickEvent = new
    ChartClickEvent(chrtName, "chartName");
    dispatchEvent(chrtClickEvent);
    Now this is just hacked together quickly not a working model
    but you will get the idea.
    Basically the event must be passed a Data Transfer Object to
    hand off from the Click event.
    Like I said this is over-kill but a good place to start as
    you venture forth in the the Event Handling world in Flex.
    Good luck, hope this helps,
    Kenny

  • How to show PieChart Vertically instead of Horizontally?

    Hi,
    Like the title indicates, I hope that is there property or
    method or event allowing to show a PieChart Vertically instead of
    horizontally.
    Cheers,

    for example :
    my pie chart represents two values : 50% and 50%. How this
    values will be shown in PieChart? the answer is vertically the
    first 50% in the top and the second one in the bottom.
    What I want is to show the values horizontally that's mean in
    this example the first 50% in the right and the other one in the
    left.
    Thank you in advance :)

  • Why the registered event cannot be heard (files content included)

    Hi,
    I posted a question earlier today about a problem using external customer event along with a chart created with actionscript. I think the files are better than words. If an expert can take a look at this and let me know how the event cannot be heard and how it can be heard, I will really appreciate it.
    3 files:
    ===============================================================
    1. ChartIt.mxml
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical" creationComplete="init()" xmlns:local="*">
        <mx:Script>
            <![CDATA[
                import mx.charts.PieChart;
                import org.allus.examples.UpdateChartEvent;
                import org.allus.examples.GenCharts;
                import mx.collections.ArrayCollection;
                private var pieChart:PieChart = new PieChart();
                private var genCharts:GenCharts = new GenCharts();
                [Bindable]
                private var chartData:ArrayCollection = new ArrayCollection( [
                { Country: "USA", Gold: 35, Silver:39, Bronze: 29 },
                { Country: "China", Gold: 32, Silver:17, Bronze: 14 },
                { Country: "Russia", Gold: 27, Silver:27, Bronze: 38 } ]);
                private function init():void {
                    pieChart = genCharts.createPieChart(chartData, "Gold");
                    box.addChild(pieChart);
                    pieChart.addEventListener(UpdateChartEvent.UpdateChart, pieDoubleClicked);
                private function pieDoubleClicked(e:UpdateChartEvent):void {
                    trace("the pie chart was double clicked");
            ]]>
        </mx:Script>
        <mx:VBox width="50%" height="50%" id="box" borderStyle="solid"/>
    </mx:Application>
    ===============================================================
    2. GenChart.as:
    package org.allus.examples
        import mx.charts.PieChart;
        import mx.charts.series.PieSeries;
        import mx.charts.events.ChartItemEvent;
        import mx.collections.ArrayCollection;
        import flash.events.EventDispatcher;
        import flash.events.Event;
        import org.allus.examples.UpdateChartEvent;
        public class GenCharts extends EventDispatcher
            private var apieChart:PieChart;
            private var pieSeries:PieSeries;
            public function GenCharts() {
                super();
            public function createPieChart(chartData:ArrayCollection, by:String):PieChart {
                apieChart = new PieChart();
                apieChart.percentWidth = 100;
                apieChart.percentHeight = 100;
                apieChart.showDataTips = true;
                apieChart.dataProvider = chartData;
                apieChart.addEventListener(ChartItemEvent.ITEM_DOUBLE_CLICK, pieChartItemDoubleClickedHandler);
                apieChart.doubleClickEnabled = true;
                var mySeries:Array = new Array();
                pieSeries = new PieSeries();                   
                pieSeries.field = by;               
                mySeries.push(pieSeries);
                apieChart.series = mySeries;
                return apieChart;
            private function pieChartItemDoubleClickedHandler(evt:ChartItemEvent):void {
                dispatchEvent(new UpdateChartEvent(UpdateChartEvent.UpdateChart));
    ==============================================
    3. UpdateChartEvent.as
    package org.allus.examples
        import flash.events.Event;
        public class UpdateChartEvent extends Event
            public static const UpdateChart:String = "updateChart";
            public function UpdateChartEvent(eventName:String) {
                trace("the event was triggered.");
                super(eventName);

    Have your apieChart dispatch the event
    private function pieChartItemDoubleClickedHandler(evt:ChartItemEvent):void {     apieChart.dispatchEvent(new UpdateChartEvent(UpdateChartEvent.UpdateChart));

  • Charts event masking problem

    We have an application (Flex 1.5) in which we create multiple
    pods within a
    VDividedBox container. Each pod is essentially a HBox with
    two
    charts (mx:BarChart and mx:PieChart) for arguments sake.
    When a pod is deleted from the container the vertical area of
    charts
    in the remaining child pods that responds to mouse over and
    clicks
    is diminished by around the height that the child gained.
    For example, if there were three pods and one was removed
    then each
    child gains roughly 1/2 of the height of the removed pod and
    it is
    roughly this area from the bottom of the chart (above the
    axis) that
    no longer responds to mouse over and mouse click events.
    The problem goes away when adding a new pod.
    Using a VBox instead of VDividedBox makes no difference.
    Decreasing
    the size of the last pod very small using the grips of the
    VDividedBox causes the same symptoms.
    Calling invalidateLayout, invalidateSize, layoutChildren,
    measure on
    the container and all of the pods has no effect, resetting
    their
    height to "100%" has no affect. All of the same on the two
    charts
    within the pod has no effect.
    It appears to be a problem in the way the chart components
    are
    calculating the area of the chart that should respond to
    mouseOver
    and click events.
    Any ideas, suggestions on possible workarounds, etc. very
    much
    appreciated.

    sorry Durai..
    i'm new in flex..
    dont worry..
    others experts guys will help u..
    sure!
    good luck!

  • How to Fill PieChart Explode Wedge Potion

    All,
    I need to create a Pie Chart with two Wedges using perWedgeExplodeRadius = [0,0.2]. It works fine. But my requirments is i need to fill the explode wedge potion with someother color.
    I have attached the expected PieChart, i need help for how to achive the gray potion. It's possible to draw a circle around the chart or there is any way to fill that explode potion. Please help me.
    Thanks in advance.
    By,
    Dhanasekaran

    Figured it out.
    Here is a simple example;
    <?xml version="1.0" encoding="utf-8"?>
    <!-- http://blog.flexexamples.com/2007/11/15/displaying-a-pieseries-items-data-when-a-user-clic ks-an-item-in-a-flex-piechart-control/ -->
    <s:Application
        xmlns:fx="http://ns.adobe.com/mxml/2009"
        xmlns:mx="library://ns.adobe.com/flex/mx"
        xmlns:s="library://ns.adobe.com/flex/spark"
        >
        <fx:Declarations>
        </fx:Declarations>
        <fx:Script>
            <![CDATA[
                import mx.charts.series.items.PieSeriesItem;
                import mx.charts.events.ChartItemEvent;
                [Bindable]
                public var chartDP:Array = [
                    {wedgeName:'Pie wedge 1', percent:45 },
                    {wedgeName:'Pie wedge 2', percent:25},
                    {wedgeName:'Pie wedge 5', percent:22},
                    {wedgeName:'Pie wedge 4', percent:8}
                private function pieChart_itemClick(evt:ChartItemEvent):void {
                    var psi:PieSeriesItem = evt.hitData.chartItem as PieSeriesItem;
                    myTextArea.text += "\rwedgeName: "+psi.item.wedgeName+" percent: "+ psi.item.percent;
            ]]>
        </fx:Script>
    <s:VGroup>
        <mx:PieChart id="pieChart"
                     dataProvider="{chartDP}"
                     itemClick="pieChart_itemClick(event);"
                     showDataTips="false"
                     height="300"
                     width="300">
            <mx:series>
                <mx:PieSeries id="pieSeries"
                              field="percent">
                </mx:PieSeries>
            </mx:series>
        </mx:PieChart>
        <s:TextArea id="myTextArea"  y="82" width="350" height="250" />
    </s:VGroup>
    </s:Application>

  • Training and Event Management - report on list of cancelled courses

    Hi All,
    Is there any standard report available to get the list of cancelled courses (be it business event grp , type or business event) Would appreciate your inputs on this.
    Kind regards
    Sathya

    S_AHR_61016216 - Cancellations per Attendee , i think there is no standard report for cencelation of business events, type and group.
    for cancellations per attendee reports is available in the system.
    good luck
    Devi

  • How can I see Calendar event END times at a glance?

    How can I display my Calendar event titles exactly as I type them? I do not want Calendar to remove duration from the titles of my events. Otherwise I can't see event END times at a glance in month view; only start times. How can I "trick" Calendar to just show my titles as I type them - as I always could before I upgraded. I used to be able to enter "Seminar 9am-5:45" and it would appear that way regardless of how or what I chose to enter (or not enter) for duration.
    I am running OSX 10.9.3.

    It's a bit weird, but if you type in the time info TWICE into the event title then Calendar uses/deletes one of them to populate the event details and leaves the other.
    Apple - Mac OS X - Feedback

  • Event List view in iCal?

    I would love to have an Event List view in iCal like I do on the calendar on my iPhone. Is there such a thing? The particular reason for wanting it (this time) is that one of the calendars in the ON MY MAC list has a number in a oval to the right.
    I believe this is trying to tell me that there is a new event that I need to do something about. Problem is, I don't know where to find it.

    ecernek,
    There is no event list option on iCal like the one on the iPhone.
    That number means that you have an event invitation. Use iCal>View>Show Notifications to choose what to do with the notification.

  • Can I show a color bar instead of a color bullet in iCal Monthly view for all my events in all calendars?

    In the Monthly view of iCal the only events that show a color bar in the event is the Birthday Calendar. All other events in all my other calendars only show a color bullet next to the event (unless I click on that event which then shows as a color bar). I would like to know if it is possible for all the calendar events to have a color bar in the monthly view instead of just that tiny color bullet.

    Greetings Judith,
    Before making any attempts at deleting calendar data, backup what you have just in case:
    Click on each calendar on the left hand side of iCal one at a time highlighting it's name and then going to File Export > Export and saving the resulting calendar file to a logical location for safekeeping.
    iCal has an automated function located in iCal > Preferences > Advanced > Delete events "X" days after they have passed.  By typing in a value for days you can tell iCal to delete all events before that time frame.
    Example:
    Today is 4-16-2012.
    If I wanted to delete all events prior to 1 year ago (4-16-2011) I would type in "365" for the number of days.
    Once you type in the number of days you want kept in iCal, close the preferences and then quit iCal.
    Re-open iCal and check to see if the events are gone.  If not you may want to leave it open for several minutes and then quit again.
    Once the events are removed go back to  iCal > Preferences > Advanced > Delete events "X" days after they have passed and make sure the check mark is removed to prevent future deletion.
    Hope that helps.

  • Can you show at a glance which event images are in albums?

    Say I had an event containing multiple similar but different images, is there a way to show in the grid view for example which images have already been used in one or more albums?
    Would be handy to be able to select a 'show list of albums containing this image'dialogue box. I guess you could hide images you've used but that wouldn't work automatically, nor would any other tagging/rating.
    Another approach would be to make albums containing everything in a given event, then move the images out of that album once used, just seems fiddly to me.
    AC

    AC
    Would be handy to be able to select a 'show list of albums containing this image'dialogue box.
    Yes it would and many people have suggested tit. Add your voice to the chorus at iPhoto Menu -> Provide Apple Feedback.
    A workaround - and it's no better - is to go to an album and select al, then give all those pics a keyword. Then in grid view you can see which pics have the keyword. (View -> Keywords)
    Regards
    TD

  • Unable to capture startup and shutdown event of Photoshop in automation Plugin.

    Hi,
    I am creating an automation plugin and I want to register some events. I have seen listener plugin sample to register event in startup and unregister event in shutdown. I have used same code in my plugin but I am unable to capture the startup nad shutdown event of Photoshop. On clicking the menu item of my plugin the calls come inside the AutoPluginMain but during the startup or shutdown of plugin, the calls does not come inside the AutoPluginMain.
    I am unable to detect the cause of the problem. Can someone please giude me??
    Thanks in advance.

    Hi Tom,
    Thanks for the suggestion.
    Yes, I am working on Windows. As you suggested, I compiled .rc file but the compile option for .r file was disabled. After compiling the .rc file, I again rebuild the complete project and tested my build. But still I was not able to achive the desired result.
    Any other thing that I need to do to make it work?
    Thanks

  • Unable to capture button event in pageLayout Controller

    Hi Guys,
    I have the following layout
    pageLayout
    pageLayoutCO (controller)
    ----header (Region)
    ----------messageComponentLayout (Region)
    -----------------MessageLovInpurt
    -----------------MessageChoice(Item)
    -----------------MessageTextInput
    -----------------MessageLayout
    ----------HideShow (Region)
    -----------------MessageLovInpurt(Item)
    -----------------MessageChoice(Item)
    -----------------MessageTextInput(Item)
    -----------MessageComponentLayout (Region)
    -----------------MessageLayout
    ------------------------SubmitButton(ID:SearchBtn)
    ------------------------SubmitButton(ID:ClearBtn, fires partial action named clear)
    -----------header(Region)
    I am not able to capture the event fired by the button ClearBtn in the controller of the pagelayout.....
    The two methods I used as follows aren't worked:
    if ("clear".equals(pageContext.getParameter(OAWebBeanConstants.EVENT_PARAM)))
    if (pageContext.getParameter("ClearBtn") != null) {
    what should i do in order to capture the button event in the pageLayout Controller
    Thanks in advance
    Mandy
    Edited by: user8898100 on 2011-8-2 上午7:49

    Mandy,
    Its really strange that its not able to caputure the event in CO.
    Below is the way in which we handle to Submit action at CO level.
    /Check whether ClearBtn is same in case too.
    if(pageContext.getParameter("ClearBtn")!=null){
    System.out.println("Inside the Clear Btn Action");
    Regards,
    Gyan

  • SAP event not triggering in B1if

    Hi,
    Facing an issue when creating JE in one company on trigger of this b1if scenario gets activated and create JE in another company,earlier it was working fine, after upgrading Integration Component from SAP 9.0 PL12 to SAP 9.0 PL15  issue occurred.
    In message log in b1if can't see any log(Success,Failure,Processing,Filtered).
    Any help would be appreciated.
    Thanks

    Hi,
    Please check on event sender setup.
    Have you click on "Create Complete Journal Entry Events" on 4th step of Event sender in Event Filter option ?
    Thanks,
    Tushar

  • When I sync my iPod to my MacBook through iTunes new events do not show up and old events are not deleted. I am using Snow Leopard  and not iSync.

    I am using Snow Leopard on a MacBook. I have an iPod touch 3G. I do not use iSync it Mobile Me. When I sync my iPod through iTunes new events on my iPod do not show up on my Mac and old events do not delete. I have read help instructions that include deleting the data on the iPod. The iPod has the correct data and the Mac does not so I have not followed those instructions. I need help as the only reason I bought the Mac was to be able to sync, back up, view and print my calendar. Currently it is useless. If only Apple could have learned from the elegance of the Palm software.

    Start here:
    iPhone, iPad, or iPod touch: Device not recognized in iTunes for Windows

Maybe you are looking for

  • Music load as ACC to 6233

    I've load Music as ACC's with PC-Suite (6.81) and Nokia Music Manager (V1.0) to my Handy. They are organized as an Musiclist in the Nokia Music Manager. After all clips are loaded to the Handy the Names of the clips appear in the Musicplayer of the h

  • FI Reports using ABAP and their Related Tables

    Hi can anyone tell me some of the commonly developed reports from FI using ABAP and their related Tables. Thank You

  • Preloader at 80%

    Hi I have my preloader which seems to be working correctly, however it only becomes visible as around 80%. So the page is blank up until then, then after that the loading bar is finishing and then goes to the rest of the site Any ideas on this pls. A

  • Service for Object attacchements database

    Hy guys, does anybody know where SAP stores(i mean dictionary.....) attacchements by "Service for Object functionality" ? i need to develop a custom program.............. thanks a lot. Cheers.

  • Qu. about Deploying MPLS on Sup-2T VSS

    Hi, We are planning to deploy a new campus network comprising of a Core (Nexus 7K), 2 client aggregation modules (Catalyst 6500 /w Sup-2T VSS) and a single Data Centre module (Nexus 7k). MPLS is being deployed to provide segregation of services. Now