Can't modify size of box surrounding Annotation
Posted: Mon Aug 15, 2005 4:27 pm
I am using TeeChart for .NET version 2, and I would like to change (expand) the size of the box surrounding an Annotation. Is there a way to do this?
I have not seen an example of this in the help files or in the forums for the .NET TeeChart software.
Here is a C# code snippet of how I am adding the Annotation to the chart in the ASP.NET Page_Load() event:
When I attempt to set the annotation.Shape.Size field nothing happens. Does this need to be set in another event, or am I going down the completely wrong path?
I have not seen an example of this in the help files or in the forums for the .NET TeeChart software.
Here is a C# code snippet of how I am adding the Annotation to the chart in the ASP.NET Page_Load() event:
Code: Select all
int index = chart.Tools.Add(new Annotation());
Annotation annotation = (Annotation)chart.Tools[index];
// set position
annotation.Left = chart.Axes.Left.Position + ((chart.Width / 64) * leftPos);
annotation.Top = chart.Axes.Bottom.Position + ((chart.Height / 64) * topPos);
// set text values
annotation.TextAlign = StringAlignment.Center;
annotation.Text = "Here is some text";
// set shape properties
annotation.Shape.Color = color;
annotation.Shape.CustomPosition = true;
annotation.Shape.Shadow.Visible = false;
annotation.Shape.Font.Bold = true;