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.
- yo kobayashi asked 4 years ago
-
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;”
-
Thank you for your reply. I’m using these NuGet packages. – ReactiveProperty 5.6.0 – PropertyChanged.Fody 2.6.1
- You must login to post comments
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
- Andrew Burnett-Thompson answered 4 years ago
- You must login to post comments
Please login first to submit.