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 Full code after the jump. 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>
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
layout="vertical"
verticalAlign="middle"
backgroundColor="white"
creationComplete="init();">
<mx:Script>
<![CDATA[
import mx.controls.Button;
private var defaultFilters:Array;
private function init():void {
defaultFilters = pieSeries.filters;
}
private function toggleFilters(evt:Event):void {
if (Button(evt.currentTarget).selected) {
pieSeries.filters = [];
} else {
pieSeries.filters = defaultFilters;
}
}
]]>
</mx:Script>
<mx:XML id="dp">
<products>
<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" />
</products>
</mx:XML>
<mx:ApplicationControlBar dock="true">
<mx:Button label="Toggle filters"
toggle="true"
change="toggleFilters(event);" />
</mx:ApplicationControlBar>
<mx:PieChart id="pieChart"
dataProvider="{dp.product}"
height="250"
width="100%">
<mx:series>
<mx:PieSeries id="pieSeries"
field="@data" />
</mx:series>
</mx:PieChart>
</mx:Application>
11:08 AM
|
Labels:
Flex Controls Samples,
Flex with Chart Examples
|
This entry was posted on 11:08 AM
and is filed under
Flex Controls Samples
,
Flex with Chart Examples
.
You can follow any responses to this entry through
the RSS 2.0 feed.
You can leave a response,
or trackback from your own site.
0 comments:
Post a Comment