SciChart® the market leader in Fast WPF Charts, WPF 3D Charts, and iOS Chart & Android Chart Components

Welcome to the SciChart Community Forums!

Please use the forums below to ask questions about SciChart. Take a moment to read our Question asking guidelines on how to ask a good question and our support policy. We also have a tag=SciChart on Stackoverflow.com where you can earn rep for your questions!

Please note: SciChart team will only answer questions from customers with active support subscriptions. Expired support questions will be ignored. If your support status shows incorrectly, contact us and we will be glad to help.

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.