'Imports System.Windows.Forms.DataVisualization.Charting Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button2.Click Chart1.Series.Clear() '既存の Series をクリアする場合 Dim s As Series '方法1 ' ''既存の Series を取得する場合(デザイン時に設定しておくなど) ''s = Chart1.Series("Series2") ' '新規に作成する場合 s = Chart1.Series.Add("Series2") s.ChartType = SeriesChartType.Line ' s.Points.Add(New DataPoint(400.0, 750.0)) s.Points.Add(New DataPoint(420.0, 800.0)) s.Points.Add(New DataPoint(440.0, 850.0)) s.Points.AddXY(340.0, 900.0) s.Points.AddXY(330.0, 950.0) s.Points.AddXY(320.0, 1000.0) '方法2:データを割り当ててから s = New Series() s.ChartType = SeriesChartType.Line s.Name = "Series1" s.Points.Add(New DataPoint(500.0, 200.0)) s.Points.Add(New DataPoint(510.0, 300.0)) s.Points.Add(New DataPoint(520.0, 400.0)) s.Points.AddXY(550.0, 500.0) s.Points.AddXY(560.0, 600.0) s.Points.AddXY(570.0, 700.0) Chart1.Series.Add(s) End Sub