it-works!
unread,Mar 1, 2012, 10:02:32 AM3/1/12Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Google Visualization API
Hi,
I'm trying to change the content of some variables passing it through
the function but I get errors no matter what I pass.. for example:
<script type="text/javascript">
//getting my data outside of the draw function...
var mydata = google.visualization.arrayToDataTable([["Name", "Gender",
"Age", "Donuts eaten"],["David", "Male", 34, 20],["Lisa", "Female",
23, 7]]);
//I would like to pass it to the function...
function drawVisualization(getData) {
// Prepare the data
var data = getData;
data;
//replacing the standard:
/*
var data = google.visualization.arrayToDataTable([
['Name', 'Gender', 'Age', 'Donuts eaten'],
['Michael' , 'Male', 12, 5],
['Elisa', 'Female', 20, 7],
['Robert', 'Male', 7, 3],
['John', 'Male', 54, 2],
['Jessica', 'Female', 22, 6],
['Aaron', 'Male', 3, 1],
['Margareth', 'Female', 42, 8],
['Miranda', 'Female', 33, 6]
]);
//by calling:
google.setOnLoadCallback(drawVisualization(mydata)); <-- seems like
I can't pass any variables here?
thanks for any help...