<?xml version="1.0"?>
<!-- charts/GradientFills.mxml -->
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
<mx:Script>
<!--[CDATA[
import mx.collections.ArrayCollection;
[Bindable]
public var expenses:ArrayCollection=new ArrayCollection([{Expense: "Taxes", Amount: 2000}, {Expense: "Rent", Amount: 1000}, {Expense: "Bills", Amount: 100}]);
]]-->
</mx:Script>
<mx:Panel title="Background Fill">
<mx:BarChart id="myChart"
dataProvider="{expenses}"
showDataTips="true">
<mx:verticalAxis>
<mx:CategoryAxis dataProvider="{expenses}"
categoryField="Expense"/>
</mx:verticalAxis>
<mx:fill>
<mx:LinearGradient>
<mx:entries>
<mx:GradientEntry color="0xC5C551"
ratio="0"
alpha="1"/>
<mx:GradientEntry color="0xFEFE24"
ratio=".33"
alpha="1"/>
<mx:GradientEntry color="0xECEC21"
ratio=".66"
alpha="1"/>
</mx:entries>
</mx:LinearGradient>
</mx:fill>
<mx:series>
<mx:BarSeries xField="Amount"
displayName="Amount"/>
</mx:series>
</mx:BarChart>
<mx:Legend dataProvider="{myChart}"/>
</mx:Panel>
</mx:Application>