When user zooms on a chart another chart will be zoomed..
For example when user zooms on security's data, security's indicator (Another Chart) will be zoomed exactly same ...I tried to make by "Zoomed" event, but I couldnt transfer Zoom property to Rectangle variable ..
(If i could i will call Zoom.ZoomRect(Rectangle r))..
PS:And yes i know.. im walking on the dangerous way ..One Form and Three Related TChart Components(Stock Data,Indicators)..I Have to synchronize All Of Them..But because of uneffective Splitting model on one TChart Component I have to solve Splitting Problem like that ..
Thx for advices,helps and contributions ..
How could I transfer zoom event from a chart to another one.
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi glikoz,
You can do something like:
You can do something like:
Code: Select all
private void Form1_Load(object sender, System.EventArgs e)
{
line1.FillSampleValues();
line2.FillSampleValues();
}
private void tChart1_Zoomed(object sender, System.EventArgs e)
{
UpdateAxes();
}
private void tChart1_Scroll(object sender, System.EventArgs e)
{
UpdateAxes();
}
private void tChart1_UndoneZoom(object sender, System.EventArgs e)
{
UpdateAxes();
}
private void UpdateAxes()
{
tChart1.Refresh();
tChart2.Axes.Bottom.SetMinMax(tChart1.Axes.Bottom.Minimum,tChart1.Axes.Bottom.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 |