Click here to Skip to main content
14,881,640 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hello,

I am currently expericing the an error (Uncaught TypeError: undefined is not a function ) on the following line of code. I added 'LoadCallBack' code line but I cannot seem to solve.

JavaScript
google.setOnLoadCallback(drawVisualization);

            new google.visualization.Dashboard(document.getElementById('PieChartExample')).bind([categoryPicker], [pie, table]).draw(data);



Any suggestion or help would be very much appreciated.
Many thanks.
Posted
Updated 16-Jan-14 0:26am
v2

1 solution

google.visualization.Dashboard is undefined because the controls package has not been loaded.

So also include controls in the packages to load, like so
JavaScript
google.load('visualization', '1', { packages: ['corechart', 'controls'] });


That should fix it.
   
Comments
miss786 16-Jan-14 6:26am
   
Thank you so much for your help.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900