dotnetCHARTING Send comments on this topic.
Data Property
See Also  Example
dotnetCHARTING Namespace > Series Class : Data Property


Gets or sets a DataTable, DataSet, DataView, XML file name, XML string, or an object that implement IEnumerable, ArrayList or HashTable used to generate a SeriesCollection.

Syntax

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

Example

Adds data based on the myDataTable .
C#Copy Code
Chart.Series.Data = myDataTable;
Chart.Series.DataFields = "XAxis=FirstCol,YAxis=SecondCol";
Chart.SeriesCollection.Add();
    
Visual BasicCopy Code
Chart.Series.Data = myDataTable
Chart.Series.DataFields = "FirstCol=XAxis,SecondCol=YAxis"
Chart.SeriesCollection.Add()

Remarks

When not connecting to a database directly using ConnectionString and SqlStatement, this property can be used to supply objects with data.

See Also

© 2018 All Rights Reserved.