I need some help with Google API data array creation. See the details below: I have the below arrays which I am creating dynamically.
schoolYear = [ 2014,2015,];
schoolReading = [420.5,520.5,];
schoolWriting = [436.5,536.5,];
schoolSpelling = [425.1,525.1,];
schoolNumeracy = [395.5,495.5,];
schoolGramPunc = [436,536,];
schoolTotAvg = [437,537,];
I am trying to create google.visualization.arrayToDataTable like this:
for (i = 0; i < schoolTotAvg.length; i++) {
var data = google.visualization.arrayToDataTable([
['Year', 'Reading', 'Numeracy', 'Grammar/Punctuation', 'Writing', 'Spelling', 'Total Average'],
[schoolYear, schoolReading, schoolNumeracy, schoolGramPunc, schoolWriting, schoolSpelling, schoolTotAvg]
]);
}
I am not getting correct array when I see the page source.
Can someone please help?
--Pankaj
I found the solution :-)