Is GeoChart Not working?

974 views
Skip to first unread message

AM

unread,
Apr 5, 2016, 1:20:28 PM4/5/16
to Google Visualization API
I updated code to make this work and that seemed to fix it until today.  Any ideas here?

http://www.towncharts.com/United-States-Demographics-data.html#Figure49

Here is my code:


    google.charts.setOnLoadCallback(drawTable49);
    function drawTable49() {
		
    var data49 = google.visualization.arrayToDataTable([['Region','United States'],
		[{v:'150',f:'Europe'},0.117],
		[{v:'142',f:'Asia'},0.292],
		[{v:'002',f:'Africa'},0.042],
		[{v:'009',f:'Oceania'},0.006],
		[{v:'019',f:'Americas'},0.542]
		]);
		var formatterPec = new google.visualization.NumberFormat({pattern: '##%'});
var formatterPec1 = new google.visualization.NumberFormat({pattern: '##.#%'});
var formatterBar = new google.visualization.BarFormat({width: 60});formatterPec.format(data49,1);var options49 ={
'chartType':'GeoChart',
'containerId':'bigchart_div49',
'resolution':'continents',
'width':700,
'height':300,
'legend':{numberFormat:'#.#%'},
'colors':['#C5E6FC','#0A67A3'],
'chartArea':{width:"90%",height:"98%"}};

    var Table49 = new google.visualization.GeoChart(document.getElementById('bigchart_div49'));
    Table49.draw(data49, options49);
  }

Daniel LaLiberte

unread,
Apr 5, 2016, 3:16:59 PM4/5/16
to Google Visualization API
Nothing has changed in Google Charts.  It is possible that the geo data fetched by Charts has changed.  

Could you say what you updated?  When did it work last time you know of?

--
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/a01e7d83-b364-4597-8a74-19949cdd9929%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--

AM

unread,
Apr 8, 2016, 6:51:06 AM4/8/16
to Google Visualization API
It just went back to working again. This chart data doesn't change. That's the wired thing. Nothing changes but the chart sometimes throws the error. Still seemed like if it takes too long to load it's a problem.

Daniel LaLiberte

unread,
Apr 8, 2016, 7:00:11 AM4/8/16
to Google Visualization API
That sounds like you have a timing problem in the page then.  Whether it throws an error depends on random aspects of how long various things take to load, for example.  

Maybe that is enough of a clue to go on, but otherwise you'll probably need to provide more details about your entire page so we have a chance of helping you.   Can you give us a link to the page?

On Fri, Apr 8, 2016 at 6:51 AM, AM <apmi...@gmail.com> wrote:
It just went back to working again.  This chart data doesn't change.  That's the wired thing.  Nothing changes but the chart sometimes throws the error.  Still seemed like if it takes too long to load it's a problem.
--
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.

For more options, visit https://groups.google.com/d/optout.

Anthony Milano

unread,
Sep 15, 2016, 9:24:32 AM9/15/16
to google-visua...@googlegroups.com
I continue to have trouble but only with the geochart not loading.

Here is the page: http://www.towncharts.com/Texas/Demographics/San-Antonio-city-TX-Demographics-data.html

Figure 37 is a geochart and it does not load for me.  Just says, "Requested map does not exist."  But I know that's not true.  Its a map of the US and works intermittently.

It must have something to do with too much delay.  I'm wondering if it would be better to generate an image of that chart instead and just show that.

Any thoughts?



On Fri, Apr 8, 2016 at 4:00 AM, 'Daniel LaLiberte' via Google Visualization API <google-visua...@googlegroups.com> wrote:
That sounds like you have a timing problem in the page then.  Whether it throws an error depends on random aspects of how long various things take to load, for example.  

Maybe that is enough of a clue to go on, but otherwise you'll probably need to provide more details about your entire page so we have a chance of helping you.   Can you give us a link to the page?
On Fri, Apr 8, 2016 at 6:51 AM, AM <apmi...@gmail.com> wrote:
It just went back to working again.  This chart data doesn't change.  That's the wired thing.  Nothing changes but the chart sometimes throws the error.  Still seemed like if it takes too long to load it's a problem.

--
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-visualization-api+unsub...@googlegroups.com.
To post to this group, send email to google-visualization-api@googlegroups.com.



--

--
You received this message because you are subscribed to a topic in the Google Groups "Google Visualization API" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-visualization-api/g-E13GmyGlE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-visualization-api+unsub...@googlegroups.com.
To post to this group, send email to google-visualization-api@googlegroups.com.

