I am plotting two line series on a single LineChart which share the same horizontal axis, but have different vertical axis on the left and right of the chart:
<mx:LineChart id="linechart1" width="100%" height="100%" showDataTips="true" seriesFilters="[]">
<mx:horizontalAxis>
<mx:DateTimeAxis displayLocalTime="true" dataUnits="seconds" labelUnits="seconds"/>
</mx:horizontalAxis>
<mx:verticalAxisRenderers>
<mx:AxisRenderer placement="left" axis="{Vaxis1}" />
<mx:AxisRenderer placement="right" axis="{Vaxis2}"/>
</mx:verticalAxisRenderers>
<mx:series>
<mx:LineSeries xField="DateTime" yField="Price1">
<mx:verticalAxis>
<mx:LinearAxis baseAtZero="false" id="Vaxis1" autoAdjust="false"/>
</mx:verticalAxis>
</mx:LineSeries>
<mx:LineSeries id="agentlegend" xField="DateTime" yField="Price2">
<mx:verticalAxis>
<mx:LinearAxis id="Vaxis2" baseAtZero="false" autoAdjust="false"/>
</mx:verticalAxis>
</mx:LineSeries>
</mx:series>
</mx:LineChart>
In the first Vaxis , the Price1 varies between 20 to 25 .while , in the second Vaxis Price2 varies anywhere between 20 to 25 but occasionally has a zero value . When Price2 drops to zero for once , the whole chart adjusts into 2 straight lines with no granular view of the price changes . I want scaling on left Vaxis independent of the price change in Right Vaxis values .
I know you can do this by setting maximum and minimum for both charts independently . But , i have huge amounts of real time data coming in , setting the charts minimum and maximum dynamically for each update i get and redrawing it will be a bad idea .
Is there anyway to do this without setting the max and min , i thought by default flex provided the feature to scale the two Vaxis independently according to http://livedocs.adobe.com/flex/3/html/help.html?content=charts_types_12.html
Thanks sanre6