Category Archives: PieSeries

Customizing strokes in a Flex PieChart control

The following example shows how you can customize the stroke in a Flex PieChart control by using the PieSeries class’s stroke 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:stroke>
                <mx:Stroke color="black" weight="2" />
            </mx:stroke>
            <mx:filters>
                <mx:Array />
            </mx:filters>
        </mx:PieSeries>
    </mx:series>
</mx:PieChart>

Full code after the jump.

Continue reading Customizing strokes in a Flex PieChart control

Removing the drop shadow from a Flex PieChart control

The following example shows how you can remove the default drop shadow from a Flex PieChart control by setting the filters property to an empty array in the PieSeries tag, as seen in the following snippet:

<mx:PieChart id="pieChart"
        dataProvider="{dp.product}"
        height="250"
        width="100%">
    <mx:series>
        <mx:PieSeries id="pieSeries"
                field="@data"
                filters="[]" />
    </mx:series>
</mx:PieChart>

Full code after the jump.

Continue reading Removing the drop shadow from a Flex PieChart control

Creating a custom data tip function on a Flex PieChart control

The following example shows how you can create a custom data tip function on a PieChart control in Flex by specifying the dataTipFunction property in your PieChart control. This example also shows how you can make all the data tips visible at the same time in the pie chart by setting the showAllDataTips property to true.

If you set the showAllDataTips property to true in your PieChart control, the data tips would be visible regardless of whether the user’s cursor was over the pie chart or not, but in the following example we only set the showAllDataTips property to true when the user rolls their mouse over the pie chart, and set it back to false when the user rolls out of the pie chart. For more information, see “Displaying all data tips at once on a Flex PieChart control”.

Full code after the jump.

Continue reading Creating a custom data tip function on a Flex PieChart control