<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical" xmlns:charts="com.iwobanas.charts.*" viewSourceURL="srcview/index.html">

    <!-- Sample data provider -->
    <mx:ArrayCollection id="dp">
        <mx:Object y1="3" y2="2" date="{new Date(2009,0)}" />
        <mx:Object y1="4" y2="2" date="{new Date(2009,1)}" />
        <mx:Object y1="5" y2="3" date="{new Date(2009,2)}" />
        <mx:Object y1="4" y2="4" date="{new Date(2009,3)}" />
        <mx:Object y1="3" y2="3" date="{new Date(2009,4)}" />
        <mx:Object y1="3" y2="5" date="{new Date(2009,5)}" />
        <mx:Object y1="2" y2="4" date="{new Date(2009,6)}" />
        <mx:Object y1="3" y2="5" date="{new Date(2009,7)}" />
        <mx:Object y1="4" y2="6" date="{new Date(2009,8)}" />
        <mx:Object y1="5" y2="6" date="{new Date(2009,9)}" />
        <mx:Object y1="4" y2="7" date="{new Date(2009,10)}" />
        <mx:Object y1="4" y2="8" date="{new Date(2009,11)}" />
    </mx:ArrayCollection>
    
    <mx:DateTimeAxis id="axis2" dataUnits="months"  />
    
    <charts:ChartScroller id="scroller" chart="{chart}" />
                
    <mx:Panel title="ChartScroller example - 2 series with DateTimeAxis" width="100%" height="100%">
    
        <mx:ColumnChart id="chart" width="100%" height="100%" 
            gutterLeft="40" gutterRight="10" dataProvider="{dp}">
            
            <mx:series>
                <mx:ColumnSeries id="series1" xField="date" yField="y2" />
                <mx:ColumnSeries id="series2" xField="date" yField="y1" horizontalAxis="{axis2}" />
            </mx:series>
            
            <mx:horizontalAxis>
                <mx:DateTimeAxis id="axis1" dataUnits="months" />
            </mx:horizontalAxis>
            
            <mx:verticalAxis>
                <mx:LinearAxis id="vAxis1" maximum="10" />
            </mx:verticalAxis>
            
            <mx:horizontalAxisRenderers>
                <mx:AxisRenderer placement="bottom" axis="{axis1}" />
                <mx:AxisRenderer placement="top" axis="{axis2}" />
            </mx:horizontalAxisRenderers>
            
        </mx:ColumnChart>
        
    </mx:Panel>
</mx:Application>