While zooming chart annotation misplaced
Posted: Tue Mar 10, 2015 5:38 am
i placed annotation on my chart using following code
after placing perfectly if i zoomed the chart then annotation is not following my chart zoom and actually moves away from series where i plotted it. Same this works well with Trendline tool without any problem for zoom.
I used following code for zooming
Kindly help me to get to the appropriate solution for this.
Code: Select all
Steema.TeeChart.Tools.Annotation tAnnotation = new Steema.TeeChart.Tools.Annotation();
tAnnotation.Shape.Font.Color = Color.White;
tAnnotation.Shape.Font.Size = 10;
tAnnotation.Shape.Color = Color.Black;
tAnnotation.Text = strVal;
tAnnotation.Shape.CustomPosition = true;
tAnnotation.Shape.Left = e.X;
tAnnotation.Shape.Top = e.Y;
tAnnotation.Shape.Shadow.Visible = false;
tAnnotation.Shape.Transparent = true;
tChartMain.Tools.Add(tAnnotation);
I used following code for zooming
Code: Select all
tChartMain.Zoom.Active = true;
tChartMain.Zoom.Allow = true;
tChartMain.Zoom.Pen.Visible = true;
tChartMain.Zoom.Brush.Visible = true;
tChartMain.Zoom.MouseButton = MouseButtons.Left;
tChartMain.Zoom.Direction = ZoomDirections.Both;
tChartMain.Zoom.FullRepaint = true;
tChartMain.Zoom.Pen.Color = Color.White;
tChartMain.Zoom.Brush.Color = Color.White;
tChartMain.Zoom.Brush.Transparency = 100;