Dim Chart As WinForm.Chart '定义一个图表变量
Dim Series As WinForm.ChartSeries '定义一个图系变量
Dim t As Table = Tables("门店产值") '定义一个变量t引用数据表
Chart = e.Form.Controls("Chart2") ' 引用窗口中的图表
Chart.ChartType = ChartTypeEnum.xyplot
'图表类型改为Bar(条形)
Chart.SeriesList.Clear() '清除图表原来的图系
t.filter = "门店名称 = '永吉地板'"
if t.rows.count = 0 then return
For r As Integer = 0 To t.Rows.Count - 1
Series = Chart.SeriesList.Add() '增加一个图系