Pre loader

Programmatically Zoom Out with Overview/Scrollbar with Live Data

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

Answered
0
0

We have a chart where we’re loading data in every second. If you don’t zoom in, the Overview/scrollbar control that we have beneath the chart stays to the right and keeps showing the most recent. However, once you zoom in and then call ZoomExtents() on the chart, it will zoom out but the Overview/scrollbar doesn’t go back to showing the latest; the max is stuck at whatever the time was when you called the ZoomExtents().

If I have the ZoomExtentsModifier on a chart and double-click, it does what I want so that’s what I’m trying to replicate without having the modifier enabled.

Version
6.0.269
  • You must to post comments
Best Answer
0
0

Oleksandr,
I actually figured out the missing part.

Along with calling SciChartSurface.ZoomExtents(); I also had to call SciChartSurface.ZoomState = ZoomStates.AtExtents;

Thanks!
Brett Bousman

  • You must to post comments
0
0

Hi Oleksandr,
I am actually on v6.0.2.13028, I just copied the wrong number previously.

As for my question, I wasn’t reporting a bug but asking a question on how to do something.

We don’t want our users double-clicking on the chart to call whatever the ZoomExtentsModifier is doing so I need to be able to replicate what it’s doing in code because we’ll be calling it from a ContextMenu.

So what I need to know is what all the ZoomExtentsModifier is doing when I double-click on the chart.

I believe part of it is calling the SciChartSurface.ZoomExtents() method but I have a feeling there is more than that.

  • You must to post comments
0
0

Hi Brett,

Thanks for your inquiry.
Please make sure your project is updated to the latest SciChart version, which is 6.0.2.13028 currently. You can also update to our latest nightly build. Here is how to do this:
https://support.scichart.com/index.php?/Knowledgebase/Article/View/17232/37/getting-nightly-builds-with-nuget

If SciChart libraries are updated and you still experience this issue, please send us a small sample project reproducing this issue for investigation.

Thanks in advance,
Oleksandr

  • You must to post comments
Showing 3 results
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