| ■No86333 (mako さん) に返信
サンプルです。
_tbl = New DataTable()
With _tbl.Columns
.Add("t", GetType(DateTime))
.Add("y", GetType(Integer))
End With
With _tbl.Rows
.Add(Date.Today.AddHours(10).AddMinutes(15), 1)
.Add(Date.Today.AddHours(10).AddMinutes(20), 2)
.Add(Date.Today.AddHours(11).AddMinutes(15), 3)
.Add(Date.Today.AddHours(13).AddMinutes(15), 4)
.Add(Date.Today.AddHours(13).AddMinutes(20), 5)
End With
Chart1.DataSource = _tbl
With Chart1.ChartAreas(0)
With .AxisX
.Minimum = Date.Today.ToOADate
.Maximum = Date.Today.AddDays(1).ToOADate
.IntervalType = DataVisualization.Charting.DateTimeIntervalType.Minutes
.Interval = 30
With .LabelStyle
.IntervalType = DataVisualization.Charting.DateTimeIntervalType.Minutes
.Interval = 30
.Format = "HH:mm"
End With
End With
End With
With Chart1.Series(0)
.XValueMember = "t"
.YValueMembers = "y"
End With
|