Pre loader

ZoomExtentsModifier prevents Y axis VisbleRange from changing

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 having trouble with YAxis VisibleRange and ZoomExtentsModifier. I want to change the display range of the Y axis dynamically by changing Min and Max of VisibleRange of YAxis from ViewModel. But when ZoomExtentsModifier is executed by double-click etc, Min and Max changes of VisibleRange are not reflected on the screen. If the screen is enlarged or reduced by means other than ZoomExtentsModifier, this state will be resolved and the changes will be reflected.
Please let me know any solution.

Version
5.1.1.11473
Attachments
  • Andrew Burnett-Thompson
    Hello, the following namespaces cannot be found in the example. Which NuGet packages do I need? “using Reactive.Bindings; using Reactive.Bindings.Extensions; using Reactive.Bindings.Helpers; using System.Reactive.Linq;”
  • yo kobayashi
    Thank you for your reply. I’m using these NuGet packages. – ReactiveProperty 5.6.0 – PropertyChanged.Fody 2.6.1
  • You must to post comments
0
0

Thank you for your sample code and the information about the missing NuGet packages.

If you change this line of code in your MainWindowViewModel.cs, it works

Before:

        ResetYVisbleRangeCommand.Subscribe(() =>
        {
            foreach(var a in YAxisList)
            {
                a.VisibleRange.Min = 0.0;
                a.VisibleRange.Max = 50.0;
            }
        });

After:

        ResetYVisbleRangeCommand.Subscribe(() =>
        {
            foreach(var a in YAxisList)
            {
                a.VisibleRange = new DoubleRange(0.0, 50.0);
            }
        });

Now it seems to work as expected.

It is recommended to set a new VisibleRange not to re-use the existing ones throughout SciChart. For types of VisibleRange to match axis, see here: https://www.scichart.com/documentation/v5.x/Axis%20Types%20in%20SciChart.html

Best regards,
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