The first parameter to ChartXvsY should be one-dimensional array and the second parameter should be a two-dimensional array. For example, here's how you would chart 4 arrays of random Y values against a single array of X values:
Dim xData(49) As Double
Dim yData(3, 49) As Double
Dim i As Integer
For i = 0 To 49
xData(i) = i
yData(0, i) = (Rnd() * 10)
yData(1, i) = (Rnd() * 10) + 10
yData(2, i) = (Rnd() * 10) + 20
yData(3, i) = (Rnd() * 10) + 30
Next
CWGraph1.ChartXvsY xData, yData
- Elton