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
- Sean Clifford asked 10 years ago
- You must login to post comments
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
- Yuriy Zadereckiy answered 10 years ago
-
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 login to post comments
Please login first to submit.