Use a secondVerticalAxis and secondVerticalAxisRenderer
(placement="right").

-TH

--- In [email protected], "shaded" <shad...@...> wrote:
>
> I'm have a chart with 3 sets of line graph data, id like to have 2 of
> those set to have the same y axis, and the third to have its own. The
> docs don't really do a good job of explaining this. Can anyone help
>
> sample code
>
> <mx:Panel title="Multiple Data Series" width="100%" height="100%">
> <mx:LineChart id="myChart"
> dataProvider="{srv.lastResult.root.consump}"
> showDataTips="true"
> height="100%"
> width="100%"
> >
> <mx:horizontalAxis>
> <mx:CategoryAxis id="dateAxis" categoryField="date"/>
> </mx:horizontalAxis>
>
>
> <mx:verticalAxis>
> <mx:CategoryAxis id="priceAxis" />
> </mx:verticalAxis>
>
> <mx:verticalAxisRenderers>
> <!--<mx:AxisRenderer placement="left" axis="{kWAxis}"/>-->
> <mx:AxisRenderer placement="left" axis="{priceAxis}"/>
> </mx:verticalAxisRenderers>
>
> <mx:series>
> <mx:LineSeries id="consump"
> xField="date"
> yField="value"
> displayName="Consumption (kWh) "
> >
> </mx:LineSeries>
> <mx:LineSeries id="cbl"
> dataProvider="{srv.lastResult.root.cbl}"
> xField="cbldate"
> yField="cblval"
> displayName="CBL"
> >
> </mx:LineSeries>
> <mx:LineSeries id="price" verticalAxis="{priceAxis}"
> dataProvider="{srv.lastResult.root.price}"
> xField="pricedate"
> yField="priceval"
> displayName="Price ($kWh)"
> >
> </mx:LineSeries>
> </mx:series>
> </mx:LineChart>
> <mx:Legend dataProvider="{myChart}"/>
> </mx:Panel>
>



Reply via email to