[GeoChart] Small countries

88 views
Skip to first unread message

Diogo Ribeiro

unread,
Jun 1, 2015, 6:28:01 AM6/1/15
to google-visua...@googlegroups.com
Hi guys,

I'm using GeoChart to display some data. My situation is for really small countries like Cape Verde Islands which aren't visible.

I'm using:

function drawRegionsMap() {
       
var data = new google.visualization.DataTable();
        data
.addColumn('string', 'Code');
        data
.addColumn('string', 'Country');
        data
.addColumn('number', 'P1');
        data
.addColumn('number', 'P2');
        data
.addRows([                    
                   
['CV','Cape Verde', 272172, 23625],                        
                   
['US','USA', 7746, 676]
       
]);

     
var options = {
        region
: 'world',
        resolution
: 'countries',
        backgroundColor
: '#B3D1FF',
        minValue
: 0,  colors: ['#A1FF8E', '#008042']
     
};                      

     
var chart = new google.visualization.GeoChart(document.getElementById('chart_div'));
      chart
.draw(data, options);
};

Is it possible to force onMouseOver to Cape Verde?

Thanks in advance.

Sergey Grabkovsky

unread,
Jun 1, 2015, 9:48:20 AM6/1/15
to google-visua...@googlegroups.com
Hi Diogo,

I'm not quite sure what you mean by "force onMouseOver to Cape Verde", but the rest of your problem sounds like a common issue. This is generally handled by providing a way of zooming into an area (continent and subcontinent 'region's are probably best), but we do intend to solve this eventually somehow.

--
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 http://groups.google.com/group/google-visualization-api.
For more options, visit https://groups.google.com/d/optout.

Diogo Ribeiro

unread,
Jun 2, 2015, 3:50:49 AM6/2/15
to google-visua...@googlegroups.com
Thanks for your answer Sergey.

Let me rephrase the question: using region world, how can I show Cape Verde?

--
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/5GVNtQXzIes/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-visualizati...@googlegroups.com.

Sergey Grabkovsky

unread,
Jun 2, 2015, 11:37:35 AM6/2/15
to google-visua...@googlegroups.com
You could accomplish this by using 'markers' mode. If you do that, all your data will show up as circles, so it wouldn't matter if the area is small or large.

Diogo Ribeiro

unread,
Jun 3, 2015, 5:10:28 AM6/3/15
to google-visua...@googlegroups.com
Is there any other possibility, like displaying the names of the countries outside the chart, and when the user clicks on a country name, the popup appears in the chart?

Sergey Grabkovsky

unread,
Jun 3, 2015, 10:50:05 AM6/3/15
to google-visua...@googlegroups.com
I'm not sure what you mean by "displaying the names of the countries outside the chart". You can certainly have a list of countries outside of the chart (if you make it yourself using HTML), and redraw the chart with the selected area zoomed in. Or perhaps change the color of a marker. Could you better describe what you're trying to accomplish?

Diogo Ribeiro

unread,
Jun 3, 2015, 11:06:22 AM6/3/15
to google-visua...@googlegroups.com
I need to use displayMode regions. What's the best way so user can
select small countries?

Sergey Grabkovsky

unread,
Jun 3, 2015, 11:45:22 AM6/3/15
to google-visua...@googlegroups.com
I think that the best way would be to let the user navigate down into different continents/sub continents. There isn't any way to show small countries at world resolution.
Reply all
Reply to author
Forward
0 new messages