Working with Data > Data Overview > Data Organization |
Data in a chart is organized into chart groups. Each chart contains two chart groups (although most charts will only use the first ChartGroup), each of which is treated as a separate entity. In 2D Chart, a chart group is represented by a ChartGroup object.
Within a chart group, data is represented by the Data property, which is a Chart2DData object. The Chart2DData object defines the following properties which control the data to be displayed in the chart:
The NumSeries property defines the number of data series in the chart group.
· The NumPoints property defines the number of data points in a series. This property is indexed by series. For example, the statement
NumPoints = Chart2D1.ChartGroups(1).Data.NumPoints(1)
assigns the number of data points in the first series to the NumPoints variable.
· The Layout property specifies the data layout. Its value must be a data layout constant specifying either array or general data. If array data is specified, each series is assumed to have the same number of data points.
· The X and Y properties specify the X- and Y-coordinates of a particular data point. These properties are indexed by series and point. For example, the statement
Xval = Chart2D1.ChartGroups(1).Data.X(1,3)
assigns the X-coordinate of the third point in the first data series to Xval.
The following diagram is an example of a plot of array data:
And here is a plot of general data: