I'm working on Google Charts
, but I came across a situation, and I'd like to know if I can do something like this:
var numero = 45;
var data = google.visualization.arrayToDataTable([
['Onyx', '<valor da var numero aqui>]
]);
I'm working on Google Charts
, but I came across a situation, and I'd like to know if I can do something like this:
var numero = 45;
var data = google.visualization.arrayToDataTable([
['Onyx', '<valor da var numero aqui>]
]);
Dude, 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 a parameter. Type pq has one brackets inside the other in method?
var numero = 45;
var data = ['Onyx', numero];
alert(data);