Dim Chart As WinForm.Chart
Dim Series As WinForm.ChartSeries
Dim tbl As DataTable = DataTables("停机处置")
Dim lst As List(Of String) = tbl.GetValues("机器号", "机器号 is not null")
Chart = e.Form.Controls("Chart1")
Chart.ChartType = ChartTypeEnum.Bar
Chart.SeriesList.Clear()
Series = Chart.SeriesList.Add()
Series.Length = lst.Count
For i As Integer = 0 To lst.Count - 1
Series.X(i) = i '指定水平坐标
Series.Y(i) = tbl.Compute("Avg(处置停机总耗时M)","[机器号] = '" & lst(i) & "'")
Chart.AxisX.SetValueLabel(i, lst(i))
Next