SciChart® the market leader in Fast WPF Charts, WPF 3D Charts, and now iOS Charting & Android Chart Components
I have graphs with VisibleRange set in both axes (Y and X). The way I would like my graphs to behave is as follows:
– I set the VisibleRange by Binding
– One of the graphs has a Logarithmic XAxis (Just incase it has a special treatment)
– Currently my graphs set VisibleRanges correctly at first, but not after zoom and restore.
Help me out with how to proceed, please.
Thanks in advance.
Thanks for your request. There are two ways of implementing the desired behavior for now:
you could extend ZoomExtentsModifier and override its default behavior. Please take a look at the example provided by another user in this thread.
if you want to override the default AutoRange behavior completely, you should create your own implementation of ViewportManager.
Please let us know if you need more assistance with this,
“Currently my graphs set VisibleRanges correctly at first, but not after zoom and restore.”
This usually occurs because you have a Binding to VisibleRange, but have not used a TwoWay binding.
please see A Note about DependencyProperty Precedence for info.
“Internally, SciChart sets the AxisBase.VisibleRangeProperty using the Local Value precedence in some places. We must do this as ChartModifiers, and AutoRange need to update the AxisBase.VisibleRange.”
“This means that in some cases, style setters and templated properties setting Axis.VisibleRange will not appear to work. For this reason we recommend that any bindings to VisibleRange are a TwoWay binding to a ViewModel property:”
Let me know if this helps
Please login first to submit.