Data Property

Use this property along with the Column and Row properties to return/set any data point value for a specific Profile.

[Visual Basic]
Property Data() As Double
[C#]
double XYChartNETCtl.Data
[C++]
__property double XYChartNet::XYChartNETCtl::Data

Remarks

Initially, all data values are 0.

Note   An error is generated when reading/writing the Data value if the Row value is not valid for the specified profile.

Example 1

XYChartNETCtl1 is the name of the XY Chart NET control instance placed on the form.

[Visual Basic]
Dim dValue As Double

XYChartNETCtl1.NumProfiles = 5  'Set the number of profiles to plot to 5

XYChartNETCtl1.Column = 6       'Set the column to 6, i.e. X-data for Profile 3
XYChartNETCtl1.Row = 3          'Set the row to 3, i.e. 4th sample X-data for Profile 3
dValue = XYChartNETCtl1.Data    'Return the data at (Row, Column) cell location

XYChartNETCtl1.Column = 7       'Set the column to 7, i.e. Y-data for Profile 3
XYChartNETCtl1.Row = 3          'Set the row to 3, i.e. 4th sample Y-data for Profile 3
XYChartNETCtl1.Data = 43.5      'Set the data at (Row, Column) cell location to 43.5

XYChartNETCtl1.Refresh          'Refresh required to update chart with changes made

[C#]
double dValue;

XYChartNETCtl1.NumProfiles = 5;  //Set the number of profiles to plot to 5

XYChartNETCtl1.Column = 6;       //Set the column to 6, i.e. X-data for Profile 3
XYChartNETCtl1.Row = 3;          //Set the row to 3, i.e. 4th sample X-data for Profile 3
dValue = XYChartNETCtl1.Data;    //Return the data at (Row, Column) cell location

XYChartNETCtl1.Column = 7;       //Set the column to 7, i.e. Y-data for Profile 3
XYChartNETCtl1.Row = 3;          //Set the row to 3, i.e. 4th sample Y-data for Profile 3
XYChartNETCtl1.Data = 43.5;      //Set the data at (Row, Column) cell location to 43.5

XYChartNETCtl1.Refresh();        //Refresh required to update chart with changes made

[C++]
double dValue;

XYChartNETCtl1->NumProfiles = 5;  //Set the number of profiles to plot to 5

XYChartNETCtl1->Column = 6;       //Set the column to 6, i.e. X-data for Profile 3
XYChartNETCtl1->Row = 3;          //Set the row to 3, i.e. 4th sample X-data for Profile 3
dValue = XYChartNETCtl1->Data;    //Return the data at (Row, Column) cell location

XYChartNETCtl1->Column = 7;       //Set the column to 7, i.e. Y-data for Profile 3
XYChartNETCtl1->Row = 3;          //Set the row to 3, i.e. 4th sample Y-data for Profile 3
XYChartNETCtl1->Data = 43.5;      //Set the data at (Row, Column) cell location to 43.5

XYChartNETCtl1->Refresh();        //Refresh required to update chart with changes made

Example 2

XYChartNETCtl1 is the name of the XY Chart NET control instance placed on the form.

[Visual Basic]
Dim idx As Integer

XYChartNETCtl1.NumProfiles = 2               'Set the number of profiles to plot to 2
XYChartNETCtl1.Profile(0).NumSamples = 10    'Set the number of samples allowed for Profile 0 to 10
XYChartNETCtl1.Profile(1).NumSamples = 5     'Set the number of samples allowed for Profile 1 to 5

'Set data values for Profile 0
For idx = 0 to XYChartNETCtl1.Profile(0).NumSamples - 1
   XYChartNETCtl1.Row = idx           'Set Row to idx
   XYChartNETCtl1.Column = 0          'Set X-data for Profile 0
   XYChartNETCtl1.Data = idx          'Set the data at (Row, Column) cell location to idx
   XYChartNETCtl1.Column = 1          'Set Y-data for Profile 0
   XYChartNETCtl1.Data = idx ^ 2      'Set the data at (Row, Column) cell location to idx ^ 2
End For

'Set data values for Profile 1
For idx = 0 to XYChartNETCtl1.Profile(1).NumSamples - 1
   XYChartNETCtl1.Row = idx           'Set Row to idx
   XYChartNETCtl1.Column = 2          'Set X-data for Profile 1
   XYChartNETCtl1.Data = 5 - idx      'Set the data at (Row, Column) cell location
   XYChartNETCtl1.Column = 3          'Set Y-data for Profile 1
   XYChartNETCtl1.Data = 5 - idx ^ 2  'Set the data at (Row, Column) cell location
End For

XYChartNETCtl1.Refresh                'Refresh required to update chart with changes made

[C#]

[C++]

See Also

Properties | Column | Row | ChartData | Profile | ProfileData