Pre loader

Sync Two Y Axes

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

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?

  • You must to post comments
0
0

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

  • Aysan Afrand
    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”
  • Aysan Afrand
    i put a piece of code but it got removed. should i attach it as a file?
  • Andrew Burnett-Thompson
    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
  • Aysan Afrand
    thanks Andrew. i think i have it working finally.
  • Andrew Burnett-Thompson
    Great! Glad to be of help!
  • You must to post comments
0
0

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

  • You must to post comments
Showing 2 results
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