Hi,
I use color band tools and put annotations on them to give them a
description for the enduser.
When I zoom/unzoom or resize the graph I want to
adjust the position of the annotations.
The zoomed event, however, is called BEFORE the chart class is repainted
to show the new axis scales and therefore a call like:
this.annotation1.Left = chart1.Axes.Bottom.CalcXPosValue(this.ColorBand1.Start);
does not get the new value.
Is there a way to adjust the annotations to the new postion of the colorband(s)? As far as I see the colorband class does not have a label or mark associated with it. If it had, I would not need the annotations.
Thanks,
fano
How to adjust annotation position after zoom/resize??
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi fano,
You could try implementing the code in the BeforeDrawSeries event:
You could try implementing the code in the BeforeDrawSeries event:
Code: Select all
private void tChart1_BeforeDrawSeries(object sender, Steema.TeeChart.Drawing.Graphics3D g)
{
int left, top;
left = line1.CalcXPos(3);
top = line1.CalcYPos(3);
annotation1.Left = left;
annotation1.Top = top;
}
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 |