# Changing Data Elements in the Data Arrays

## Content



The method of altering individual data elements in the data arrays involves the ChartDataSeries and the ChartDataArray objects.

Setting individual values through the .NET Properties window is made quite easy by the **ChartDataArray Collection Editor**. Data array editors exist for the [X](/componentone/api/win/online-chart2d/dotnet-framework-api/C1.Win.C1Chart.4.8/C1.Win.C1Chart.ChartDataSeries.X.html), [Y](/componentone/api/win/online-chart2d/dotnet-framework-api/C1.Win.C1Chart.4.8/C1.Win.C1Chart.ChartDataSeries.Y.html), [Y1](/componentone/api/win/online-chart2d/dotnet-framework-api/C1.Win.C1Chart.4.8/C1.Win.C1Chart.ChartDataSeries.Y1.html), [Y2](/componentone/api/win/online-chart2d/dotnet-framework-api/C1.Win.C1Chart.4.8/C1.Win.C1Chart.ChartDataSeries.Y2.html), [Y3](/componentone/api/win/online-chart2d/dotnet-framework-api/C1.Win.C1Chart.4.8/C1.Win.C1Chart.ChartDataSeries.Y3.html), and [PointData](/componentone/api/win/online-chart2d/dotnet-framework-api/C1.Win.C1Chart.4.8/C1.Win.C1Chart.ChartDataSeries.PointData.html) arrays. These editors can be accessed by clicking the **ellipsis** next to the appropriate data array in the **SeriesList Collection Editor** (which is available under the **ChartData** node of the **ChartGroupsCollection Editor**). Similar to the .NET collection editors, the **ChartDataArray Editor** has the array indices in a text box on the left and the array values on the right.

![](https://cdn.mescius.io/document-site-files/images/70bd33a2-280e-4cc3-a1c0-7b827eceb8aa/imagesext/image9_145.png)


> type=note
> **Note**: The **ChartDataArray Collection Editor** also contains functionality for toggling the display between Date, DateTime, and Time display. If the values for the ChartDataArray are of DateTime type, then by clicking on the header above the value column, the values displayed will toggle between DateTime, Date and Time formats.

At run time the ChartDataArray elements are available like any normal array elements would be. Changing the values in the array objects is as easy as changing the values in an array:

DOC-DETAILS-TAG-OPEN

DOC-SUMMARY-TAG-OPEN

To write code in Visual Basic

DOC-SUMMARY-TAG-CLOSE

```vbnet
C1Chart1.ChartGroups.Group0.ChartData.SeriesList(0).X(4) = 4
```

DOC-DETAILS-TAG-CLOSE

DOC-DETAILS-TAG-OPEN

DOC-SUMMARY-TAG-OPEN

To write code in C#

DOC-SUMMARY-TAG-CLOSE

```csharp
c1Chart1.ChartGroups.Group0.ChartData.SeriesList[0].X[4] = 4;
```

DOC-DETAILS-TAG-CLOSE

Retrieving the values from the ChartDataArray requires a similar process:

DOC-DETAILS-TAG-OPEN

DOC-SUMMARY-TAG-OPEN

To write code in Visual Basic

DOC-SUMMARY-TAG-CLOSE

```vbnet
Dim xval As Single
xval = C1Chart1.ChartGroups.Group0.ChartData.SeriesList(0).X(4)
```

DOC-DETAILS-TAG-CLOSE

DOC-DETAILS-TAG-OPEN

DOC-SUMMARY-TAG-OPEN

To write code in C#

DOC-SUMMARY-TAG-CLOSE

```csharp
float xval;
xval = c1Chart1.ChartGroups.Group0.ChartData.SeriesList[0].X[4];
```

DOC-DETAILS-TAG-CLOSE

## See Also

[Displaying String Values as Annotations](/componentone/docs/win/online-chart2d/chartingdata/enteringandmodifying/displayingstringvalu)