// create a new series object var series = new Series("line"); // add a point to the series series.Points.Add(new DataPoint(1, 2));
// create a new series object var series = new Series("spline"); // add multiple points to the series series.Points.Add(new DataPoint(1, 2)); series.Points.Add(new DataPoint(2, 4)); series.Points.Add(new DataPoint(3, 6));This example creates a new series named "spline" and adds three points to the series, with x-coordinates of 1, 2, and 3, and y-coordinates of 2, 4, and 6, respectively. The AddPoint method is a part of the System.Web.UI.DataVisualization.Charting namespace, which is included in the System.Web.DataVisualization assembly.