Pre loader

Share X-Axis Overview

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

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.

Try SciChart Today

Start a trial and discover why we are the choice
of demanding developers worldwide

Start TrialCase Studies