Hi,
Using the ZoomExtentsModifier on multiple axis used to work in an earlier version of SciCharts, but is broken in 4.3.0. I have two y-axes set up, left and right on my chart, with the right-hand-side just mirroring the left. When I double-tap to zoom to the x/y range of the graph, only the x range is modified. If I disable the change listener that mirrors the range change on the primary y axis, double tap works as expected, but my right hand side y-axis no longer mirrors the primary axis range. This is how I’ve set up the dual axes:
let yAxis = SCINumericAxis()
yAxis.axisTitle = "Acceleration (g)"
yAxis.axisAlignment = .left
yAxis.visibleRangeLimitMode = .minMax
chart?.yAxes.add( yAxis )
// Add an additional visible yAxis to the right without label
let yAxisRight = SCINumericAxis()
yAxisRight.axisAlignment = .right
yAxisRight.axisId = "yAxisRight"
chart?.yAxes.add( yAxisRight )
// Sync values with left (primary) axis
yAxis.visibleRangeChangeListener = { (axis, oldRange, newRange, isAnimating) in
yAxisRight.visibleRange = newRange
}
Commenting out the listener at the bottom fixes the ZoomExtentsModifier problem, but is obviously not a workable solution. Any help would be appreciated. Thanks
- Rakesh Vallabh asked 3 years ago
- You must login to post comments
Hi, there.
Not sure if I understand your issue correctly.
We have an example “Multiple Axis Demo” example which is very similar to your setup. There are two y-axes and ZoomExtentsModifier works well for both axes without updating the second y-axis visible range manually. Please, try to reproduce your issue there or provide your own example so we can reproduce it.
Thanks in advance.
- Andriy P answered 3 years ago
- You must login to post comments
Please login first to submit.