Hi everyone!I I will be very grateful if somebody can help
This part of code works.i am getting what i need. I can alert numbers from table column
1
2
3
4
[code]
var table2 = document.getElementById(‘tableMain’);
for (var i = 0; i < table2.rows.length; i++) {
var row2 = “”;
for (var j = 0; j < table2.rows[i].cells.length; j++) {
row2 += table2.rows[i].cells[j].innerHTML;
}
alert(row2);
// hire i get a numbers for example
/*
1
2
3
4
*/
}
When i try to do like this, i get only last number. Number 4
[code]
var data1 = google.visualization.arrayToDataTable([
[‘Time’, ‘kWh’],
[row2, options1], // hire i get only last number and that is 4 but i need 1 2 3 4
]);
In this block no problem. I can graph array if i type
[‘1 2 3 4’, 10000],
[‘5 6 7 8’, 20000],
[code]
var data1 = google.visualization.arrayToDataTable([
[‘Time’, ‘kWh’],
[‘1 2 3 4’, 10000],
[‘5 6 7 8’, 20000],
]);
var chart = new google.visualization.AreaChart(document.getElementById(‘chart_div’));
chart.draw(data1, options1);
“option1” will act same only with different numbers wen i get this “row2” done.
This is only example but “row2” in reality contains very long list of numbers and i can only get a last one
Thank you for any help.