Pre loader

Zoom and restore with VisibleRange set

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



I have graphs with VisibleRange set in both axes (Y and X). The way I would like my graphs to behave is as follows:

  1. When the graph is loaded, the VisibleRanges are applied in both axes.
  2. When I zoom, ZoomExtents applies to both axes
  3. When I double click on the graph to restore, the initial VisibleRanges as in (1) applies.

– I set the VisibleRange by Binding
– One of the graphs has a Logarithmic XAxis (Just incase it has a special treatment)
– Currently my graphs set VisibleRanges correctly at first, but not after zoom and restore.

Help me out with how to proceed, please.

Thanks in advance.

Kilosa M.

  • You must to post comments

Hi Kilosa,

Thanks for your request. There are two ways of implementing the desired behavior for now:

  • you could extend ZoomExtentsModifier and override its default behavior. Please take a look at the example provided by another user in this thread.

  • if you want to override the default AutoRange behavior completely, you should create your own implementation of ViewportManager.

Please let us know if you need more assistance with this,

Best regards,

  • You must to post comments

“Currently my graphs set VisibleRanges correctly at first, but not after zoom and restore.”

This usually occurs because you have a Binding to VisibleRange, but have not used a TwoWay binding.

please see A Note about DependencyProperty Precedence for info.

“Internally, SciChart sets the AxisBase.VisibleRangeProperty using the Local Value precedence in some places. We must do this as ChartModifiers, and AutoRange need to update the AxisBase.VisibleRange.”

“This means that in some cases, style setters and templated properties setting Axis.VisibleRange will not appear to work. For this reason we recommend that any bindings to VisibleRange are a TwoWay binding to a ViewModel property:”

Let me know if this helps

  • Kilosa Magali
    Hi Andrew, I had TwoWay binding already set. I’ll try to check with Yuriy’s solution. But if there’s a simpler alternative I will be glad.
  • You must to post comments
Showing 2 results
Your Answer

Please first to submit.