请教:
1. 图表中列1,列2重命名代码怎么写?
2. 列1,列2是单精度一位小数,图系中却显示了多位小数,如何在图系中只显示一位小数?
Dim Chart5 As WinForm.Chart
Dim Series5 As WinForm.ChartSeries
Dim t5 As Table = Tables("表A")
Chart5 = Forms("窗口1").Controls("Chart5")
Chart5.ChartType = ChartTypeEnum.Bar
Chart5.SeriesList.Clear()
Chart5.AxisX.ClearValueLabel
For Each c5 As Col In t5.cols
Select Case c5.Name
Case "列1","列2"
Series5 = Chart5.SeriesList.Add()
Series5.Text = c5.Name
Series5.Length = 9
Dim td5 As Date = new Date(Date.Today.Year, Date.Today.Month, 1)
For i5 As Integer = 0 To 8
Dim d5 = td5.AddMonths(-i5)
Series5.X(i5) = i5
Series5.Y(i5) = val(t5.Compute("Sum(" & c5.Name & ")", "车间 = '" & cj5.text & "' and 日期 >= #" & d5 & "# and 日期 < #" & d5.AddMonths(1) & "#"))
Chart5.AxisX.SetValueLabel(i5, Format(d5, "yyyy-MM"))
Series5.DataLabelText = "{#YVAL}"