Hello,
We have two y axes on our chart. Everything is drawn based on the right axis and left axis is there only for display purposes.
How can we sync the two axes when using YAxisDragModifier for zooming or panning?
- Aysan Afrand asked 9 years ago
- You must login to post comments
Hello,
Most of our examples for Synchronising Multiple Charts show how to sync the zoom, pan modifiers, the tooltips and the X-Axis VisibleRange but not the YAxisDragModifier.
So what did you want to do, when you drag one YAxis the other one moves as well? Proportionally? or to the same exact VisibleRange?
If same exact VisibleRange, simply bind YAxis.VisibleRange on chart A to YAxis.VisibleRange on chart B using a TwoWay Binding.
If proportionally, that is a bit more difficult but Im sure it could be done. Please specify your requirements and we’ll be glad to help.
Best regards,
Andrew
- Andrew Burnett-Thompson answered 9 years ago
-
There is only one chart with two y axes. I want both to have the same exact visible range. I added Y2VisibleRange with two way binding, but still doesn’t work. And, in “Axis_OnVisibleRangeChanged” i just raise the event for “Y2VisibleRange”
-
i put a piece of code but it got removed. should i attach it as a file?
-
A TwoWay binding between two axis should work. We use this technique all the time for XAxis and the principle is no different for Y. You can either bind them directly (use ElementName or RelativeSource binding) or, bind to a common Viewmodel property. http://stackoverflow.com/a/8817573/303612
-
thanks Andrew. i think i have it working finally.
-
Great! Glad to be of help!
- You must login to post comments
super! I always turn to professionals from purple cv reviews – here is the site https://topcvwritersuk.com/purplecv-review/. This saves my time and at the same time I immediately see the result and the number of responses from employers – the reaction is positive and numerous thanks to these professionals
- Jey Qo answered 3 years ago
- last edited 3 years ago
- You must login to post comments
Please login first to submit.