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

I’m trying to have two graphs which share the same X-Axis and have an overview control that zooms and pans. Everything is synchronized but zooming and panning with the overview control. For some reason it only applies to one surface. Below is segments of the code:

SciChartSurface surface = new SciChartSurface();
DateTimeAxis xaxis = new DateTimeAxis();
surface.XAxis = xaxis;
SciChartOverview overview = new SciChartOverview();
overview.ParentSurface = surface;
Binding bind = new Binding();
bind.Source = xaxis;
bind.BindsDirectlyToSource = true;
bind.Mode = BindingMode.TwoWay;
bind.Path = new PropertyPath("VisibleRange"); overview.SetBinding(SciChartOverview.SelectedRangeProperty, bind);
SciChartSurface surface2 = new SciChartSurface();
surface2.XAxis = xaxis;

Could you please help me figure out why it only zooms/pans on one surface?

Thanks,
Greg

  • You must to post comments
0
0

Hi Greg,

You shouldn’t have the same axis shared across multiple charts, in this case you can observe some unexpected behavior. What can I suggest you, is having separate axis for each surface and binding them all(and Overview) to SharedVisibleRange property.

Please, try it and let us know if it works.

Best regards,
Yuriy

  • Sean Clifford
    Thanks Yurly, I actually just created another x-axis and bound it directly to the VisibleRange of the first axis and it worked perfect.
  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.