1 Reply Latest reply on Apr 14, 2011 10:23 AM by digsafe

    pie chart wedge function call

    digsafe Level 1

      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.

        • 1. Re: pie chart wedge function call
          digsafe Level 1

          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>