Anthony Milano

unread,
Oct 22, 2016, 2:06:46 PM10/22/16
to google-visua...@googlegroups.com
I hate to remove the geochart but its so unreliable. It sometimes loads and sometimes not for the exact same data/page:

http://www.towncharts.com/Alabama/Demographics/Jefferson-County-AL-Demographics-data.html#Figure37

Any new insights?

code for that chart (note that there are 47 total google charts on this page so maybe that's the problem?)

   google.charts.setOnLoadCallback(drawTable37);
    function drawTable37() {
		
    var data37 = google.visualization.arrayToDataTable([['Region','Jefferson County'],
		[{v:'150',f:'Europe'},0.072],
		[{v:'142',f:'Asia'},0.318],
		[{v:'002',f:'Africa'},0.078],
		[{v:'009',f:'Oceania'},0.002],
		[{v:'019',f:'Americas'},0.53]
		]);
		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);
  }


Any help greatly appreciated!


On Wed, Sep 14, 2016 at 4:54 PM, Anthony Milano <apmi...@gmail.com> wrote:
I continue to have trouble but only with the geochart not loading.

Here is the page: http://www.towncharts.com/Texas/Demographics/San-Antonio-city-TX-Demographics-data.html

Figure 37 is a geochart and it does not load for me.  Just says, "Requested map does not exist."  But I know that's not true.  Its a map of the US and works intermittently.

It must have something to do with too much delay.  I'm wondering if it would be better to generate an image of that chart instead and just show that.

Any thoughts?


On Fri, Apr 8, 2016 at 4:00 AM, 'Daniel LaLiberte' via Google Visualization API <google-visualization-api@googlegroups.com> wrote:
That sounds like you have a timing problem in the page then.  Whether it throws an error depends on random aspects of how long various things take to load, for example.  

Maybe that is enough of a clue to go on, but otherwise you'll probably need to provide more details about your entire page so we have a chance of helping you.   Can you give us a link to the page?
On Fri, Apr 8, 2016 at 6:51 AM, AM <apmi...@gmail.com> wrote:
It just went back to working again.  This chart data doesn't change.  That's the wired thing.  Nothing changes but the chart sometimes throws the error.  Still seemed like if it takes too long to load it's a problem.

--
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-visualization-api+unsubscr...@googlegroups.com.



--

--
You received this message because you are subscribed to a topic in the Google Groups "Google Visualization API" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-visualization-api/g-E13GmyGlE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-visualization-api+unsubscr...@googlegroups.com.

Daniel LaLiberte

unread,
Oct 24, 2016, 10:57:40 AM10/24/16
to Google Visualization API
Hi Anthony,

Sorry I didn't respond earlier, but I guess I don't have many more ideas.  

The error message you are seeing, "Requested map does not exist.", occurs when drawing the chart and it hasn't found an id for the map, such that it appears the map does not exist.  Since it does sometimes exist, it is clearly wrong to claim it does not exist.  Your code looks fine, but I wonder if the geochart code could have some problems that are exposed when things are very busy.  It could be that your page takes long enough to load and render all the charts that this causes some confusion.  If so, it might be better to wait to render the geochart until a few seconds later.  Just replace your google.charts.setOnLoadCallback(drawTable37) with google.charts.setOnLoadCallback(function() { setTimeout(drawTable37, 5000); });

Hope that helps.


To unsubscribe from this group and stop receiving emails from it, send an email to google-visualization-api+unsub...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Anthony Milano

unread,
Oct 25, 2016, 11:29:45 AM10/25/16
to google-visua...@googlegroups.com
That looks like it does the trick!  Thanks for your help.




--

--
You received this message because you are subscribed to a topic in the Google Groups "Google Visualization API" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-visualization-api/g-E13GmyGlE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-visualization-api+unsub...@googlegroups.com.

Daniel LaLiberte

unread,
Oct 25, 2016, 3:44:50 PM10/25/16
to Google Visualization API
Hi Anthony,

Well, I am happy to hear the delay works for you, but not so happy to verify that it is a timing problem.  Maybe I will have to build in a couple automatic retries when the id comes up null, in addition to the retries that it is already doing.

On Tue, Oct 25, 2016 at 11:29 AM, Anthony Milano <apmi...@gmail.com> wrote:
That looks like it does the trick!  Thanks for your help.
To unsubscribe from this group and all its topics, send an email to google-visualization-api+unsubscr...@googlegroups.com.

--
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-visualization-api+unsub...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages