Tables("测试").Filter = "[股piao名称] = '贵州燃气'"
With Tables("测试").Filter
Dim Chart As WinForm.Chart '定义一个图表变量
Dim Series As WinForm.ChartSeries '定义一个图系变量
Dim t As Table = Tables("测试") '定义一个变量t引用数据表
Chart= Forms("窗口1").Controls("Chart1") ' 引用窗口中的图表
Chart.ChartType = ChartTypeEnum.Candle '设置图表类型
Chart.AxisX.DateType = True '明确指定X轴是日期型
Chart.AxisX.AnnoFormatString = "MM-dd" '制定日期表示格式
Chart.AxisY.Text = "价格"
Chart.SeriesList.Clear() '清除图表原来的图系
Series = Chart.SeriesList.Add() '增加一个图系
Series.LineColor = Color.Blue '设置该图系的颜色
Chart.DataSource = "Tables('测试').Filter "
Series.X.DataField = "时间"
Series.Y.DataField = "最高"
Series.Y1.DataField = "最低"
Series.Y2.DataField = "开盘"
Series.Y3.DataField = "收盘"
End With