<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" 
    xmlns:s="library://ns.adobe.com/flex/spark" 
    xmlns:mx="library://ns.adobe.com/flex/mx"
    backgroundColor="#000000" viewSourceURL="srcview/index.html">

    <fx:Declarations>
        <fx:XML id="xmlData">
            <data>
                <apple week="1" quantity="1" />
                <apple week="2" quantity="1" />
                <apple week="3" quantity="2" />
                <apple week="4" quantity="2" />
                <apple week="5" quantity="3" />
                <apple week="6" quantity="3" />
                <apple week="7" quantity="4" />
                <apple week="8" quantity="5" />
                <apple week="9" quantity="6" />
                <apple week="10" quantity="7" />

                <orange seeds="1" yield="2" />
                <orange seeds="2" yield="4" />
                <orange seeds="3" yield="6" />
                <orange seeds="4" yield="8" />
                <orange seeds="5" yield="6" />
                <orange seeds="6" yield="-4" />
                <orange seeds="7" yield="2" />
                <orange seeds="8" yield="1" />

                <banana year="1" growthRate="-11" />
                <banana year="2" growthRate="-12" />
                <banana year="3" growthRate="9" />
                <banana year="4" growthRate="4" />
                <banana year="5" growthRate="10" />
            </data>
        </fx:XML>
    </fx:Declarations>

    <mx:LineChart id="chart" top="0" left="0" right="0" bottom="0" showDataTips="true">
        <mx:series>
            <mx:LineSeries xField="@week" yField="@quantity" dataProvider="{ xmlData..apple }">
                <mx:verticalAxis>
                    <mx:LinearAxis id="appleAxis" autoAdjust="true" baseAtZero="false" />
                </mx:verticalAxis>
                <mx:horizontalAxis>
                    <mx:LinearAxis autoAdjust="true" baseAtZero="false" />
                </mx:horizontalAxis>
                <mx:lineStroke>
                    <s:SolidColorStroke color="#FF0000" />
                </mx:lineStroke>
            </mx:LineSeries>

            <mx:LineSeries xField="@seeds" yField="@yield" dataProvider="{ xmlData..orange }">
                <mx:verticalAxis>
                    <mx:LinearAxis id="orangeAxis" autoAdjust="true" baseAtZero="false" />
                </mx:verticalAxis>
                <mx:horizontalAxis>
                    <mx:LinearAxis autoAdjust="true" baseAtZero="false" />
                </mx:horizontalAxis>
                <mx:lineStroke>
                    <s:SolidColorStroke color="#FFA500" />
                </mx:lineStroke>
            </mx:LineSeries>

            <mx:LineSeries xField="@year" yField="@growthRate" dataProvider="{ xmlData..banana }">
                <mx:verticalAxis>
                    <mx:LinearAxis id="bananaAxis" autoAdjust="true" baseAtZero="false" />
                </mx:verticalAxis>
                <mx:horizontalAxis>
                    <mx:LinearAxis autoAdjust="true" baseAtZero="false" />
                </mx:horizontalAxis>
                <mx:lineStroke>
                    <s:SolidColorStroke color="#FFFF00" />
                </mx:lineStroke>
            </mx:LineSeries>
        </mx:series>
        <mx:verticalAxisRenderers>
            <mx:AxisRenderer 
                showLine="false"
                axis="{ appleAxis }"
                color="#FF0000"/>
            <mx:AxisRenderer
                showLine="false" 
                axis="{ orangeAxis }"
                color="#FFA500"/>
            <mx:AxisRenderer
                showLine="false"
                axis="{ bananaAxis }"
                color="#FFFF00" />
        </mx:verticalAxisRenderers>
        <mx:horizontalAxisRenderers>
            <mx:AxisRenderer 
                showLine="false"
                axis="{ appleAxis }"
                color="#888888"/>
        </mx:horizontalAxisRenderers>
    </mx:LineChart>

</s:Application>