See Also

Annotation Class  | Annotation Members

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

Language

Visual Basic

C#

JScript

Show All

See Also Requirements 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;}
[JScript]
public function get,set DataSource : Object

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'.

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

Annotation Class  | Annotation Members

 

 


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