0 Replies Latest reply on Apr 27, 2011 10:19 PM by dankeff

    Issue with min/max when vertical axis assigned to multiple series

    dankeff

      Hi.

       

      I have some simple charting code that is dynamically adding LineSeries to a chart as the user requests them from the gui. As each series is added the vertical axis is assigned to the series and then data is requested and assigned to the dataProvider on the series. This is all working fine however I have found that if I add a sceond series after the first series is displayed and assign the same vertical axis to the second series then the vertical axis seems to set teh min/max based only on the second series added and ignores the first series. It doesnt set to the max of both series and so I get an incorrect max set. If I add a 3rd series the same happens again and the first and second series values seem to be ignored and the axis is set based on the last series to be added.

       

      Is this expected? Ive tried different variations of invalidating the data/series/styles to force it to refresh but I always get the same. It does refresh but based on only the values in the last added series.

       

      What is odd is that if I add 2 series at the same time, and assign the axis to both of them and then request data for both and update the dataProvider on both of them the axis is configured correctly based on the max value of both series.

       

      Any workarounds to make it do the right thing if they are added dynamically? Is this a bug or a known "feature"?

       

      Any light anyone can shed would be appreciated.

       

      I need to have the axis assigned to the series directly as I want to be able to use multiple axes. I have found that if I set the verticalaxis on the chart rather than the series then it works fine and sets the min/max based on the combined values of both series.

       

      The vertical axis is just a simple LinearAxis.

       

      Any help or suggestions would be appreciated.

       

      Im using Flex 4.1

       

      Tks


      Dan