2 Replies Latest reply on Jan 15, 2009 4:00 AM by mfsiddiq

    PieChart explode over Item label

    mfsiddiq Level 1

      I have a piechart with labelPosition set 'inside'.On rollOver i am exploding the ChartItem which works fine if i dont rollOver the label.If i rollOver the label,the event fails(chartItem does not explode).Any tips to make it work even on label.

      Thanks in Advance
        • 1. Re: PieChart explode over Item label
          matthew horn Level 3
          Sidd, I couldnt replicate this behavior. Can you post a code sample that shows it not working? Part of my problem is that the label is inside the pie wedge, so I can't get it to fail because the wedge explodes before I ever get to the label. Here's a simple example I borrowed from FlexExamples.com that seems to work fine:

          <?xml version="1.0" encoding="utf-8"?>
          <!-- http://blog.flexexamples.com/2007/11/06/exploding-wedges-in-a-flex-piechart-control/ -->
          <mx:Application xmlns:mx=" http://www.adobe.com/2006/mxml"

          import mx.charts.events.ChartItemEvent;

          private function pieChart_itemClick(evt:ChartItemEvent):void {
          var arr:Array = [];
          arr[evt.hitData.chartItem.index] = 0.2;
          pieSeries.perWedgeExplodeRadius = arr;

          <mx:XML id="dp">
          <product label="Product 1" data="3" />
          <product label="Product 2" data="1" />
          <product label="Product 3" data="4" />
          <product label="Product 4" data="1" />
          <product label="Product 5" data="5" />
          <product label="Product 6" data="9" />

          <mx:PieChart id="pieChart"
          <mx:PieSeries id="pieSeries" labelPosition="inside" field="@data">
          <mx:Stroke color="black" weight="0" />
          <mx:Array />


          matt horn
          flex docs
          • 2. PieChart explode over Item label
            mfsiddiq Level 1
            Thanks Matt for your response.My code is almost similar to what you have posted and it does explodes on roll over.What i meant was when you move your mouse over the label(pieSeries.LabelContainer),The pie slice reverts to the normal unexploded size and only when you move out of the label it explodes again.