Data

 

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

Value is a double.   Default: 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

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

XYChartCtrl.Column = 5            'Set the column to 5, i.e. X-data for Profile 3
XYChartCtrl.Row = 3               'Set the row to 3, i.e. 3rd sample X-data for Profile 3
doubleValue = XYChartCtrl.Data    'Return the data at (Row, Column) cell location

XYChartCtrl.Column = 5            'Set the column to 5, i.e. X-data for Profile 3
XYChartCtrl.Row = 3               'Set the row to 3, i.e. 3rd sample X-data for Profile 3
XYChartCtrl.Data = 43.5           'Set the data at (Row, Column) cell location to 43.5

XYChartCtrl.Column = 6            'Set the column to 6, i.e. Y-data for Profile 3
XYChartCtrl.Row = 3               'Set the row to 3, i.e. 3rd sample Y-data for Profile 3
XYChartCtrl.Data = 87.89          'Set the data at (Row, Column) cell location to 87.89

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

Example 2

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

'Set data values for Profile 1

For index = 1 to XYChartCtrl.Profile(1).NumSamples
    XYChartCtrl.Row = index           'Set the row to index
    XYChartCtrl.Column = 1            'Set X-data for Profile 1
    XYChartCtrl.Data = index          'Set the data at (Row, Column) cell location to index
    XYChartCtrl.Column = 2            'Set Y-data for Profile 1
    XYChartCtrl.Data = index ^2       'Set the data at (Row, Column) cell location to index ^2
End For

 

'Set data values for Profile 2

For index = 1 to XYChartCtrl.Profile(2).NumSamples
    XYChartCtrl.Row = index           'Set the row to index
    XYChartCtrl.Column = 3            'Set X-data for Profile 2
    XYChartCtrl.Data = 5 - index      'Set the data at (Row, Column) cell location to '5 - index'
    XYChartCtrl.Column = 4            'Set Y-data for Profile 2
    XYChartCtrl.Data = 5 - index ^2   'Set the data at (Row, Column) cell location to '5 - index ^2'
End For

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

 

See Also

Properties    Column    Row    ChartData     ProfileData