GeoChart intermittent Problem

47 views
Skip to first unread message

AM

unread,
Feb 22, 2016, 6:38:20 PM2/22/16
to Google Visualization API
I continue to have an intermittent problem with GeoCharts.

Sometimes the chart works and sometimes it does not. This is the case with this chart even though nothing changes with the code or data. It will literally sometimes work on load and sometimes it does not.

Is there some type of timeout if a page takes to long to load that make the GeoChart not work?

Example:

http://www.towncharts.com/Texas/Demographics/Houston-city-TX-Demographics-data.html#Figure37

Code:
    var data37 = google.visualization.arrayToDataTable([['Region','Houston'],
		[{v:'150',f:'Europe'},0.04],
		[{v:'142',f:'Asia'},0.196],
		[{v:'002',f:'Africa'},0.045],
		[{v:'009',f:'Oceania'},0.002],
		[{v:'019',f:'Americas'},0.716]
		]);
		var formatterPec = new google.visualization.NumberFormat({pattern: '##%'});
var formatterPec1 = new google.visualization.NumberFormat({pattern: '##.#%'});
var formatterBar = new google.visualization.BarFormat({width: 60});formatterPec.format(data37,1);var options37 ={
'chartType':'GeoChart',
'containerId':'chart_div37',
'resolution':'continents',
'width':700,
'height':300,
'legend':{numberFormat:'#.#%'},
'colors':['#C5E6FC','#0A67A3'],
'chartArea':{width:"90%",height:"98%"}};

    var Table37 = new google.visualization.GeoChart(document.getElementById('chart_div37'));
    Table37.draw(data37, options37);

Sergey Grabkovsky

unread,
Feb 23, 2016, 10:06:18 AM2/23/16
to Google Visualization API
Hi,

You might be experiencing this bug. We recently released version 44, which should fix this issue. Keep in mind that we recently changed the way to load Google Charts, so you'll have to change that in your code as well. This new loading method currently doesn't support dynamic loading (for instance, using a ChartWrapper to load 'GeoChart' without specifying the 'geochart' package in your google.load call), so you'll have to make sure that all of the charts you use are explicitly loaded via google.charts.load.

--
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/58400bf2-85d3-4f05-a66c-c928ceea9ce3%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