19/04/2010 Development / flex

Segue o código.

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" initialize="initApp()" width="300" height="138" >
<mx:Script>
<![CDATA[
//Aqui começa o código action Script
import flash.external.*;
import mx.controls.Alert;
import mx.collections.ArrayCollection;

[Bindable] public var medalsAC:Array = new Array();

public function initApp():void{
if (ExternalInterface.available){
ExternalInterface.addCallback(
"update", update);
}
}

public function update(list:Array):void {
medalsAC = list;
}

]]>
</mx:Script>

<mx:Style source="grafico.css" />

<!-- EFEITO DO GRÁFICO -->
<mx:Stroke id="espaco" alpha="0" weight="2"/>
<!-- Gráfico de Colunas -->
<mx:ColumnChart id="column" height="136" width="298" showDataTips="false" dataProvider="{medalsAC}">
<mx:seriesFilters>
<mx:Array/>
</mx:seriesFilters>
<mx:horizontalAxis>

<mx:CategoryAxis categoryField="Count"/> <!-- barra horizontal debaixo -->
</mx:horizontalAxis>
<mx:series>
<mx:ColumnSeries yField="QtyAskOrders" styleName="ColumnSeries" stroke="{espaco}" />
<mx:ColumnSeries yField="QtyBidOrders" styleName="ColumnSeries" stroke="{espaco}" />
</mx:series>
</mx:ColumnChart>
</mx:Application>