Candlestick chart displaying stock prices : Candlestick Chart « Chart « Flex






Candlestick chart displaying stock prices

Candlestick chart displaying stock prices
  
<?xml version="1.0"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" backgroundColor="white">
    <mx:XML id="DataXML">
        <stockdata>
            <ticker>
                <data interval="09/01/2010" high="54" low="40" open="53" close="43" />
                <data interval="09/02/2010" high="69" low="37" open="62" close="40" />
                <data interval="09/04/2010" high="65" low="30" open="60" close="52" />
                <data interval="09/05/2010" high="60" low="20" open="42" close="48" />
                <data interval="09/03/2010" high="62" low="52" open="55" close="60" />
                <data interval="09/04/2010" high="65" low="30" open="60" close="52" />
                <data interval="09/05/2010" high="60" low="20" open="42" close="48" />
                <data interval="09/01/2010" high="54" low="40" open="53" close="43" />
                <data interval="09/02/2010" high="69" low="37" open="62" close="40" />
                <data interval="09/03/2010" high="62" low="52" open="55" close="60" />
            </ticker>
        </stockdata>
    </mx:XML>
    <mx:XMLListCollection source="{DataXML.ticker.data}" id="stockData" />
    <mx:Panel title="Stock" width="500" height="200" layout="horizontal">
        <mx:CandlestickChart id="hlocChart" dataProvider="{stockData}" height="100%" width="100%">
            <mx:horizontalAxis>
                <mx:CategoryAxis categoryField="@interval" />
            </mx:horizontalAxis>
            <mx:series>
                <mx:CandlestickSeries highField="@high" lowField="@low" openField="@open" closeField="@close" />
            </mx:series>
        </mx:CandlestickChart>
    </mx:Panel>
</mx:Application>

   
    
  








Related examples in the same category

1.Candlestick Chart Heigh field and Low fieldCandlestick Chart Heigh field and Low field
2.Axis for Candlestick ChartAxis for Candlestick Chart
3.Legend for Candlestick ChartLegend for Candlestick Chart
4.Candlestick Chart Axis Label Rotation ExampleCandlestick Chart Axis Label Rotation Example
5.Setup CandlestickChartSetup CandlestickChart
6.CandlestickChartCandlestickChart
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