Rss & SiteMap

Foxtable(狐表) http://www.foxtable.com

新一代数据库软件,完美融合Access、Foxpro、Excel、vb.net之优势,人人都能掌握的快速软件开发工具!
共2 条记录, 每页显示 10 条, 页签: [1]
[浏览完整版]

标题:图表数据乱?

1楼
lin98 发表于:2024/3/29 16:37:00

图片点击可在新窗口打开查看此主题相关图片如下:图表数据乱.png
图片点击可在新窗口打开查看


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 '

图表数据乱?统计表没有那么多数据,图表上多出很多,如何解决?
2楼
有点蓝 发表于:2024/3/29 16:39:00
Dim b2 As New GroupTableBuilder("统计表1", DataTables("订单"))
b2.Groups.AddDef("产品") '
b2.Totals.AddDef("数量") '
b2.Totals.AddDef("金额") 

Tables("窗口2_Table1").DataSource = b2.BuildDataSource() 
共2 条记录, 每页显示 10 条, 页签: [1]

Copyright © 2000 - 2018 foxtable.com Tel: 4000-810-820 粤ICP备11091905号

Powered By Dvbbs Version 8.3.0
Processed in .03125 s, 2 queries.