Pie chart wedge function call

Hi,
I am trying to build a pie chart that will fire a custom function on rollover of the individual pie wedges.
I need to be able to pass information about the wedge that is rolled over (i.e. a name or id) to this function.
Thanks.

I am close. I just need to find the right path to the wedge id.
This is what I have so far.
<fx:Script><![CDATA[
        import mx.charts.events.ChartItemEvent;
        private function itemClickHandler(e:ChartItemEvent):void {
            var selectedIndx:String= e.currentTarget.series.index; //<--returns null
    ]]></fx:Script>
<s:VGroup>
        <mx:PieChart width="220" height="220" id="piechart1"
                     dataProvider="{srv.lastResult.AAFunds.fundName}"
                     itemClick="itemClickHandler(event)"
                     >
            <mx:series>
                <mx:PieSeries  displayName="pie series 1" />
            </mx:series>
        </mx:PieChart>
    </s:VGroup>

Similar Messages

  • Animate Pie Chart Wedge SEPARATION

    Is it possible to start with the entire pie chart, and then animate a wedge separating from the chart?
    PS - I know how to animate each individual pie chart wedges from appearing on a slide, that is not what I am trying to do.

    OK, now I get it. So you would need to place your two PieCharts in a s:Group or mx:Canvas. On top of the pie charts, lay another s:Group on which you will do some drawing on its graphics:Graphics object.
    In your case, you need to use dataToLocal() (will give you pixel coordinates in your chart) then localToGlobal()  (convert to Application coordinates) then globalToLocal() (convert to the Top Group or Canvas coordinates you want to draw in) :
    Using the dataToLocal() method
    The dataToLocal() method converts a set of values to x  and y coordinates on the screen. The values you give the method are in  the "data space" of the chart; this method converts these values to  coordinates. The data space is the collection of all possible combinations of data values that a chart can represent.
    The number and meaning of arguments passed to the dataToLocal() method depend on the chart type. For CartesianChart controls, such as the BarChart and ColumnChart controls, the first value is used to map along the x axis, and the second value is used to map along the y axis.
    For PolarChart controls, such as the PieChart control, the first value maps to the angle around the center of the  chart, and the second value maps to the distance from the center of the  chart along the radius.
    The coordinates returned are based on 0,0  being the upper-left corner of the chart. For a ColumnChart control, for  example, the height of the column is inversely related to the x  coordinate that is returned.
    http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/display/DisplayOb ject.html#localToGlobal%28%29
    http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/display/DisplayOb ject.html#globalToLocal%28%29

  • Pie chart wedge itemRollOver

    I need help with creating a custom pie chart class that will allow a function call on pie wedge rollOver.
    Right now I can get a function call on rollover using itemRollOver using;
    import mx.charts.events.ChartItemEvent;
    -in the <mx:PieChart>;
    itemRollOver="pieChart_itemRoll(event);"
    -which calls this function
    private function pieChart_itemRoll(evt:ChartItemEvent):void {
                    var psi:PieSeriesItem = evt.hitData.chartItem as PieSeriesItem;
                    trace(psi.item.target);
    Please advise on how can I put this into a custom PieChart .as that extends PieChart?
    Currently itemRollOver in my custom class throws an undefined property error.
    Thanks.

    OK, now I get it. So you would need to place your two PieCharts in a s:Group or mx:Canvas. On top of the pie charts, lay another s:Group on which you will do some drawing on its graphics:Graphics object.
    In your case, you need to use dataToLocal() (will give you pixel coordinates in your chart) then localToGlobal()  (convert to Application coordinates) then globalToLocal() (convert to the Top Group or Canvas coordinates you want to draw in) :
    Using the dataToLocal() method
    The dataToLocal() method converts a set of values to x  and y coordinates on the screen. The values you give the method are in  the "data space" of the chart; this method converts these values to  coordinates. The data space is the collection of all possible combinations of data values that a chart can represent.
    The number and meaning of arguments passed to the dataToLocal() method depend on the chart type. For CartesianChart controls, such as the BarChart and ColumnChart controls, the first value is used to map along the x axis, and the second value is used to map along the y axis.
    For PolarChart controls, such as the PieChart control, the first value maps to the angle around the center of the  chart, and the second value maps to the distance from the center of the  chart along the radius.
    The coordinates returned are based on 0,0  being the upper-left corner of the chart. For a ColumnChart control, for  example, the height of the column is inversely related to the x  coordinate that is returned.
    http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/display/DisplayOb ject.html#localToGlobal%28%29
    http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/display/DisplayOb ject.html#globalToLocal%28%29

  • How to retrieve pie chart wedge id

    Hi.
    I'm trying to figure out how to get an id or index of a specific wedge from a pie chart
    I think I'm close. I just need to find the right path to the wedge id.
    This is what I have so far.
    <fx:Script><![CDATA[
            import mx.charts.events.ChartItemEvent;
            private function itemClickHandler(e:ChartItemEvent):void {
                var selectedIndx:String= e.currentTarget.series.index; //<--returns null
        ]]></fx:Script>
    <s:VGroup>
            <mx:PieChart width="220" height="220" id="piechart1"
                         dataProvider="{srv.lastResult.AAFunds.fundName}"
                         itemClick="itemClickHandler(event)"
                         >
                <mx:series>
                    <mx:PieSeries  displayName="pie series 1" />
                </mx:series>
            </mx:PieChart>
        </s:VGroup>

    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>

  • Pie chart wedge end position.

    Hi,
         I need one urgent help. I need to get start and end position of the wedge corner's in pie-chart. I need to draw some thing using those points. So i need thier global positions.
    Thanks,
    Sathyamoorthi.

    OK, now I get it. So you would need to place your two PieCharts in a s:Group or mx:Canvas. On top of the pie charts, lay another s:Group on which you will do some drawing on its graphics:Graphics object.
    In your case, you need to use dataToLocal() (will give you pixel coordinates in your chart) then localToGlobal()  (convert to Application coordinates) then globalToLocal() (convert to the Top Group or Canvas coordinates you want to draw in) :
    Using the dataToLocal() method
    The dataToLocal() method converts a set of values to x  and y coordinates on the screen. The values you give the method are in  the "data space" of the chart; this method converts these values to  coordinates. The data space is the collection of all possible combinations of data values that a chart can represent.
    The number and meaning of arguments passed to the dataToLocal() method depend on the chart type. For CartesianChart controls, such as the BarChart and ColumnChart controls, the first value is used to map along the x axis, and the second value is used to map along the y axis.
    For PolarChart controls, such as the PieChart control, the first value maps to the angle around the center of the  chart, and the second value maps to the distance from the center of the  chart along the radius.
    The coordinates returned are based on 0,0  being the upper-left corner of the chart. For a ColumnChart control, for  example, the height of the column is inversely related to the x  coordinate that is returned.
    http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/display/DisplayOb ject.html#localToGlobal%28%29
    http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/display/DisplayOb ject.html#globalToLocal%28%29

  • How to show top 20 values in a Pie Chart

    Hi
    We have a requirement to develop a Pie chart for top 20 Order value locations.but i am not able to plug in top 20 logic in a pie chart.This functionality (TOP N) is avilable in bar chart , but it is not avilable in Pie chart. Could some help me to implement this logic in a Pie chart.
    Your help in this regard is highly appreciated.
    Thanks
    Laj

    Not sure what you are saying here.  Obviously you have to have a place to place the distinct values, whether in another column or in the same column. That's not really a drawback, just a fact of life.
    I'm curious about what you mean by "multiple columns to dynamically select some records with specific criteria from different columns."  If you can give a specific example of what you are trying to do, I there may be a solution.  Are you trying to do something like Excel's filtering on multiple columns?
    If you are you can click the disclosure triangle by the column letter to get a dropdown like this:
    Similar to Excel.
    SG

  • Pie chart multiple levels

    Hello,
    I'm looking for software to create pie charts with multiple levels. I tried Numbers but it didn't work out. Does anyone has tips for Numbers or other software that I can use? Thanks in advance.
    Greetings,

    I also don't have many experiences in this kind of thing. However, I recently happened to read something about WinForms chart UI control which include the pie chart creating function. Not sure that kind of thing would be helpful or not.

  • Problem with wedge in Pie chart

    Hi all,
    i'm having a Pie chart which has some four or five sections. By using wedge option i'm able to cut out a single piece from the whole chart. But my requirement is i need to show all pieces individually. Is it possible? Please help me in this.
    Kind regards,
    karthick

    Hi Karthick,
    it is not impossible, but it is not very easy to accomplish this. First of all, the chart engine (Corda PopChart) is bounded by OBIEE. What I mean is that OBIEE doesn't use the full functionality of the chart engine, so when you want to customize the chart, beyond the functionality OBIEE uses, then there is no other option then to edit the PopChart XML files (.pcxml). In ..\OracleBI\web\app\res\s_oracle10\popbin\ and ..\OracleBI\oc4j_bi\j2ee\home\applications\analytics\analytics\res\s_oracle10\popbin you can find pie.pcxml which defines the pie chart.
    About your problem: you want to explode all wedges in your pie chart. According to the Corda documentation you can only explode one wedge, but it is possible to create a pie chart with gaps between all wedges and you can also set the size of the gap. So by setting these parameters I guess you can get what you want.
    Example: You need to add ShowPieGap='True' to this line in the .pcxml.
    <Properties Effect='2D' EffectPercentX='10' EffectPercentY='60' OutlineType='Darker' ShowPieGap='True'/>I also recommend you to read John's experiences with editing PCXML of Corda:
    http://obiee101.blogspot.com/search/label/CORDA
    http://obiee101.blogspot.com/search/label/PCXML
    Regards,
    Stijn

  • How can I evenly space wedges from an exploded pie chart?

    I'm creating a pie chart widge exploded wedges in Illustrator CS3 but I'm having trouble keeping all the wedges aligned evenly. Does anyone have any tips on doing this? My eyeing attempt is terrible.

    I think the best way is by eye and if you are trying to make one seem as if it is especially called out then you want that one not to be evenly spaced like the others.
    Like such
    If you want them all to be equally emphasized then you will do better by eye like such
    And if you want more space then it will look a bit less consistent but no more so than any other approach and making the colors lighter is not going to resolve any geometric issues.

  • Pie chart highlight selected wedge.

    I am trying to highlight the current clicked wedge in a pie
    chart by changing the property "outerRadius" of the item
    (PieSeriesItem). But it has no effect... My idea is to expand the
    wedge a bit above the others. Is there any other method? Where
    should I go in the doc to find this?

    OK, now I get it. So you would need to place your two PieCharts in a s:Group or mx:Canvas. On top of the pie charts, lay another s:Group on which you will do some drawing on its graphics:Graphics object.
    In your case, you need to use dataToLocal() (will give you pixel coordinates in your chart) then localToGlobal()  (convert to Application coordinates) then globalToLocal() (convert to the Top Group or Canvas coordinates you want to draw in) :
    Using the dataToLocal() method
    The dataToLocal() method converts a set of values to x  and y coordinates on the screen. The values you give the method are in  the "data space" of the chart; this method converts these values to  coordinates. The data space is the collection of all possible combinations of data values that a chart can represent.
    The number and meaning of arguments passed to the dataToLocal() method depend on the chart type. For CartesianChart controls, such as the BarChart and ColumnChart controls, the first value is used to map along the x axis, and the second value is used to map along the y axis.
    For PolarChart controls, such as the PieChart control, the first value maps to the angle around the center of the  chart, and the second value maps to the distance from the center of the  chart along the radius.
    The coordinates returned are based on 0,0  being the upper-left corner of the chart. For a ColumnChart control, for  example, the height of the column is inversely related to the x  coordinate that is returned.
    http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/display/DisplayOb ject.html#localToGlobal%28%29
    http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/display/DisplayOb ject.html#globalToLocal%28%29

  • How did Steve group exploded wedges in pie chart

    In his MacWorld keynote today, Steve showed a pie chart with 3 wedges exploded together (9:36 in, the US SmartPhone Marketshare slide). The Apple wedge is exploded, but so are the Palm, Motorola and Nokia wedges, yet they are exploded together, with no space between them. Is this possible in Keynote '08 or is Steve using unreleased features? I've tried selected all three and changing the explode value, but they separate.

    I'll post the .key file used to create that image.
    http://idisk.mac.com/makentosh-Public/multixplode.zip
    The main things to consider is:
    a) Don't move the wedges you want "connected"
    b) You'll need one "Preview Passthru" for each separately exploded bit
    So, you begin by setting up your chart with all the appropriate elements. Then, pull away the ones you DON'T want stuck together. Preview Passthru them (Copy, Open Preview, Command-N, Copy, Paste back into Keynote OR Preview Passthru for short), then use the "Draw a Shape" to click out a shape that surrounds the ones that are stuck together. Select the shape and the image and "Mask with Selected Shape". If you've only got two separated groups, move all the others back to the center, move the "attached" ones away and Preview Passthru that group, then mask it.
    You'll see how I masked all three parts in the linked Keynote file.

  • How to convert Abap output/excel output into pie charts

    Hi.......
    I've managed to output my Hierarchial sequential report output into a excel file....converting the abap output to xml and then mailing it.....now how can i convert this to pie chart......and mail it.....is it possible to have a pie chart in sheet1 and excel output in other sheet2 in the same excel sheet.......i've looked on the demo programs....in the package SOFFICEINTEGRATION and programs like SAPRDEMOEXCELINTEGRATION2.This are in object oriented language..............can any one come with coding in abap languge with step by step procedure to write the logic....i even got to look into FM called XXL_FULL_API.......
    Points wud be surely rewarded.............Thank in Advance

    Hi Younus Khan,
    sample code to load output to excel sheet.
    Use function module GUI_UPLOAD
    The FILETYPE refer to the type of file format you need: For e.g 'WK1' - Excel format , 'ASC' - Text Format etc.
    CALL FUNCTION 'GUI_UPLOAD'
    EXPORTING
    FILENAME = 'C:\test.csv'
    FILETYPE = 'ASC'
    TABLES
    DATA_TAB = itab
    EXCEPTIONS
    FILE_OPEN_ERROR = 1
    FILE_READ_ERROR = 2
    NO_BATCH = 3
    GUI_REFUSE_FILETRANSFER = 4
    INVALID_TYPE = 5
    NO_AUTHORITY = 6
    UNKNOWN_ERROR = 7
    BAD_DATA_FORMAT = 8
    HEADER_NOT_ALLOWED = 9
    SEPARATOR_NOT_ALLOWED = 10
    HEADER_TOO_LONG = 11
    UNKNOWN_DP_ERROR = 12
    ACCESS_DENIED = 13
    DP_OUT_OF_MEMORY = 14
    DISK_FULL = 15
    DP_TIMEOUT = 16
    OTHERS = 17.
    or,
    U can use the FM
    SAP_CONVERT_TO_XLS_FORMAT
    to convert itab data to excel
    check this FM also
    GUI_DOWNLOAD
    And, for converting into xml format. I did it in ecc6.0
    *& Report ZTESTSDN
    REPORT ztestsdn.
    TABLES: vekp,
    likp,
    vbak.
    TYPE-POOLS: ixml.
    DATA: itab LIKE but000 OCCURS 0 WITH HEADER LINE.
    TYPES: BEGIN OF my_xml ,
    data(256) TYPE x,
    END OF my_xml.
    DATA: xml_table TYPE TABLE OF my_xml.
    DATA: l_xml_size TYPE i,
    ld_fullpath TYPE string.
    START-OF-SELECTION.
    SELECT * FROM but000 INTO TABLE itab UP TO 10 ROWS.
    CALL FUNCTION 'SAP_CONVERT_TO_XML_FORMAT'
    EXPORTING
    I_FIELD_SEPERATOR = ','
    I_LINE_HEADER =
    I_FILENAME =
    I_APPL_KEEP = ' '
    I_XML_DOC_NAME =
    IMPORTING
    pe_bin_filesize = l_xml_size
    TABLES
    i_tab_sap_data = itab
    CHANGING
    i_tab_converted_data = xml_table
    EXCEPTIONS
    CONVERSION_FAILED = 1
    OTHERS = 2
    IF sy-subrc 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    CALL FUNCTION 'GUI_DOWNLOAD'
    EXPORTING
    bin_filesize = l_xml_size
    filename = 'C:\test.txt'
    filetype = 'BIN'
    IMPORTING
    filelength = l_xml_size
    TABLES
    data_tab = xml_table
    FIELDNAMES =
    IF sy-subrc 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    You can go use ADOBE AIR for developing the pie chart widget...
    kindly reward if found helpful.
    cheers,
    Hema.

  • Adobe Flex Pie Chart

    Hi,
        I want to populate data from a query template to a adobe flex pie chart. I am doing this because business user prefers beautiful objects ;).
    Can anyone help me out in how to achieve this. I have some knowledge about flex.
    Thanx in Advance

    Hi,
       You can see a Video tutorial on xMII-Flex integration made by Abesh
    at /people/abesh.bhattacharjee/blog/2007/08/27/use-xmii-services-in-adobe-flex-20-video
    Coming to your question
    you should declare the web service in your flex application as
    <mx:HTTPService id="ServiceName"/>
    then you can call it in a function let's say Hi()
    private function Hi():void{
    ServiceName.url=encodeURI("http://xMIIServerIP/Lighthammer/Illuminator?QueryTemplate="PathToQueryTemplate"&IllumLoginName="LoginName"&IllumLoginPassword="Password"&content-type=text/xml");
                   ServiceName.send();
    You can call this function in any event according to your requirements.
    Note: The URL is specific to 11.5 version of xMII. You may need to change it accordingly for 12.0.
    Regards,
    Musarrat

  • Help regarding PIE Charts

    Hi experts,
       I am creating a report in which i have to display a pie chart. I am sucessful in that but the requirement is i need to get the value of each sector displayed in the graph itself. I am using a function module GRAPH_2D for the charts. So please let me know the possible chanses for that.
    Thanks in advance.

    Hi Uday,
    That is the transaction. It is one stop shop for all graphs
    Just ask your basis to give you the authorization for that or you can just go in the code of that transaction and look interanally which all programs it is calling.
    Regards,
    Atish

  • Bar chart and pie chart in same screen at a time

    hi experts,
    I am trying to display the bar chart and pie chart in two separate containers in same screen .I wrote code for this in PBO of screen by using the function module  GFW_PRES_SHOW , but it is showing one chart at a time which is lastly executed in the PBO.
    I need to display two charts in two container at a time by calling the same function modules two times first time for bar chart second time for pie chart by changing the  parameter 
    presentation_type      = 1 for bar chart
    presentation_type      = 31 for pie chart.
    please help me in this regard asap.
    Thanks,
    K.Rajesh.

    Hi..
    Instead of using the FMs .. you should use the Object oriented approach for the same.
    Brief steps:
    You should have 2 control areas and 2 containers.
    Define different instances of 2 controls and attach them to the 2 containers.
    Call individual methods to display the controls in PBO.
    This should show both at a time. It is really simple.
    As an example you can go to SE38. From the (sap) menu go to Environment -> Examples -> Control Examples.
    Here you will see lot of examples.
    Regards,
    Varun.

Maybe you are looking for