Category Archives: SolidColor

Alternating background row colors in a Flex LineSeries chart

The following example shows how you can alternate background row colors in a LineSeries chart in Flex by setting the horizontalAlternateFill style in the GridLines object, as seen in the following snippet:

<mx:LineChart showDataTips="true" dataProvider="{dp}">

    <mx:backgroundElements>
        <mx:GridLines>
            <mx:horizontalAlternateFill>
                <mx:SolidColor color="haloSilver" alpha="0.25" />
            </mx:horizontalAlternateFill>
        </mx:GridLines>
    </mx:backgroundElements>

</mx:LineChart>

Full code after the jump.

Continue reading Alternating background row colors in a Flex LineSeries chart

Drawing transparent pie wedges in a Flex PieChart control

The following example shows how you can create transparent wedges in a Flex PieChart control by setting the SolidColor object’s alpha property to 0, as seen in the following snippet:

<mx:PieChart dataProvider="{arrColl}" height="100%" width="100%">
    <mx:series>
        <mx:PieSeries id="pieSeries" field="data">
            <mx:fills>
                <mx:SolidColor alpha="0.0" />
                <mx:SolidColor color="haloBlue" alpha="1.0" />
            </mx:fills>
            <mx:filters>
                <mx:Array />
            </mx:filters>
        </mx:PieSeries>
    </mx:series>
</mx:PieChart>

Full code after the jump.

Continue reading Drawing transparent pie wedges in a Flex PieChart control

Creating custom fills in a Flex PieChart control using the fillFunction property

The following example shows how you can set fill colors in a Flex PieChart by specifying a custom fill function. In this example the fill function calculates the fill color based on the percentage value of each item. The larger the wedge, the brigher the fill color.

Full code after the jump.

Continue reading Creating custom fills in a Flex PieChart control using the fillFunction property