SciChart® the market leader in Fast WPF Charts, WPF 3D Charts, and now iOS Charting & Android Chart Components

Welcome to the SciChart Community Forums!

Please use the forums below to ask questions about SciChart. Take a moment to read our Question asking guidelines on how to ask a good question and our support policy. We also have a tag=SciChart on Stackoverflow.com where you can earn rep for your questions!

Please note: SciChart team will only answer questions from customers with active support subscriptions. Expired support questions will be ignored. If your support status shows incorrectly, contact us and we will be glad to help.

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
    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
    Great! Glad to be of help!
  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.