Yes i know about ( This post ) , if you search you will notice the event AxisValueChanged seems to only exist in this one thread.
My goal is simply to automaticly zoom the Y axis when user make a selection on the X axis, but i have been unable to figure out how.
I also tried to to use the SelectionRangeChanged event, but this event seems kind of broken as im unable to figure out whats actual range selected? ( IE so i can find the maximum / minimum ranges ).
Im using MS chart ( Microsoft chart )
The end goal is when i zoom X axis ( This is a FastLine Chart) it should see the new “max” visible value on Y axis and resize/zoom it accordingly
If I understand you correctly, given a zoomed range on X axis you want to zoom also the same range on Y axis. If so, you can do in this way:
As you said, the event
AxisValueChangeddoesn’t exist; the post you linked probably meant the (existing) event AxisViewChanged.Obviously, you can also use
AxisViewChangedfor your purpose, and adapting my code to exploit that event shouldn’t be so hard.Feel free to ask if you need help though 😉
EDIT :
I modified my code to account for your goal. The following code computes the Y range corresponding to the maximum and minimum values of the points inside the zoomed X range: