Page 1 of 1

Synchronized Scrolling

Posted: Wed Feb 20, 2008 4:16 pm
by 8120717
I want to be able to horizontally scroll several charts at once based upon the movement (pan) of any other chart.

I have several highlow charts being displayed in a winform. I want to limit the vertical movement to zero as all charts' vertical scale is set to allow some "white space". It does not matter if the user zooms a chart - the zoomed chart will still scroll as the others - they get what they ask for.

All charts are datetime in the x-axis.

I am assuming I want to have a common scrolling handler for all the charts but I am at a loss as to what to do next.

Thanks in advance for any help.

Posted: Thu Feb 21, 2008 9:25 am
by narcis
Hi Michael,

You could use each chart Scroll event handler for synchronizing the other charts. For synchronizing them you just need to set their axes minimum and maximum values using SetMinMax method, for example:

Code: Select all

			tChart2.Axes.Left.SetMinMax(tChart1.Axes.Left.Minimum, tChart1.Axes.Left.Maximum);