You called the draw() method with the wrong type of data rather than a DataTable or DataView

553 views
Skip to first unread message

srikanth athaluri

unread,
May 19, 2020, 10:09:13 PM5/19/20
to Google Visualization API
We are using:

<script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script>


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

google.load('visualization', '1', { packages: ['gauge'] });*/


google.charts.load('current', { 'packages': ['corechart'] });
        google.charts.load('current', { 'packages': ['table'] });
        google.charts.load('current', { 'packages': ['gauge'] });

 google.charts.setOnLoadCallback(drawChart);

  google.charts.setOnLoadCallback(drawBar);

Everything works fine, but recently we started getting the error :

You called the draw() method with the wrong type of data rather than a DataTable or DataView.

for the Table Charts, the rest of the Charts still work one. After a day without any changes the Table chart works fine again.

Daniel LaLiberte

unread,
May 19, 2020, 10:17:47 PM5/19/20
to Google Visualization API
I suggest you replace all of your google.load and google.charts.load calls with just one:

  google.charts.load('current', { 'packages': ['corechart', 'table', 'gauge'] } );

With multiple calls, the loader might be getting confused.

--
You received this message because you are subscribed to the Google Groups "Google Visualization API" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-visualizati...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-visualization-api/811031c4-fd68-40f6-a6bc-c66fc89a6d91%40googlegroups.com.


--
Reply all
Reply to author
Forward
0 new messages