Archive for November 10th, 2007

10
Nov

Exploding all wedges in a Flex PieChart control using the explodeRadius property

The following example shows how you can explode all wedges in a PieChart at once by using the explodeRadius property, as seen in the following snippet:

<mx:PieChart dataProvider="{dp.product}" height="100%" width="100%">
    <mx:series>
        <mx:PieSeries field="@data" labelPosition="callout">
            <mx:explodeRadius>0.2</mx:explodeRadius>
            <mx:filters>
                <mx:Array />
            </mx:filters>
        </mx:PieSeries>
    </mx:series>
</mx:PieChart>

If you want to explode individual wedges, simply use the perWedgeExplodeRadius property.

Full code after the jump.

Continue reading ‘Exploding all wedges in a Flex PieChart control using the explodeRadius property’

10
Nov

Customizing radial strokes in a Flex PieChart control

The following example shows how you can customize the radial stroke in a Flex PieChart control by using the PieSeries class’s radialStroke style and the mx.graphics.Stroke class, as seen in the following snippet:

<mx:PieChart dataProvider="{dp.product}" height="250" width="100%">
    <mx:series>
        <mx:PieSeries id="pieSeries" field="@data">
            <mx:radialStroke>
                <mx:Stroke color="black" weight="2" />
            </mx:radialStroke>
            <mx:filters>
                <mx:Array />
            </mx:filters>
        </mx:PieSeries>
    </mx:series>
</mx:PieChart>

Full code after the jump.

Continue reading ‘Customizing radial strokes in a Flex PieChart control’

10
Nov

Customizing callout strokes in a Flex PieChart control

The following example shows how you can customize the callout stroke in a Flex PieChart control by using the PieSeries class’s calloutStroke style and the mx.graphics.Stroke class, as seen in the following snippet:

<mx:PieChart dataProvider="{dp.product}" height="250" width="100%">
    <mx:series>
        <mx:PieSeries id="pieSeries" field="@data">
            <mx:calloutStroke>
                <mx:Stroke color="black"weight="2" />
            </mx:calloutStroke>
            <mx:filters>
                <mx:Array />
            </mx:filters>
        </mx:PieSeries>
    </mx:series>
</mx:PieChart>

To see an example of changing the stroke around the pie chart itself, see “Customizing strokes in a Flex PieChart control”.

Full code after the jump.

Continue reading ‘Customizing callout strokes in a Flex PieChart control’

10
Nov

Exploding wedges in a Flex PieChart control based on user input

The following example shows how you can explode individual wedges in a PieChart when the user changes the value of a Slider control, or rolls over an item in a List control. For other examples of PieChart wedge exploding, check out “Exploding wedges in a Flex PieChart control”.

Full code after the jump.

Continue reading ‘Exploding wedges in a Flex PieChart control based on user input’