SciChart® the market leader in Fast WPF Charts, WPF 3D Charts, iOS Chart, Android Chart and JavaScript Chart Components
I am using a custom component based on the MultiPaneStockChart example which has the very nice overview scrollbar. I like a lot about this except for the scrolling behavior when clicked. When you click on either side of the “viewport” in the non-selected region it pans all the way to that spot. How would I go about changing this behavior so that it advances only one screen or page at a time (i.e. advances by the width or number of points that are in current XAxisVisibleRange)? In other words, if I am zoomed in on the middle of the chart so that only a portion is shown, whether I click immediately to the right of the viewport or two inches away it should scroll by the same amount. I see the SciChartScollBar exposes a SelectedRangeChanged event but I want to intercept before the range is changed. Thank you.
Best regards,
Lawson
Hi Lawson
The SciChartScrollBar has a mouse click handler which causes it to zoom to the clicked location. Looking a the code for SciChart there is no way to customise this behaviour without modifying the source code for ScIChartScrollbar.
If you do have access to the source via source-code license, and want to do it, the change is simple. You need to change the method ScIChartScrollbar.OnNonSelectedAreaMouseLeftButtonUp(). If not then I’m afraid there is no endpoint for customisation of this behaviour.
Best regards,
Andrew
Please login first to submit.