Hi Narcis,
Can we mark an are of chart which may be of interest. Like for a particular point in the chart, can we circle it and label it?
I've attached the picture of what I'm trying to describe in a mail to you as I'm unable to connect to the newsgroup.
Thanks.
Can we mark an area of the chart?
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi sherlyn,
Yes, to mark the point as the image you sent you need to use the AfterDraw event to custom draw on TeeChart's canvas. For labelling the point you can use AnnotationTool. For example:
Yes, to mark the point as the image you sent you need to use the AfterDraw event to custom draw on TeeChart's canvas. For labelling the point you can use AnnotationTool. For example:
Code: Select all
private void Form1_Load(object sender, EventArgs e)
{
tChart1.Aspect.View3D = false;
points1.FillSampleValues();
}
private void tChart1_AfterDraw(object sender, Steema.TeeChart.Drawing.Graphics3D g)
{
g.Pen.Visible = true;
g.Pen.Color = points1.Color;
g.Ellipse(r);
}
private Rectangle r;
private void points1_AfterDrawValues(object sender, Steema.TeeChart.Drawing.Graphics3D g)
{
r = new Rectangle();
int radius = 20;
r.X = points1.CalcXPos(5) - radius;
r.Y = points1.CalcYPos(5) - radius;
r.Width = radius * 2;
r.Height = r.Width;
Steema.TeeChart.Tools.Annotation annotation1 = new Steema.TeeChart.Tools.Annotation(tChart1.Chart);
annotation1.Text = "5th point";
annotation1.Left = r.X;
annotation1.Top = r.Y + r.Height + 5;
}
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 |