Page 1 of 1

How do I create text labels that point to a point on a Chart

Posted: Fri Jan 13, 2006 6:45 pm
by 8119814
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.

Posted: Mon Jan 16, 2006 9:44 am
by narcis
Hi Annelise,

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!");
		}