3D Data / Adding Rows and Columns
Adding Rows and Columns

To add rows to a chart group, do the following:

Set the RowCount property to the new number of rows.

If the data is irregularly-grid, set the RowDeltaArray property for the space between a new row and its predecessor.

Set the Item property for each of the new points.

For example, the following code adds a fourth row of three points to a ChartGroup:

To write code in Visual Basic

Visual Basic
Copy Code
With C1Chart3D1.ChartGroups(0).ChartData.SetGrid
  .RowCount = 4
  .Item(0, 3) = 5.17
  .Item(1, 3) = 5.84
  .Item(2, 3) = 6.33
End With

To write code in C#

C#
Copy Code
C1Chart3D1.ChartGroups[0].ChartData.SetGrid.RowCount = 4;
C1Chart3D1.ChartGroups[0].ChartData.SetGrid[0,3] = 5.17;
C1Chart3D1.ChartGroups[0].ChartData.SetGrid[1,3] = 5.84;
C1Chart3D1.ChartGroups[0].ChartData.SetGrid[2,3] = 6.33;

New columns can be added in much the same way:

Set the ColumnCount property to the new number of columns.

If the data is irregularly-grid, set the ColumnDeltaArray property for the space between a new column and its predecessor.

Set the Item property for each of the new points.

See Also