老师,以下是代码,我将字体改小了,就可以全部显示出来,应该是字体太大而导致的,但是字体必须要这么大,有没有什么办法解决呢?
Dim tb As Table = Tables(e.Form.Name & "_Table1")
Dim dt As DataTable = tb.DataTable
Dim g As New GroupTableBuilder("统计表1", dt)
g.Groups.AddDef("Sum")
g.Totals.AddDef("单据编号", AggregateEnum.Count)
g.Totals.AddDef("返工人数")
g.Totals.AddDef("返工工时")
g.Totals.AddDef("人力成本")
g.Totals.AddDef("物料费用")
g.Totals.AddDef("总费用")
Tables(e.Form.Name & "_Table2").DataSource = g.BuildDataSource
Dim tb3 As Table = Tables(e.Form.Name & "_Table3")
Dim g1 As New GroupTableBuilder("统计表2", dt)
g1.Groups.AddDef("责任部门")
g1.Totals.AddDef("责任人", AggregateEnum.Count,"责任次数")
g1.Totals.AddDef("总费用")
g1.GrandProportion = True
tb3.DataSource = g1.BuildDataSource
tb3.Sort = "总费用gdr"
tb3.SetColVisibleWidth("责任部门|73|责任次数|61|总费用|55|总费用gdr|83")
Dim Series As WinForm.ChartSeries \'定义一个图系变量
Dim Chart As WinForm.Chart = e.Form.Controls("Chart1")
Chart.VisualEffect = True \'加上这一行,让你的图表更漂亮
Chart.ChartType = ChartTypeEnum.Pie \'图表1类型改为Bar(条形)
Chart.SeriesList.Clear() \'清除图表原来的图系
Chart.VisualEffect = True
For Each r As Row In tb3.Rows
Series = Chart.SeriesList.Add() \'增加一个图系
Series.Length = 1 \'一个系列只能包括一个值
Series.Text = r("责任部门") \'设置图系的标题
Series.Y(0) = r("总费用gdr") \'指定值
Series.DataLabelText = r("责任部门") & Math.Round(r("总费用gdr")*100,2) & "%" \'计算百分比
Next
Chart.LegendVisible = True \'显示图列
Chart.LegendCompass= CompassEnum.East \'图列显示在东方(右方)