Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

passing a parameter to a callback function in google Visualizations

This is how google Visualization examples are.

google.load("visualization", "1", {packages:["table"], callback: drawVisualization});

or

google.load('visualization', '1', {'packages':['corechart']});
google.setOnLoadCallback(drawVisualization);

How can I pass a parameter to the callback function drawVisualization?

like image 559
Elzo Valugi Avatar asked Dec 16 '10 10:12

Elzo Valugi


1 Answers

google.setOnLoadCallback(function() {
    drawVisualization(your_parameter);
});
like image 86
Björn Avatar answered Sep 28 '22 01:09

Björn