-- 作者:lur320
-- 发布时间:2016/11/5 12:26:00
-- 制作图表求助
我使用帮助里面的代码进行制作图表,发现如下错误:
先上代码
Dim Chart As WinForm.Chart
Dim Series As WinForm.ChartSeries
Chart= Forms("chart").Controls("Chart1")
Chart.SeriesList.Clear()
For Each chart_series As String In DataTables("chart_opti").GetValues("Freightmethod") MessageBox.Show(chart_series) Series = Chart.SeriesList.Add()
Series.Text = chart_series Series.Length = 12
Chart.AxisX.Min = 1
Chart.AxisX.Max = 12 For Chart_wt As Double = 1 To 12 Step 1 Series.X(Chart_wt) = Chart_wt Dim r As DataRow = DataTables("chart_opti").Find("[Freightmethod]= " & chart_series & " And [chargeWT] = " & Chart_wt)
If r IsNot Nothing Series.Y(Chart_wt) = r("cost")
End If Next
Next
错误截屏如下,主要为没有找到[AIR]这个列? 此主题相关图片如下:捕获.png
|