# Setting the X and Y Data Arrays Using Point Values

## Content



For charts that only use the X and Y-axes (XY-Plot, Bar, and so on), the [PointData](/componentone/api/win/online-chart2d/dotnet-framework-api/C1.Win.C1Chart.4.8/C1.Win.C1Chart.ChartDataSeries.PointData.html) property can be a convenient shortcut. The PointData property of the ChartDataSeries object allows the entering of an array of PointF point values. This property is convenient for applications that use point data, but this array will only set the [X](/componentone/api/win/online-chart2d/dotnet-framework-api/C1.Win.C1Chart.4.8/C1.Win.C1Chart.ChartDataSeries.X.html) and [Y](/componentone/api/win/online-chart2d/dotnet-framework-api/C1.Win.C1Chart.4.8/C1.Win.C1Chart.ChartDataSeries.Y.html) data arrays. This property cannot change the values in the data arrays for Y1, Y2, or Y3.

The following example builds a PointF array and loads it into a ChartDataSeries:

DOC-DETAILS-TAG-OPEN

DOC-SUMMARY-TAG-OPEN

To write code in Visual Basic

DOC-SUMMARY-TAG-CLOSE

```vbnet
Dim ps() As PointF = _
{ _       
    New PointF(30.0F, 20.0F), _    
    New PointF(60.0F, 24.0F), _        
    New PointF(90.0F, 42.0F), _       
    New PointF(120.0F, 13.0F), _        
    New PointF(150.0F, 10.0F) _        
}        
Dim s As New ChartDataSeries()      
C1Chart1.ChartGroups.Group1.ChartData.SeriesList.Add(s)        
s.PointData.CopyDataIn(ps)
```

DOC-DETAILS-TAG-CLOSE

DOC-DETAILS-TAG-OPEN

DOC-SUMMARY-TAG-OPEN

To write code in C#

DOC-SUMMARY-TAG-CLOSE

```csharp
PointF [] ps =        
{        
    new PointF(30.0F, 20.0F),       
    new PointF(60.0F, 24.0F),        
    new PointF(90.0F, 42.0F),        
    new PointF(120.0F, 13.0F),   
    new PointF(150.0F, 10.0F)       
};        
ChartDataSeries  s = new ChartDataSeries();       
c1Chart1.ChartGroups.Group1.ChartData.SeriesList.Add(s);        
s.PointData.CopyDataIn(ps);
```

DOC-DETAILS-TAG-CLOSE

## See Also

[Customizing the ChartDataSeries](/componentone/docs/win/online-chart2d/chartingdata/customizingthechartd)