OxyPlot - Synchronized Axis(s) for Two Chart

Apr 12, 2012 at 7: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


Apr 18, 2012 at 8: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 4: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. 

May 12, 2012 at 10: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.

May 28, 2012 at 11:54 AM

See the new example in WpfExamples/CoupledAxesDemo