How do I create a text label that points to an X,Y location on a Fastline
Thanks for any help you can give me.
How do I create text labels that point to a point on a Chart
-
- Newbie
- Posts: 52
- Joined: Tue Mar 04, 2003 5:00 am
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Annelise,
You can do something like the code below on TChart's AfterDraw event.
You can do something like the code below on TChart's AfterDraw event.
Code: Select all
private void tChart1_AfterDraw(object sender, Steema.TeeChart.Drawing.Graphics3D g)
{
int MaxIndex=0;
for (int i=0;i<fastLine1.Count;++i)
{
if (fastLine1.YValues[i]==fastLine1.MaxYValue()) MaxIndex=i;
}
int x=fastLine1.CalcXPos(MaxIndex);
int y=fastLine1.CalcYPos(MaxIndex);;
tChart1.Graphics3D.TextOut(x,y,"Maximum Value!");
}
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 |