dotnetCHARTING Send comments on this topic.
Annotations Property
See Also  Example
dotnetCHARTING Namespace > Chart Class : Annotations Property


A collection of Annotation objects drawn on the chart.

Syntax

Visual Basic (Declaration) 
Public ReadOnly Property Annotations As AnnotationCollection
Visual Basic (Usage)Copy Code
Dim instance As Chart
Dim value As AnnotationCollection
 
value = instance.Annotations
C# 
public AnnotationCollection Annotations {get;}

Example

The following code snippet demonstrates how an annotation is added to the chart.
C#Copy Code
Annotation a2 = new Annotation("Annotation text.");

//set the position
a2.Position = new Point(60,40);

// We'll add a link so when this text is clicked it takes us to a web site.
a2.URL = "http://www.dotnetcharting.com";

// Make sure the annotation doesn't create a rectangle for the text and wrap it.
a2.DynamicSize = false;

// In order for the annotation not to draw the background, outline and so
// on... We'll use a shortcut to clear the colors.
a2.ClearColors();

// Add the annotation to a chart.
Chart.Annotations.Add(a2);
    
Visual BasicCopy Code
Dim a2 As Annotation = new Annotation("Annotation text.")

'set the position
a2.Position = new Point(60,40)

'We'll add a link so when this text is clicked it takes us to a web site.
a2.URL = "http://www.dotnetcharting.com"

' Make sure the annotation doesn't create a rectangle for the text and wrap it.
a2.DynamicSize = false

'In order for the annotation not to draw the background, outline and so
'on... We'll use a shortcut to clear the colors.
a2.ClearColors()

'Add the annotation to a chart.
Chart.Annotations.Add(a2)

See Also

© 2008 All Rights Reserved.