OxyPlot - Synchronized Axis(s) for Two Chart

Apr 12, 2012 at 6:56 AM

Hello Group Members/OxyPlot Team,

Many Thanks for giving us proper guidance on OxyPlot, I am using OxyPlot, Linear and DateTime Axis. I have Plotted two charts, where if I Zoom In/Out X-Axis of Chart1 then Chart 2 X-asis should be also perform Zoom In/Out respectively (based on operation performed) and vice versa.

Is it Possible to do in OxyPlot? Please suggest.

Thanks & Regards

Raviraj

Coordinator
Apr 18, 2012 at 7:18 PM

The axes have an AxisChanged event that you could subscribe to. The event should be raised every time the axis is changed by the user (panning, zooming, reset)

May 11, 2012 at 3:28 PM

How would you update the Axis or plot of the second chart? I'm looking for methods to change the axis (or plot) to zoom to an area between an upper and lower bound which are selected from another chart, but am unable to find how to do this. 

Coordinator
May 12, 2012 at 9:32 AM

Use the Zoom(double x0, double x1) method on the axes of the second chart. Remember to call InvalidatePlot(false) on the second chart's PlotModel afterwards.

If you are defining your plots in XAML, you can use the ActualModel property of the Plot control to access the plot models.

Coordinator
May 28, 2012 at 10:54 AM

See the new example in WpfExamples/CoupledAxesDemo