Dim b2 As New GroupTableBuilder("统计表1", DataTables("订单"))
b2.Groups.AddDef("客户") \'
b2.Groups.AddDef("产品") \'
b2.Totals.AddDef("数量") \'
b2.Totals.AddDef("金额")
Tables("窗口2_Table1").DataSource = b2.BuildDataSource()
Dim Chart As WinForm.Chart \'
Dim Series As WinForm.ChartSeries \'
Dim t As Table = Tables("窗口2_Table1") \'
Chart = Forms("窗口2").Controls("Chart1") \'
Chart.VisualEffect = True \'
Chart.ChartType = ChartTypeEnum.Pie
\'Chart.DataSource = "窗口2_Table1" \'
Chart.SeriesList.Clear() \'
For Each r As Row In t.Rows
Series = Chart.SeriesList.Add() \'
Series.Length = 1 \'
Series.Text = r("产品") & "(" & r("数量") & ")" \'
Series.Y(0) = r("数量") \'
If r("产品") = "PD05" Then \'
Series.Offset = 20 \'
End If
Next
Chart.LegendVisible = True \'
Chart.LegendCompass = CompassEnum.East \'
图表数据乱?统计表没有那么多数据,图表上多出很多,如何解决?