I donβt think you can add more than one callback.
Alternatively, you can define a callback in the load method, for example ...
google.load('visualization', '1.0', {'packages':['corechart'], 'callback': drawCharts}); function drawCharts() { drawAltitudeChart(); drawDisplacementChart(); drawDistanceChart(); }
EDIT
the load statement above is for a library older than ...
<script src="http://www.google.com/jsapi"></script>
according to release notes ...
The version of Google Charts that remains available through the jsapi bootloader is not constantly updated. From now on, you can use the new gstatic loader.
using the library new ...
<script src="https://www.gstatic.com/charts/loader.js"></script>
changes the load statement to ...
google.charts.load('current', {'packages': ['corechart'], 'callback': drawCharts});
EDIT 2
you can also load all the packages you need in a single load statement, like
instead...
google.charts.load('current', { 'packages': ['table'] }); google.charts.load('current', { 'packages': ['bar'] }); google.charts.load('current', { 'packages': ['pie'] }); // <-- 'pie' package does not exist google.charts.load('current', { 'packages': ['corechart'] }); google.charts.setOnLoadCallback(drawCharts);
he must be ...
google.charts.load('current', { callback: drawCharts, packages: ['bar', 'corechart', 'table'] });