I am trying to make a line chart, but Google Charts keeps throwing this error when I try to add a row of data:
Error: Every row given must be either null or an array. @ ...corechart.I.js:162
Here are some example columns I tried. Making the columns works fine, and displays an empty graph as long as I don't add any rows.
var data = new google.visualization.DataTable();
data.addColumn('number', 'timestamp');
data.addColumn('number', 'JPY');
data.addColumn('number', 'EUR');
data.addColumn('number', 'SEK');
data.addColumn('number', 'HKD');
data.addColumn('number', 'CHF');
//So far so good
Now, no matter how I try to pass an array with addRows(), I get the error. I have found similar questions here, but they've all failed for reasons of malformed code or used a different methodology to pass the code in. So here is a simplified test case, which still fails.
data.addRows([1,2,3,4,5,6]); //Breaks the chart
I also tried:
var myrow = new Array(1,2,3,4,5,6);
data.addRows(myrow);
I don't see how I can make this any more literally an array. I also passed two at once, because all the example code seems to pass multiple rows.
data.addRows([1,2,3,4,5,6],
[7,8,9,10,11,12]);
Still fails.