Pre loader

Minimum axis 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

0
0

Hi

I’m using auto range on a numeric axis. The data can be anything, but I want the axis to never have a range of less than 5.
E.g.: -100 to -95
E.g.: 17 to 22
E.g.: 0 to 5
etc.

What do I need to set to be able to do this? I have tried MinimalZoomConstrain and VisibleRangeLimit without success. Preferably something to set in XAML on my axis.

Thanks.

  • You must to post comments
0
0

I ended up with subscribing to the “DataRangeChanged” event on the axis and calculated the desired range myself and set the “VisibleRange” on the axis.

  • Andrew Burnett-Thompson
    Hi Henning, that will do it, but I would also suggest using AxisBase.VisibleRangeChanged instead and checking the e.NewVisibleRange.AsDoubleRange().Diff value. If it is outside of the desired bounds, set it back to the e.OldVisibleRange. Hope this helps!
  • Ivan Schütz
    Hi Andrew, I did this (I need the x range to start at 0 and the user shouldn’t be able to pan beyond that) but now the chart “falls back” to zooming when I try to pan beyond 0, is there a way to avoid this? It simply has to stop at 0, that’s it. And I do need the zooming, but with an explicit pinch gesture, using 2 fingers…
  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.