
Accessing MSChart DataGrid.GetData function from client-side VBScript
I have spent hours trying to get this to work. This is from an HTML file
that displays an MSChart in an IE browser. When someone clicks on a data
point on the chart, it is supposed to read the value of the data point and
pop up a window telling you what it is. Here is the simple code:
Private Sub MSChart_PointSelected(Series, DataPoint, MouseFlags, Cancel)
MSChart.DataGrid.GetData DataPoint, Series, GetData, nullFlag
Alert GetData
End Sub
The problem is I get this when you click on a data point:
Error: Type mismatch: 'MSChart.DataGrid.GetData'
Looking at MSDN, the DataGrid.GetData function accepts the DataPoint and
Series values (as integers), and returns GetData (as double) and nullFlag
(as integer).
Doing some testing, it seems the problem is with GetData (the double). No
matter what I do, I cannot get it to return a value without a type mismatch
error. I tried these with no luck:
GetData = cDbl(0)
MSChart.DataGrid.GetData DataPoint, Series, GetData, nullFlag
and
MSChart.DataGrid.GetData DataPoint, Series, cDbl(GetData), nullFlag
Does anyone have any suggestions at all? I'm at a total loss.