See Also

Annotation Class  | Annotation Members

Language

Visual Basic

C#

Show All

See Also Languages dotnetCHARTING Send comments on this topic.

DataSource Property

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

[Visual Basic]
Public Property DataSource As Object
[C#]
public object DataSource {get; set;}

Remarks

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

Example

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#] 

Series mySeries = new Series(); 
mySeries.Name = "Test Series"; 
Annotation a = new Annotation(); 
a.DataSource = mySeries; 
a.Label.Text = "%Name"; 
Chart.Annotations.Add(a); 
  
// When this chart renders, the annotation will read 'Test Series'.

[Visual Basic] 

Dim mySeries As New Series()
mySeries.Name = "Test Series"
Dim a As New Annotation()
a.DataSource = mySeries
a.Label.Text = "%Name"
Chart.Annotations.Add(a)

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

See Also

Annotation Class  | Annotation Members

 

 


2002 - 2005 Webavail Productions Inc. & Corporate Web Solutions Ltd.. All Rights Reserved.