XY Chart NET 3 Control Reference
Data Property

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

Syntax
[Visual Basic]
Property Data() As Double
[C#]
double XYChartNETCtl.Data
[C++]
property double XYChartNet::XYChartNETCtl::Data
       
Remarks
Initially, all data values are 0.
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.

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
// XYChartNETCtl1 is the name of the XY Chart NET control instance placed on the form.

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
// XYChartNETCtl1 is the name of the XY Chart NET control instance placed on the form.

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.

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
                       
                        
See Also

 

 


© 2003 - 2013 ControlEng Corporation. All rights reserved.