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

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.