Dim Series2 As WinForm.ChartSeries \'定义一个图系变量
Chart.SeriesList2.Clear() \'清除图表原来的图系
Series2 = Chart.SeriesList2.Add() \'增加图系2
Chart.AxisY2.Text = "金额"
Chart.AxisY2.Min = 0 \'指定Y轴的最小值
Chart.AxisY2.Max = 60000 \'指定Y轴的最大值
Series2.LineColor = Color.Blue \'连接线的颜色
Series2.LineThickNess = 0.5 \'连接的粗细
Series2.MarkShape = MarkShapeEnum.Dot \'数据点的形状
Series2.MarkColor = Color.Green \'数据点的颜色
Series2.MarkSize = 3 \'标记点大小
For i As Integer = 2 To Xi+1 \'逐个年月设置坐标
Series.X(i) = i \'指定水平坐标
Series2.X(i) = i \'指定水平坐标
Dim Ary As String() = Arys(i-2)
Dim r As DataRow = DataTables(tbn).Find("供应商 = \'" & Tables(tbn2).Current("供应商") & "\' and 年 = " & Ary(0) & " and 月 = " & Ary(1)) \'找出对应年月的行
If r IsNot Nothing \'如果找到对应年月的行
Series.Y(i) = r("数量") \'指定数量作为垂直坐标
Chart.AxisX.SetValueLabel(i,Ary(0) & "-" & Ary(1)) \'指定字符表示
Series2.Y2(i) = r("金额") \'指定数量作为垂直坐标
Else
Series.Y(i) = 0
Series2.Y2(i) = 0
End If
Next