Back to Devexpress

SeriesPointCollection.Add(SeriesPoint) Method

corelibraries-devexpress-dot-xtracharts-dot-seriespointcollection-dot-add-x28-devexpress-dot-xtracharts-dot-seriespoint-x29.md

latest7.0 KB
Original Source

SeriesPointCollection.Add(SeriesPoint) Method

Appends the specified SeriesPoint object to the current collection.

Namespace : DevExpress.XtraCharts

Assembly : DevExpress.XtraCharts.v25.2.dll

NuGet Package : DevExpress.Charts

Declaration

csharp
public int Add(
    SeriesPoint point
)
vb
Public Function Add(
    point As SeriesPoint
) As Integer

Parameters

NameTypeDescription
pointSeriesPoint

A SeriesPoint object to append to the collection.

|

Returns

TypeDescription
Int32

An integer value indicating the position at which the new element was inserted.

|

Remarks

This method adds a SeriesPoint object to the end of the collection.

Note

Before adding a SeriesPoint to the collection, use the Series.IsCompatible method to check if this point’s values correspond to the scale type of the current Series.

The following code snippets (auto-collected from DevExpress Examples) contain references to the Add(SeriesPoint) method.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

winforms-chart-combine-several-charts-on-a-single-3d-xy-diagram/CS/Form1.cs#L21

csharp
// Add points to them.
series1.Points.Add(new SeriesPoint(1, new double[] { 10 }));
series1.Points.Add(new SeriesPoint(2, new double[] { 2 }));

winforms-chart-create-a-3d-pie-chart/CS/3DPieChart/Form1.cs#L20

csharp
// Populate the series with points.
series1.Points.Add(new SeriesPoint("Russia", 17.0752));
series1.Points.Add(new SeriesPoint("Canada", 9.98467));

winforms-chart-create-a-3d-stacked-area-chart/CS/Series_3DStackedAreaChart/Form1.cs#L21

csharp
// Populate both series with points.
series1.Points.Add(new SeriesPoint("A", 80));
series1.Points.Add(new SeriesPoint("B", 20));

winforms-charts-create-a-3d-stacked-spline-area/CS/3DStackedSplineAreaChart/Form1.cs#L21

csharp
// Populate both series with points.
series1.Points.Add(new SeriesPoint("A", 80));
series1.Points.Add(new SeriesPoint("B", 20));

winforms-chart-create-a-full-stacked-spline-area-chart/CS/FullStackedSplineAreaChart/Form1.cs#L21

csharp
// Populate both series with points.
series1.Points.Add(new SeriesPoint("A", 80));
series1.Points.Add(new SeriesPoint("B", 20));

winforms-chart-format-values-in-a-crosshair-cursor-with-a-labels-patterns/VB/FormatCrosshairLabels/Form1.vb#L19

vb
Dim series1 As Series = New Series("Europe", ViewType.Line)
series1.Points.Add(New SeriesPoint(1950, 546))
series1.Points.Add(New SeriesPoint(1960, 605))

winforms-chart-combine-several-charts-on-a-single-3d-xy-diagram/VB/Form1.vb#L22

vb
' Add points to them.
series1.Points.Add(New SeriesPoint(1, New Double() {10}))
series1.Points.Add(New SeriesPoint(2, New Double() {2}))

winforms-chart-create-a-3d-pie-chart/VB/3DPieChart/Form1.vb#L21

vb
' Populate the series with points.
series1.Points.Add(New SeriesPoint("Russia", 17.0752))
series1.Points.Add(New SeriesPoint("Canada", 9.98467))

winforms-chart-create-a-3d-stacked-area-chart/VB/Series_3DStackedAreaChart/Form1.vb#L22

vb
' Populate both series with points.
series1.Points.Add(New SeriesPoint("A", 80))
series1.Points.Add(New SeriesPoint("B", 20))

winforms-charts-create-a-3d-stacked-spline-area/VB/3DStackedSplineAreaChart/Form1.vb#L22

vb
' Populate both series with points.
series1.Points.Add(New SeriesPoint("A", 80))
series1.Points.Add(New SeriesPoint("B", 20))

See Also

AddRange(SeriesPoint[])

Remove(SeriesPoint)

RemoveAt(Int32)

RemoveRange(Int32, Int32)

SeriesPointCollection Class

SeriesPointCollection Members

DevExpress.XtraCharts Namespace