Pre loader

How to lock Y Axis Visible Range

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


Hey super helpful and awesome SciCharts gurus,
I’m trying to create a graph that has usable data in a specific range, say 80-100, and I’m wondering if there is a way to lock the y axis range absolutely? This would override any kind of updating that ZoomPan or other modifiers might try to do.


  • You must to post comments

Yes, there is a way to do this.

Check out the ViewPortManager feature. This is a back-door API into the chart which allows you to intercept VisibleRange changes during the render pass. If you create a custom DefaultViewportManagerBase and put breakpoints in the methods you will see where this is called – basically any time the chart renders.

You can keep a ViewportManager in your ViewModel and bind it to SciChartSurface.ViewportManager, that way when you append data or have a disconnection issue you could set a flag on your custom viewport manager to freeze the VisibleRange for a specific axis.

Also, you may not be aware but many of the modifiers have flags to restrict action to just X or just Y direction, e.g. see here: http://;component/Examples/IWantTo/ZoomAndPanAChart/MouseDragToPanXOrY.xaml

I hope this helps!


  • rcannon
    That helps and points out how much I still need to learn. Also, I know that something like ZoomPan can be restricted to a single axis but, say you have a decaying sine wave, when you pan the X Axis the Y Axis Visible Range still changes. What I'm looking for is a way to set the visible range once, either dynamically or hard coding, and have it never change unless I intend it to. That way when I pan you can see as the sine wave diminishes.
  • You must to post comments

Sounds to me all you need is to set Axis.AutoRange = AutoRange.Never, in combination with an Axis.VisibleRange.

Our default autorange method tries to range on startup then never does again. In most cases this is fine but ‘AutoRange.Never’ disables it.

See here for more info: http://

  • Andrew
  • You must to post comments
Showing 2 results
Your Answer

Please first to submit.