SciChart® the market leader in Fast WPF Charts, WPF 3D Charts, and now iOS Charting & Android Chart Components
We also have a tag=SciChart on Stackoverflow.com where you can earn rep for your questions!
I have a vertical annotation and I want to restrict the scrolling of annotation between an x axis range.
ie, When I drag and reach left most point, it should not move beyond that point. Same should happen when I reach right most point.
How can I do that?
A strategy for you is to subscribe to the VerticalLineAnnotation.DragDelta event and if X1 < xMin or X1 > xMax set X1 back to the edge value.
If you are doing this in MVVM you can simply bind TwoWay from VerticalLineAnnotation.X1 to a property in your ViewModel and clip the movement in the same way.
hope this helps!
Please login first to submit.