这组代码显示的图是所有,没起筛选作用,帮忙看看哪里有问题
With Forms("报表").Controls("时段筛选") ‘ComboBox
Dim txt1 As String = .Value
If txt1 = "近一周"
Dim Chart As WinForm.Chart
Dim Series As WinForm.ChartSeries
Dim StartDate As new Datetime
StartDate= Date.Today.AddDays(-7)
Dim tbl As DataTable = DataTables("停机")
Dim lst As List(Of String) = tbl.GetValues("机器号","[申请时间] > # " & StartDate & " # ")
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(总耗时)","[机器号] = '" & lst(i) & "'")
Chart.AxisX.SetValueLabel(i, lst(i))
Next
Chart.AxisX.AnnoWithLabels = True
Series.DataLabelText = "{#YVAL}"
Chart.VisualEffect = True
End If
End With