Is it possible to have a variable array of points in a line or bar
chart?
Your code example shows
var data = new google.visualization.arrayToDataTable ([
['heading1','heading2'],
[data point, datapoint],
[data point, datapoint]
]);
All of the points are hard coded, but I don't know how many points I'm
going to have. It could be any where from 0-96.
I have successfully passed in arrays so it reads as
['heading1', 'heading2'],
[arr1[0],arr2[0]],
[arr1[1],arr2[1]]
]);
and so forth but I'm having to build ridiculously large case
statements to handle the arrays so i don't get errors.
I tried building in a for next loop for the array elements, but I'm
getting syntax errors on that as well.
Here is my code with the loop that is giving syntax errors:
var data = new google.visualization.arrayToDataTable([
['Time','Count'],
for (var n=0;n<96;n++)
{
[arr2[n], parseInt(arr[n]) ],
}
[arr2(mycount),parseInt(arr[mycount])]
]);
--
You received this message because you are subscribed to the Google Groups
"Google Visualization API" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-visualization-api?hl=en.