dotnetCHARTING Send comments on this topic.
DataSource Property
See Also  Example
dotnetCHARTING Namespace > Annotation Class : DataSource Property

Gets or sets the DataSource object used to replace tokens in this annotation's label, tool tip, and URL.


Visual Basic (Declaration) 
Public Property DataSource As Object
Visual Basic (Usage)Copy Code
Dim instance As Annotation
Dim value As Object
instance.DataSource = value
value = instance.DataSource
public object DataSource {get; set;}


Instantiates a series and annotation. Sets the series as the DataSource of the annotation. Specifies the '%Name' series token as for the annotation's label. Adds the annotation to a chart.
C#Copy Code
Series mySeries = new Series();
mySeries.Name =
"Test Series";
Annotation a =
new Annotation();
a.DataSource = mySeries;
a.Label.Text =

// When this chart renders, the annotation will read 'Test Series'.
Visual BasicCopy Code
Dim mySeries As New Series()
mySeries.Name = "Test Series"
Dim a As New Annotation()
a.DataSource = mySeries
a.Label.Text = "%Name"

' When this chart renders, the annotation will read 'Test Series'.



Data sources include Element, Series, and AxisMarker objects. When the source is specified, any tokens associated with the source type may be used.

See Also

© 2019 All Rights Reserved.