CandlestickChart : Candlestick Chart « Chart « Flex






CandlestickChart

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>

   
    
    
    
    
    
    
    
  








Related examples in the same category

1.Candlestick chart displaying stock pricesCandlestick chart displaying stock prices
2.Candlestick Chart Heigh field and Low fieldCandlestick Chart Heigh field and Low field
3.Axis for Candlestick ChartAxis for Candlestick Chart
4.Legend for Candlestick ChartLegend for Candlestick Chart
5.Candlestick Chart Axis Label Rotation ExampleCandlestick Chart Axis Label Rotation Example
6.Setup CandlestickChartSetup CandlestickChart
7.Define the properties of the high-low lines and candlestick borders by using a Stroke classDefine the properties of the high-low lines and candlestick borders by using a Stroke class
8.Create a CandlestickChart controlCreate a CandlestickChart control