GeoCharts Example of use

3,062 views
Skip to first unread message

sylvainhugues

unread,
Jan 19, 2012, 3:16:44 AM1/19/12
to Google Visualization API
Bonjour,

I just created a GeoMedia analyser : www.whoaboutwho.com with Geo
Chart.
I managed to color countries in Green gradients and the concerned
country in pure orange (using negative value).

I still got problems on Firefox and Opera when clicking on countries,
so I disactivated it. Very weird since the same DataTable displays
well when forcing with JS code, but not when clicking (Visualisation
click event).

Looking forward your feedback and your use of charts.

A bientôt, Sylvain.

asgallant

unread,
Jan 19, 2012, 11:31:21 AM1/19/12
to google-visua...@googlegroups.com
If you post a version where it is not disabled in FF/Opera, I can try to figure out what it wrong.

sylvainhugues

unread,
Jan 19, 2012, 12:41:30 PM1/19/12
to google-visua...@googlegroups.com
Hi,
I just get nothing when clicking, GeoChart and PieChart don t display anything and I get red warning "Your browser does not support charts".
Obviously the problem comes from the click event.
I won t see anything online since JS is compiled y Google API, and there s a lot of interdependant files for this tool...
Thxxx

asgallant

unread,
Jan 19, 2012, 1:59:19 PM1/19/12
to google-visua...@googlegroups.com
I skimmed the code, and I would guess that the problem is due to creating the event listener after drawing the chart, instead of before.  Try moving this code block:

google.visualization.events.addListener(geoChart, "regionClick", function (eventData) {
    var countryISO2 = eventData["region"];
    inputCountryToValUpCase = "world";
    displaySearchResults(countryISO2, inputCountryToValUpCase); 
});

to right before you call geoChart.draw().

sylvainhugues

unread,
Jan 20, 2012, 10:37:27 AM1/20/12
to google-visua...@googlegroups.com
Hi, thanks asgallant for your "galanterie",
tried but still same issue.
I made an all browser clickable version :
http://www.tapiocadesign.com/who-about-who/index_clickAllBrowsers.php
I've read a few articles about that "
Your browser does not support charts
"
warning, but haven t figured out what s the real cause.
Thanks, S.

asgallant

unread,
Jan 20, 2012, 11:50:39 AM1/20/12
to google-visua...@googlegroups.com
Hmmm....I see you hide the 'geoChartContainer' div after calling geoChart.draw().  Charts sometimes have problems drawing in hidden containers (which could be happening here, because drawing is asynchronous).  If you put the hide and show calls in a 'ready' event handler for the chart, that will eliminate the one possible issue:

google.visualization.events.addListener(geo'ready'function({
    $('#geoChartContainer').hide();
    $('#geoChartContainer').fadeIn(800function({});
});
geo.draw(dataTableGeo{
    'width'1200,
    'height'750,
    'region''world',
    colorAxiscolorObject,
    // colorAxis: {values: [-1, instancesLowestValue, instancesHighestValue]},
    'backgroundColor''none'
});

If that doesn't fix the problem, try building a simpler version of the page that still produces the error.

sylvainhugues

unread,
Jan 21, 2012, 7:14:57 PM1/21/12
to google-visua...@googlegroups.com
Still not, the red Google warning "Browser does not support charts" don't rely to a showing/hiding matter. I've red that its more a security issue, Google API raises a security error... but it's very obscure. Merci, S.

ChartALot

unread,
Jan 24, 2012, 8:09:14 AM1/24/12
to google-visua...@googlegroups.com
Hi,
I would like to see the issue and help, but I cannot access the links provided above. Can you provide a simple example that reconstructs the issue?
Thanks.

On Sun, Jan 22, 2012 at 2:14 AM, sylvainhugues <in...@tapiocadesign.com> wrote:
Still not, the red Google warning "Browser does not support charts" don't rely to a showing/hiding matter. I've red that its more a security issue, Google API raises a security error... but it's very obscure. Merci, S.

--
You received this message because you are subscribed to the Google Groups "Google Visualization API" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-visualization-api/-/23q_cFMYDo4J.

To post to this group, send email to google-visua...@googlegroups.com.
To unsubscribe from this group, send email to google-visualizati...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-visualization-api?hl=en.

sylvainhugues

unread,
Jan 24, 2012, 8:15:29 AM1/24/12
to google-visua...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages