Annotation tool snap to point feature
Annotation tool snap to point feature
I use Annotation tool to wright a text on chart. which i wanted to mark a specific point on my series. But i didnt found any feature for this in Annotation tool. So i kept its position custom and set its x and y cordinates according to that point. It worked well but while Zooming Chart position of text doesnt change itself. how to change its position automatically i want it like snap to point.
-
- Guru
- Posts: 1603
- Joined: Fri Nov 15, 2002 12:00 am
Re: Annotation tool snap to point feature
Hello!
You can tie the Annotation tool position to a particular series point position like this:
You can tie the Annotation tool position to a particular series point position like this:
Code: Select all
Annotation tool1;
Line series1;
private void InitializeChart()
{
series1 = new Line(tChart1.Chart);
series1.FillSampleValues();
series1.AfterDrawValues += series1_AfterDrawValues;
tool1 = new Annotation(tChart1.Chart);
tool1.Text = "Some text";
tool1.Shape.CustomPosition = true;
}
void series1_AfterDrawValues(object sender, Graphics3D g)
{
tool1.Shape.Left = series1.CalcXPos(3);
tool1.Shape.Top = series1.CalcYPos(3);
}
Best Regards,
Christopher Ireland / 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 |