Chart

クラス階層

  • System.ComponentModel.Component
    • System.Windows.Forms.Control
      • System.Windows.Forms.DataVisualization.Charting.Chart

プロパティ

Series

データのポイントとその属性を格納します。Chart.Series プロパティ (System.Windows.Forms.DataVisualization.Charting) | MSDN

Series series1 = new Series();
DataPoint dataPoint1 = new DataPoint(1, 10);
DataPoint dataPoint2 = new DataPoint(2, 15);
DataPoint dataPoint3 = new DataPoint(3, 25);

Series series2 = new Series();
DataPoint dataPoint4 = new DataPoint(1, 20);
DataPoint dataPoint5 = new DataPoint(2, 30);
DataPoint dataPoint6 = new DataPoint(3, 10);


series1.ChartArea = "ChartArea1";
series1.Legend = "Legend1";
series1.Name = "Series1";
series1.Points.Add(dataPoint1);
series1.Points.Add(dataPoint2);
series1.Points.Add(dataPoint3);

series2.ChartArea = "ChartArea1";
series2.Legend = "Legend1";
series2.Name = "Series2";
series2.Points.Add(dataPoint4);
series2.Points.Add(dataPoint5);
series2.Points.Add(dataPoint6);


this.chart.Series.Add(series1);
this.chart.Series.Add(series2);
MSDN (Microsoft Developer Network) から検索