Pre loader

How do I zoom extents the chart to match DataRange

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

Dear SciChart Team:

I want to extend the chart to fit the size to match DataRange and have two operational scenarios:
1. Call SciChartSurface.ZoomExtents()
2. Double click on the canvas with ZoomExtentsModifier

When I change the Y-axis(X-axis) scale through the YAxisDragModifier(XAxisDragModifier) and append points to the curve, and then execute ZoomExtents(), the chart does not match the DataRange.

How do I zoom extents the chart to match DataRange?

Version
4.2.2.9777
  • You must to post comments
0
0

Hi Johnny,

Thanks for your inquiry.
Please take a look at our “Drag Axis to Scale” example. Both AxisDragModifier and ZoomExtentsModifier are used here:
https://www.scichart.com/example/wpf-chart-example-drag-axis-to-scale/

If you continue experiencing this issue please provide us with a small sample project reproducing this issue for investigation.

Thanks in advance.

  • Johnny Yeh
    Dear Oleksandr: I set all the “AutoRange” of the X and Y axes to “Always”. So, after adding the points to the curve, the “VisibleRange” of all axes will be automatically modulated, assuming that the range is 0~100. If I set the “VisibleRange” of the axis to 0~10 at this time, but after adding points, “VisibleRange” is changed to 0~100 because of the relationship of “AutoRange”. I would like to ask, in the case of “AutoRange”, how do I control “VisibleRange”? I hope the situation is that “VisibleRange” can be equal to “DataRange”, but if the axis is adjusted with “AxisDragModifier”, “VisibleRange” will be automatically adjusted to the size of the previous drag after adding points. How do I control “VisibleRange” in the case of “AutoRange”?
  • 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