Page 1 of 1
Zoom gone after setting bottom axis max points
Posted: Tue Jun 16, 2020 8:01 pm
by 15686634
I have a fast line chart that is representing an Oscilloscope. The Bottom axis maximum points vary continuously so I am resetting that value repeatedly. My problem comes in that if I have zoomed in on the graph, the x-axis zooms back out as soon as I change the maximum value and the zoom is lost. How do I get it to "Stick" Thanks.
- This is before zoom
- good1.png (5.85 KiB) Viewed 10071 times
- This is after zoom
- zoomed.png (8.19 KiB) Viewed 10071 times
As soon as I run this:
chart.Axes.Bottom.Minimum = 0
chart.Axes.Bottom.Maximum = CurrMaxPoints
It zooms back out. I want it to stay focused on the same area of the graph.
Re: Zoom gone after setting bottom axis max points
Posted: Wed Jun 17, 2020 4:10 pm
by Christopher
el1179 wrote: ↑Tue Jun 16, 2020 8:01 pm
As soon as I run this:
chart.Axes.Bottom.Minimum = 0
chart.Axes.Bottom.Maximum = CurrMaxPoints
It zooms back out. I want it to stay focused on the same area of the graph.
I'd have to see more of your code to have a clear understanding of what's going on, but staying focused on the same area of the graph means choosing very carefully the Minimum and Maximum axis values.
Re: Zoom gone after setting bottom axis max points
Posted: Fri Jun 19, 2020 2:32 pm
by 15686634
The 0-360 are just the labels and the actual points are 0 to anywhere from 5k-30k points. Since that high end changes every second or so I need to keep it up to date to show accurately.
I was able to find a simple suitable workaround where I do not change the bottom axis points when it is zoomed. If zoom cleared they get updated.