Pre loader

constant scroll width

Welcome to the SciChart Forums!

  • Please read our Question Asking Guidelines for how to format a good question
  • Some reputation is required to post answers. Get up-voted to avoid the spam filter!
  • We welcome community answers and upvotes. Every Q&A improves SciChart for everyone

WPF Forums | JavaScript Forums | Android Forums | iOS Forums

0
0

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

Version
5.1
  • You must to post comments
0
0

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

  • Lawson McWhorter
    Thanks Andrew. Unfortunately no source code license for me but thank for responding and saving me the time from trying unsuccessfully. BTW, I think this is a common workflow–to zoom into the desired level and then want to page forwards/backwards. Since you can drag the viewport to the desired spot for long pans that would be my preferred method. I have captured the pageup and pagedown keys to allow me to move forwards/backwards as I described but it is still disconcerting to click the scroll bar and have it move multiple pages. Hard to undo 25 years of muscle memory from using financial charts. Perhaps a future version can expose a method for customization. Thank you!
  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.

Try SciChart Today

Start a trial and discover why we are the choice
of demanding developers worldwide

Start TrialCase Studies