Notice
Recent Posts
Recent Comments
SNOWFLAKES DRAWING PAPER
[FLEX] CartesianChart 그냥 만져 보기~ 본문
기존 소스에서 데이터 변경시 효과만 넣어 보았다~
<?xml version="1.0"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" backgroundGradientColors="[#FFFFFF,#FFFFFF]" creationComplete="init()"> <mx:Script> <![CDATA[ import mx.controls.Button; private function init():void { var btn:Button = new Button(); btn.label = "DataChange"; btn.addEventListener(MouseEvent.CLICK, dataChangeEvt); this.addChild( btn ); } private var dataFlag:Boolean = true; private function dataChangeEvt(e:MouseEvent):void { if (dataFlag) { chart.dataProvider = dataSet2.Sample; } else { chart.dataProvider = dataSet.Sample; } dataFlag = !dataFlag; } ]]> </mx:Script> <mx:Model id="dataSet" source="sampleData.xml" /> <mx:Model id="dataSet2" source="sampleData2.xml" /> <mx:SeriesInterpolate id="eff" elementOffset="30" minimumElementDuration="200" duration="1000" /> <mx:CartesianChart id="chart" width="100%" height="100%" dataProvider="{dataSet.Sample}"> <mx:series> <mx:ColumnSet type="clustered" > <mx:ColumnSeries yField="revenue" showDataEffect="{eff}"/> <mx:ColumnSet type="stacked" > <mx:ColumnSeries yField="costs" showDataEffect="{eff}"/> <mx:ColumnSeries yField="oneTime" showDataEffect="{eff}"/> </mx:ColumnSet> </mx:ColumnSet> </mx:series> <mx:horizontalAxis> <mx:CategoryAxis categoryField="month" /> </mx:horizontalAxis> </mx:CartesianChart> </mx:Application> |
'개발 > FLEX/AS3/AIR/BlazeDS' 카테고리의 다른 글
[FLEX] Flex Builder에서 나만의 manifest 만들기 (0) | 2008.09.23 |
---|---|
[FLEX] Creating a SWC Component in FlashDevelop (0) | 2008.09.22 |
[FLEX] LineChart 그냥 만져보기~ (0) | 2008.09.17 |
[FLEX] PieChart 그냥 만져 보기~ (0) | 2008.09.17 |
[FLEX] FLEX 개발 환경 구축(Flex3 SDK + FlashDevelop3) (0) | 2008.09.12 |
Comments