0
I’m touching the Google Charts
, but I came across a situation, and I was wondering if you could do something like in the example:
var numero = 45;
var data = google.visualization.arrayToDataTable([
['Onyx', '<valor da var numero aqui>]
]);
0
I’m touching the Google Charts
, but I came across a situation, and I was wondering if you could do something like in the example:
var numero = 45;
var data = google.visualization.arrayToDataTable([
['Onyx', '<valor da var numero aqui>]
]);
0
Guy just pass the variable number inside the vector as Roberto de Campos said, what you have to see is what google.visualization.arrayToDataTable()
can receive as parameter. Type pq has a bracket inside the other in the method?
var numero = 45;
var data = ['Onyx', numero];
alert(data);
I discovered the bug. Missed giving a parserInt(). But thanks for the feedback, folks <3 solved
Browser other questions tagged javascript array google-charts
You are not signed in. Login or sign up in order to post.
Wouldn’t that be:
var data = google.visualization.arrayToDataTable([
 ['Onyx', numero],
]);
?– Roberto de Campos
I edited it. I didn’t have that comma at the end but it didn’t work
– Alex Lupóz
You can report the error you are presenting?
– Sam