Pre loader

AutoRange in Version 2.x

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 not making any sense of the AutoRange behavior in version 2.x. First, the documentation lists choices of .Always, .Auto, and .Never, but Visual Studio IntelliSence tells me the choices are .Always, .Once, and .Never.

The behavior I want is for the data to be fully visible (as after ZoomExtents) initially, but then to response to rubberband zooming and double-click unzooming. “.Once would seem to be the logical choice, but this doesn’t work. Instead, I get a Y-axis range of 0 to 9.

Help?

Thanks,
–George
p.s. I’m using MVVM, and I may have forgotten the trick to calling .ZoomExtents from my ViewModel.

  • You must to post comments
0
0

Hi George,

The behaviour of Once (default) is the option you are looking for, but in your case doesn’t seem to be working as expected. As a workaround please call DataSeries.InvalidateParentSurface(RangeMode.ZoomToFit) from your viewmodel (or SciChartSurface.ZoomExtents()) after binding the DataSeries.

Consider SciChart needs to perform the following on startup when AutoRange.Once is used:

  • User creates a chart in the designer or in an application with no data, it should display axis with VisibleRange, gridlines (requires a default range that we supply: 0..9)
  • User creates a chart in the designer or in an application with no data and with a specific VisibleRange e.g. -100, 100. Should display that range
  • User appends data to a chart. Consider this appending can occur before chart loaded, after chart loaded, before first render, after first render. They expect the chart to zoom to fit and just show the data.
  • On subsequent appends or renders they do not expect the chart to zoom to fit
  • User double clicks on chart, or rubber band zooms, they expect the chart to zoom to the new range

As you can see we’re second guessing our developers a lot in AutoRange.Once. If you want, we can pull this out and just have AutoRange=True, False and leave it up to users to zoom extents manually or have fully autorange (where they cannot zoom via the mouse).

Finally, in all of our examples we don’t witness the behaviour you’re describing (of range getting stuck at 0..9) so I expect you’re doing something different to us, like showing a chart then later adding data, am I right? It’s possible this is a use-case we haven’t covered so if you can help us reproduce it, I’d appreciate it.

In the meantime please use a workaround (zoom extents after append) and you should be back in business.

Andrew

  • 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