ItemRollOver for chart in AS3?

I need to have a custom function fire on rollOver  for the individual wedges of a pie chart.
I can accomplish this if I instantiate the chart in the main Flex application like this;
<mx:PieChart id="pieChart"
                 dataProvider="{dataProviderName}"
                itemRollOver="pieWedgeRoll(event);"
                 >
        <mx:series>
            <mx:PieSeries
                field="myField"
              >
            </mx:PieSeries>
        </mx:series>
</mx:PieChart>
However, when I instantiate a pie chart using ActionScript like this;
    <fx:Script>
        <![CDATA[
               var myPieSeries:PieSeries = new PieSeries();
                myPieSeries.field="myField"
                var myChart:PieChart = new PieChart();
               myChart.itemRollOver="pieWedgeRoll(event);"
                myChart.dataProvider = dataProviderName
                myChart.series = [myPieSeries];
                myGroup.addElement(myChart);
    ]]>
    </fx:Script>
Flex throws and undefined property error.
Can someone please help??
Thanks.

Figured it out. Am still thinking like an AS2 coder.
Hope this helps someone in the future. 
Cheers. 
<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
            xmlns:s="library://ns.adobe.com/flex/spark"
            xmlns:mx="library://ns.adobe.com/flex/mx"
            creationComplete="makePieChart();">
   <fx:Script>
      <![CDATA[
         //---imports---
         import mx.charts.PieChart;
         import mx.charts.events.ChartEvent;
         import mx.charts.events.ChartItemEvent;
         import mx.charts.series.PieSeries;
         import mx.charts.series.items.PieSeriesItem; 
         [Bindable]
         public var chartDP:Array = [
            {wedgeName:'Wedge 0', wedgeAmt:65},
            {wedgeName:'Wedge 1', wedgeAmt:70},
            {wedgeName:'Wedge 2', wedgeAmt:22},
            {wedgeName:'Wedge 3', wedgeAmt:8}
         //---build pie---
         private function makePieChart():void{
            var myPieSeries:PieSeries = new PieSeries();
            myPieSeries.field = "wedgeAmt";
            // Remove default dropshadow filter.
            myPieSeries.filters = [];
            // Define pie chart.
            var myChart:PieChart = new PieChart();
            myChart.height = 210;
            myChart.width = 210;
            myChart.name = "myPieName";
            myChart.addEventListener(ChartItemEvent.ITEM_ROLL_OVER, overFunction);
            myChart.addEventListener(ChartItemEvent.ITEM_CLICK, clickFunction);
            myChart.showDataTips = true;
            myChart.dataProvider = chartDP;
            myChart.series = [myPieSeries];
            //---custom functions---
            function overFunction(evt:ChartItemEvent):void {
               var psi:PieSeriesItem = evt.hitData.chartItem as PieSeriesItem;
               trace("An OVER event occurred: "+psi.item.wedgeName);
            function clickFunction(evt:ChartItemEvent):void {
               trace("A CLICK event occurred: "+evt.target.name);
            // Add myChart to the display list.
            myGroup.addElement(myChart);
      ]]>
   </fx:Script>
   <s:VGroup id="myGroup" />

Similar Messages

  • How do i set up the outgoing server for charter e-mail?

    I can receive but not send e-mail with my charter.com account.  What are the smtp settings?

    Googled for Charter SMTP settings, took me here-
    http://www.myaccount.charter.com/customers/support.aspx?supportarticleid=1417

  • Custom Color Palette for Charts

    Hi all,
    Can I define the colors of a chart by a custom color palette in Design Studio (as you can do it in Web Intelligence) or does SAP intend to implement such a function in a next release? With CSS this isn't fully possible, because it doesn't allow you to coloring the additional line like the corresponding main line.
    I've already seen and commented this post Re: Custom Color Palette for Charts / CSS, but it's still unanswered. Maybe I've with a new discussion more success.
    Thank you and kind regards
    Silvan

    Carola,
    Dirk Mayrock has a nice list here Design Studio 1.1 Full List of CSS classes (?)
    I think you have seen that already.
    Also see Styling a chart in Design Studio
    Especially see participated David Gyurasz as he has answered several CSS questions CSS-Customizing of Column-Combination chart as an example
    Tammy

  • Custom Color Palette for Charts / CSS

    Is there a way of creating a custom color palette for charts (as you can do it in WebIntelligence) and install it on the tomcat?
    Or will I have to set my custom colors in the css? And if so: where can I find a description of classes for Charts? Is there any description of css classes at all? All I could find was a list of classes for a crosstab (but no description).
    Thank you
    Carola

    Carola,
    Dirk Mayrock has a nice list here Design Studio 1.1 Full List of CSS classes (?)
    I think you have seen that already.
    Also see Styling a chart in Design Studio
    Especially see participated David Gyurasz as he has answered several CSS questions CSS-Customizing of Column-Combination chart as an example
    Tammy

  • GL A/c numbering logic for chart of accounts BAIN

    Hi,
    Will any expert pl let mek now What is the GL A/c numbering logic for chart of accounts BAIN (BAIN is standard ch of A/c for India apart from CAIN)?
    Regards
    Anand

    Your question is not clear about numbering logicu2026
    First of all the GL Account # are always externally assigned (it can be either numeric and alphanumeric)
    The length of GL account is 10 digits. But if you give it as 6 in TC OB13 then
    u2022     Numerical account numbers
    The system includes zeros to the left of the number
    0000001234
    u2022     Alpha-numeric account numbers
    The system includes zeros to the right of the number
    1131DB0000

  • Hierarchical Query for Chart of Account

    Hellow all
    I have one Table which is for chart of account
    The Column in this Table is
    Acc_id and Acc_name
    I Insert data in This chart of account
    Insert into COA
    values
    *(01,'ASSETS');*
    values
    *(01001,'Current Assets');*
    values
    *(01002,'Fixed Assets');*
    values
    *(010010001,'Banks');*
    values
    *(010010002,'Cash');*
    values
    *(01001000100001,'Metrol Politan Bank');*
    values
    *(01001000100002,'Royal Bank');*
    values
    *(01001000100003,'Stander Charted Bank');*
    values
    *(01001000200001,'Cash in Hand');*
    values
    *(01001000200002,'Patty Cash');*
    That's all my record now i need to create a Hierarchical tree
    Which look like this
    *01- Assets*
    ------010001 Current Assets+
    ----------010010001 Bank+
    --------------01001000100001 Metrol Politan Bank+
    --------------01001000100002 Royal Bank+
    --------------01001000100003 Stander Charted Bank+
    ----------010010002 Cash+
    --------------01001000200001 Cash in Hand+
    --------------01001000200002 Patty Cash+
    ------010002 Fixed Assets+
    ----------010020001 Machinery Assets+
    --------------01002000100001 Needle Machine+
    --------------01002000100002 GGT Machine+
    ----------010020002 Computer Assets+
    --------------01002000200001 Computer Server+
    --------------01002000200002 Computer other+
    Hope you guys understand i need the Hierarchical query for making this kind of Tree
    Regards
    Shahzaib

    In above posts you have solution to your problem but maybe you can think about changeing the design slightly.
    I would suggest using parent_id to find parent account, instead of operations on strings which can be slower in larger tables.
    SQL> create table t14(id int, account_code varchar2(16), account_name varchar2(32), parent_id int)
      2  /
    Table created.
    SQL> insert into t14 values(1,'01','Assets',null);
    1 row created.
    SQL> insert into t14 values(2,'01001','Current Assets',1);
    1 row created.
    SQL> insert into t14 values(3,'01002','Current Assets',1);
    1 row created.
    SQL> commit;
    Commit complete.
    SQL> select * from t14;
            ID ACCOUNT_CODE     ACCOUNT_NAME                      PARENT_ID
             1 01               Assets
             2 01001            Current Assets                            1
             3 01002            Current Assets                            1
    SQL> select lpad(' ',2*(level-1)) || account_code as account_code, account_name
      2  from t14
      3  start with parent_id is null connect by prior id = parent_id
      4  /
    ACCOUNT_CODE                   ACCOUNT_NAME
    01                             Assets
      01001                        Current Assets
      01002                        Current AssetsWith kind regards
    Krystian Zieja

  • Report for chart of accounts by transaction

    Hi All,
    I am looking for Report for chart of accounts by transaction. Could any one suggest me which report it is.
    Thanks,
    JP

    There are the answers.
    1. It is enough if you generate data model and activate it.
    2. With regard to Chart of Accounts, entity of COA, ACCOUNT, ACCCCDET should be mostly involved.
    3. You don't need to generate tables at all because after you activate the data model, all correlative tables will be generated automatically according to the definition of the data model.
    In transaction SE38, run program USMD_DATA_MODEL, you can see all generated table for your data model.
    If you have other questions, please feel free to let me know.
    Regards
    Edited by: Qi Liu on Feb 15, 2011 8:26 AM

  • Text ids for Chart of Accounts & Co Code Area

    Hi,
    Why do we need obt6 & obt7 i.e. Text ids for Chart of Accounts & Co Code Area.
    Regards,
    Vikas

    in case when u want to use some additional text for the creation of GL at a crertain level like COA then u create the standard text types and tick the relevant text... then whenever u create the GL then it will give u the option of putting text there..... it is more of information text....

  • How to pass apex item value into custom xml for chart or guage?

    Re-opening the old thread : Re: How to pass apex item value into custom xml for chart or guage?
    Which was not answered.
    Roel - Thanks. Its working - but in a semi quotes in the custom XML
    <pointers>
    <pointer value= '&P5_RUNNING_TOTAL.'
    <label enabled="true">
    <position placement_mode="ByPoint" x="50" y="15" />
    <format>{%Value}{numDecimals:1}</format>
    <background enabled="false" />
    </label>
    </pointer>
    </pointers>This question was helpful for us to resolving one recent thread : AnyChart - set Dial axis intervals dynamically?
    (Re: AnyChart - set Dial axis intervals dynamically?
    Edited by: P.Ranish on Dec 13, 2012 6:23 AM

    P.Ranish wrote:
    Is there any update for this question ???
    Edited by: P.Ranish on Dec 13, 2012 3:36 AMNo, And there won't be in the future.
    Please stop posting followup's to old threads, if you have a real problem please search the forum first and post a new question with all information
    Roel wrote:
    Try using &P5_RUNNING_TOTAL. or #P5_RUNNING_TOTAL#Just to make it clear - this will only work if page is reloaded after setting the item values dynamically via AJAX

  • Defning own color palette for Chart Items

    Hello,
    i have a requirement for several Cockpits, the values of all diagramms of actual year should have a special color, which is not defined in the color palettes Tradeshow, Streamline or Enjoy.
    I don't want to change the color for each chart, i'v already tried the Portal Theme Editor, but i was not able to change color settings for charts.
    Is it possible to create custom color palette which i can choose in the global settings in the chart item dialog?
    Best regards,
    Frank

    1. Go to the following directory on the server side Installation Directory \SAP BusinessObjects Enterprise XI 4.0\images
    2. Find the file there named as VisualizationConfig.template.xml
    3. Rename this file to VisualizationConfig.xml
    4. Then edit this file and add the color for the palette as you required (RGB colors are used)
    5. Check there are no errors in the config file, otherwise the standard palette is applied – you can define only one Corporate palette, and the palette ID must not be changed
    6. Finally, you need to reboot Tomcat after editing the config file.

  • Possible to use Ms Excel data as a dataprovider in Flashbuilder for charting

    My dept has an excel spreadsheet with sales data. I'd like to know if anyone has used Excel data for charting in Flashbuilder? Does anyone know of any resources or samples?
    Thanks in advance.

    Looks like I found my own answer. 
    Seems that all I need to do was convert my Header data into a 2D array. 
    Don't know why that one was so tricky to figure out.  But it's working now.   
    Patrick Allen

  • Define own colors for charts in BW 3.0b, is it possible???

    <u><i><b>Referes to BW 3.0b</b></i></u>
    I have another short question concerning graphs.
    Bex gives a fixed set of optional colors for charts, however I need some other colors in order to fit with the given style guide.
    I know that it is possible to use a picture, however I am looking for a way in order to define my own colors for charts.
    Anybody got an idea?
    Greetings,

    The problem is that I do not have a color column....
    I can choose a color in the chart designer and I also get to the same option when using the wizard. <i>I am not sure if it is the right wizard as I have never used the wizard for chart editing before. How do you open the wizard to edit an already existing chart?</i>.
    In all the menus I can't find any place where I could add RGB. I have my RGB code and everything, I just need to enter it somewhere, so no external tools needed.

  • Dynamic tooltips for charts (BusinessGraphics) with simple series

    Hello,
    I was wondering wheter the tooltip for charts with simple series can set dynamically. I cannot bind it to the context within the properties of the BusinessGraphics control but maybe it can be set in the code?
    This way I want to show the value of the column for instance as tooltip in a chart, or is there a better solution?
    thx,
    jeroen

    I got it!
    This thread helped me.
    [http://forums.sdn.sap.com/thread.jspa?threadID=1343796|http://forums.sdn.sap.com/thread.jspa?threadID=1343796]

  • DateChooser Component for Flash CS3, AS3.0

    Where and how do I get the datechooser for Flash CS3, AS3.0?

    which version of flash cs3 do you have?

  • MDGF for Chart of Accounts

    I am configuring MDGF for Chart of Accounts and I want to use standard data model 0F that comes out of the box with no customization that means no use of BADI's. I have few questions on this and I would appreciate if some one helps me on these:
    1. Is it enough if I generate data model 0F or do I have to generate the entity types of 0F  in this case Entity type COA alone?
    2. What other Entity types for data model 0F  to make MDG for Chart of Accounts work?
    3. If the answer is YES to question 1, after activation will I see generated Z tables as shown in
    http://help.sap.com/erp2005_ehp_04/helpdata/EN/d4/09348181894e46a2c6cdc8e65ab28e/frameset.htm.
    Cheers...

    There are the answers.
    1. It is enough if you generate data model and activate it.
    2. With regard to Chart of Accounts, entity of COA, ACCOUNT, ACCCCDET should be mostly involved.
    3. You don't need to generate tables at all because after you activate the data model, all correlative tables will be generated automatically according to the definition of the data model.
    In transaction SE38, run program USMD_DATA_MODEL, you can see all generated table for your data model.
    If you have other questions, please feel free to let me know.
    Regards
    Edited by: Qi Liu on Feb 15, 2011 8:26 AM

Maybe you are looking for

  • Photos that aren't mine are in my iPhoto app.

    Recently I went on a vacation with other iPhone users.  While uploading  my photos from the trip to my mac (via my digital camera) I noticed that I had someone else's albums in my events section of iPhoto.  This person was on the trip with me and sai

  • Received GPF error upon closing Adobe Acrobat 8

    Hello, does anyone know if there is a fix for this? (1) In windows XP, Install Adobe acrobat 8 professional. (2) Launch adobe, Click Help-->Check for Updates... to update to 8.1.2 or the latest. (3) Launch adobe, again, select Edit-->Preferences, sel

  • Thinkpad Yoga - touch screen on left half of the screen unresponsive

    Hi guys! On my new TPY the touch screen on the left hand side (the side where the charger is connected) is unresponsive. The pen however works perfectly fine. I have already run the lenovo software update tool and updated/installed all the drivers so

  • Prob in data loading in 0IC_C03

    Hi we are loading data in infocube 0IC_C03.. we are having a doubt like we are having different sites some of them are going to live this month so we are initialising 2LIS_03_BX through MCNB but after all the steps of initialisation when other sites

  • Production Variance Settlement.

    Hello friends, Hope you all are well! Is there anyway that I can settle the production variances into different GL accounts at the same time? For example I have $1000 as the variances on my order. It is further divided into $200 for material another