Problem using double vertical axis in flexible charts?

I draw two linear rows on the same LineChart line, which have the same horizontal axis but have different vertical axes to 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 Price1 varies from 20 to 25, while in the second, Vaxis Price2 changes somewhere between 20 and 25, but sometimes it has a zero value. When Price2 drops to zero at a time, the entire chart adjusts to two straight lines without any detail on price changes. I want to scale left Vaxis regardless of the price change in Right Vaxis values.

I know that you can do this by setting the maximum and minimum for both diagrams independently. But I have a huge amount of data in real time, setting the graphs minimally and maximally dynamically for each update that I receive and redraw, this will be a bad idea.

Is there a way to do this without setting max and min, I thought that by default flex provided the ability to scale two Vaxis independently according to http://livedocs.adobe.com/flex/3/html/help.html?content=charts_types_12 .html

Thanks sanre6

+4
source share

All Articles