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.
Synchronized Scrolling
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
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:
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);
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |