ColumnChart Demo
<?xml version="1.0"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
<mx:Script>
import mx.collections.ArrayCollection;
[Bindable]
public var myArray:ArrayCollection = new ArrayCollection([
{Country:"A", GDP:1},
{Country:"B", GDP:6},
{Country:"C", GDP:4},
{Country:"D", GDP:2}
]);
[Bindable]
public var myArray2:ArrayCollection = new ArrayCollection([
{Country:"A", GDP:1},
{Country:"B", GDP:2},
{Country:"C", GDP:3},
{Country:"D", GDP:4}
]);
</mx:Script>
<mx:Panel title="Column Chart">
<mx:ColumnChart id="myChart" dataProvider="{myArray}" showDataTips="true">
<mx:horizontalAxis>
<mx:CategoryAxis categoryField="Country"/>
</mx:horizontalAxis>
<mx:series>
<mx:ColumnSeries
dataProvider="{myArray}"
yField="GDP"
xField="Country"
displayName="Array"/>
<mx:ColumnSeries
dataProvider="{myArray2}"
yField="GDP"
xField="Country"
displayName="Another Array"/>
</mx:series>
</mx:ColumnChart>
<mx:Legend dataProvider="{myChart}"/>
</mx:Panel>
</mx:Application>
Related examples in the same category