Re: [visualization-api] Geochart type error

41 views
Skip to first unread message

Sergey Grabkovsky

unread,
Mar 1, 2016, 9:41:46 AM3/1/16
to Google Visualization API
Hi Nick,

It looks like you forgot to include the /jsapi script on your page. For the time being, it's still necessary to enable geocoding on the GeoChart (which is enabled via google.load). Let me know if that doesn't fix your issue.

On Mon, Feb 29, 2016 at 8:02 PM <dunba...@gmail.com> wrote:
Hi, 

I've started getting this error when I run Geochart. I didnt see it when I ran the same code earlier today: 

TypeError: google.load is not a function. (In 'google.load(xd,Ma,{callback:b,other_params:a})', 'google.load' is undefined)
wda
create
cPa
(anonymous function)
(anonymous function)
SOa
(anonymous function)countries_en.js:5
(anonymous function)countries_en.js:6

I'm running it off this code: 

 <script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script>
<script type="text/javascript">
google.charts.load('43', {packages: ['treemap','corechart','geochart', 'controls']});
google.charts.setOnLoadCallback(drawChart);

var geoTable = new google.visualization.DataTable();
geoTable.addColumn('string', 'Country');
geoTable.addColumn('number', label2);
geoTable.addColumn({type:'string', role:'tooltip'});

var chart = new google.visualization.ChartWrapper({
        chartType: 'GeoChart',
        containerId: 'chart_div',
        dataTable: geoTable,
        options: {
//region: '150',
colorAxis: {colors: ['#00853f', 'lightyellow', '#e31b23']},
legend: {numberFormat: '##.##%'},
tooltip: {
            isHtml: true
        }
  }
    });

chart.draw();
<div id="chart_div" style="width: 900px; height: 600px;"></div>
    </div>


All help appreciated
Nick 

--
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 post to this group, send email to google-visua...@googlegroups.com.
Visit this group at https://groups.google.com/group/google-visualization-api.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-visualization-api/6ac42910-900d-402c-8645-0cbde9922dca%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--

unnamed.gif

Sergey Grabkovsky

Software Engineer

Google, Inc

gra...@google.com


Reply all
Reply to author
Forward
0 new messages