Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
380
Auto scale Y axis
posted

Using v12.1

My chart type is a ScatterSeries

I have a numeric y axis which will typically have anywhere from 2-20 series displayed.

Each series have 2 different modes or data points (actual, adjusted) for performance reasons I create each series in code behind and set the YMemberPath to equal a property in data callled YValue, then outside the chart the operator has the ability to choose the value display.  The code then updates the YValue property with the correct value. 

This all works fine, when the values change the yAxis will automatically re-scales depending on the values.

The problem began when I had a requirement to add a 'zero' line to the adjusted values.  What I did was create a ValueOverlay at 0 and add it to the chart series. Then when the operator selects 'Actual' mode I remove the series from the chart collection.  At this point I expected the chart to rescale the same way as it did before I added a zero line, however, the zero line is gone but the chart wont rescale, it seems to think that zero is still a valid Y value.

I can't figure out how to make the chart readjust its yAxis

Parents Reply Children
No Data