We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.

# Auto sacle and non-primary axis

Hi again =p I have a line chart. I have two series with drastically different ranges of values that will be plotted on the Y axis. (IE series A will have Y values between 0 and 1000 and series B will have values between 0 and 10). I want to have series A be plotted on the primary axis and I want to create a secondary Y axis to plot series B on. I do not know the range of values beforehand so I would like both axis to use the auto-range feature. What I would expect is that the primary axis would only use points on series A to calculate its range since that is the only series that uses the axis and the secondary axis would only use the values in series B to calculate its range. So in the example the primary axis would have an auto range like -100 to 1100 and the secondary axis would auto range to something like -1 to 11. If I try to do this both axis end up with the same range and I end up with a chart that looks the same as if I was using just one Y axis. (IE with one axis the auto-range would be something like -100 to 1100 because of values 0 to 1000 in series A... when I add a second axis and set series B to use that axis... both the primary and secondary axis have the same range (-100 to 1100) as before) Does auto-range not work correctly with the secondary axis? The auto-range for each axis should only take into account points in series that are assigned to that axis... instead it looks like it is using the points in ALL series to generate both ranges. In your sample you manually set the range of the secondary axis... is this the only way to make this work? I''m not sure if this post made a lot of sense... it is a complicated situation so not sure if I explained it well. Thanks, Jon

2 Replies

JO Jon September 7, 2004 05:57 PM UTC

Better to give an example of what I am talking about. If you have two series each with their own Y axis. In series 1 all the values are between 400 and 500 and series 1 is on the primary Y axis. In series 2 all the values are between 100 and 200 and series 2 is on the secondary Y axis. If you try to use auto range set on both Y-axis you get a range of 0-600 on both even though the only values that are plotted on the primary axis are between 400 and 500 and the only values plotted on the 2nd Y axis are between 100 and 200. It should be something like the primary Y axis has a range of 350 to 550 and the second Y axis has a range like 50 to 250. I am attaching a SS of a chart that is set up like I said and also the source code to generate it which just modified your example. I tried moving things around without success. Thank you, Jon MultAxisExample_147.zip

DJ Daniel Jebaraj Syncfusion Team September 7, 2004 06:42 PM UTC

Hi Jon, Thanks for the sample. The current Auto-Range calculation takes all series into account and this is the cause of the problem. We are currently making several major refactoring changes to Essential Chart. It could be a few days before we can fix this. Please let us know your timeframe and we will make every effort to get in ready. Sorry for the inconvenience. Best regards, Daniel