Mega Code Archive

 
Categories / Flex / Chart
 

CandlestickChart

<?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical">   <mx:Model id="financialModel">     <data>         <row>           <quarter>1</quarter>           <open>3</open>           <close>2</close>           <high>4</high>           <low>1</low>         </row>         <row>           <quarter>2</quarter>           <open>2</open>           <close>3</close>           <high>6</high>           <low>1</low>         </row>         <row>           <quarter>3</quarter>           <open>3</open>           <close>6</close>           <high>14</high>           <low>9</low>         </row>     </data>     </mx:Model>   <mx:ArrayCollection id="financialData" source="{financialModel.row}"/>     <mx:Panel title="HLOC Chart" height="100%" width="100%">       <mx:CandlestickChart dataProvider="{financialData}" height="100%" width="100%">         <mx:horizontalAxis>           <mx:LinearAxis minimum="0" maximum="4" interval="1"/>         </mx:horizontalAxis>         <mx:series>           <mx:CandlestickSeries dataProvider="{financialData}"             highField="high" lowField="low"             openField="open" closeField="close"             xField="quarter">             <mx:boxStroke>               <mx:SolidColorStroke color="black" weight="3"/>             </mx:boxStroke>           </mx:CandlestickSeries>         </mx:series>       </mx:CandlestickChart>     </mx:Panel>    </mx:Application>