本年,其余的自己参考着做
http://www.foxtable.com/help/topics/2720.htm
Dim y As Integer = Date.Today.Year
Dim dt1 As New Date(y, 1, 1)
Dim dt2 As New Date(y, 12, 31)
Dim Filter As String
Filter = "datee >= #" & dt1 & "# And datee <= #" & dt2 & "#"
Dim sql As String = "Select DATEE,number,number*price as [money] FROM {表A} where " & filter
Dim g As New groupTableBuilder("统计表11",sql)
g.Groups.AddDef("datee", "月")
g.Totals.AddDef("[money]", "", "money_值")
Tables("c_Table1").DataSource = g.BuildDataSource()
Dim Chart As WinForm.Chart '定义一个图表变量
Dim Series As WinForm.ChartSeries '定义一个图系变量
Dim t As Table = Tables("c_Table1")
Chart= e.Form.Controls("Chart1") ' 引用窗口中的图表
Chart.SeriesList.Clear() '清除图表原来的图系
Series = Chart.SeriesList.Add() '增加一个图系
Series.Length = t.Rows.Count '图系的数据点数等于表的行数
For i As Integer = 0 To t.Rows.Count - 1 '指定每个数据点的位置
Series.X(i) = t.Rows(i)("月") '指定水平坐标
Series.Y(i) = t.Rows(i)("money") '指定垂直坐标
Next
Chart.SeriesList(0).LineColor= Color.Red
Series.MarkColor = Color.GREEN