Zooming into Geocharts

3,195 views
Skip to first unread message

Valentino Di Donato

unread,
Mar 19, 2013, 10:16:25 AM3/19/13
to google-visua...@googlegroups.com
Hello,

I managed to zoom into regions in this way 

                $('[name=region]:radio').click(function () {
                    options.region = $('[name=region]:radio:checked').attr('value');
                    chart.draw(result, options);
                });

The problem is that when I zoom in Europe for instance, all the countries outside Europe (Turkey for example) have no longer data and they are colored using the "datalessRegionColor"...for some reason.

How can I obtain a correct zoom on continents keeping the neighborhood on the correct visualisation?
Why does this happen? If I zoom for countries everything's fine....but on maxi areas, I have this problem.
Is it only me? Is it fixable somehow?

Cheers,
Valentino

Valentino Di Donato

unread,
Mar 19, 2013, 11:07:54 AM3/19/13
to google-visua...@googlegroups.com
Ok apparently this is a bug.
When you zoom into areas with continent codes....you loose the data for the sorrounding countries...good to know.

Thomas Rybka

unread,
Mar 19, 2013, 11:19:24 AM3/19/13
to google-visua...@googlegroups.com
Do you have a reproducible example or DataTable I could look at? 

I'm curious what your options are set to, and the 'result' DataTable that you draw look like.



Thomas Rybka | Software Engineer | try...@google.com | GViz


--
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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Valentino Di Donato

unread,
Mar 19, 2013, 11:27:54 AM3/19/13
to google-visua...@googlegroups.com
I don't have an online example.
Here are my options:

                    var options = {
                        displayMode: 'regions',
                        colorAxis: {colors: ['#33FF00','#008000']},
                        datalessRegionColor: 'red'
                    };


Here are my radio buttons (their listener is on the first message).

        <input type="radio" name="region" value="world" checked="checked">World
        <input type="radio" name="region" value="150">Europe
        <input type="radio" name="region" value="142">Asia
        <input type="radio" name="region" value="002">Africa
        <input type="radio" name="region" value="021">North America
        <input type="radio" name="region" value="005">South America
        <input type="radio" name="region" value="009">Oceania
        <input type="radio" name="region" value="145">Middle East</div>

In attachment you find the "world" map and then its zoom in "europe". As you can see, Turkey loses its data in the "europe" visualisation.

Thanks for the reply anyway ;)


On Tuesday, 19 March 2013 15:16:25 UTC+1, Valentino Di Donato wrote:
world.png
europe.png

Thomas Rybka

unread,
Mar 19, 2013, 3:11:22 PM3/19/13
to google-visua...@googlegroups.com
I can see the rationale for filtering based on the area you're "focused" on, but I agree, the GeoChart should still show countries in the view window which have data.

I've filed a bug internally to track this.

Thomas Rybka | Software Engineer | try...@google.com | GViz


--

Valentino Di Donato

unread,
Mar 19, 2013, 3:16:09 PM3/19/13
to google-visua...@googlegroups.com
Actually when you zoom on countries it works perfectly....whereas with macro-areas it fails in this. Thanks for your help.

Cheers

Carlos Moreira

unread,
Mar 19, 2013, 6:59:19 PM3/19/13
to google-visua...@googlegroups.com
Correct,
I think the maps should render all the data from the countries that are in the viewport, even if they are outside the region one is showing.

I've already created Issues in the google-visualization-api-foruns related this this:

http://code.google.com/p/google-visualization-api-issues/issues/detail?id=1049&q=east&sort=-id&colspec=ID%20Type%20Status%20Priority%20Milestone%20Owner%20Summary%20Stars

also related:
http://code.google.com/p/google-visualization-api-issues/issues/detail?id=809&q=turkey&sort=-id&colspec=ID%20Type%20Status%20Priority%20Milestone%20Owner%20Summary%20Stars

A lot of people mention this Turkey and Cyprus problem and if the API would allow the data to be rendered anyway, it would solve the problem.
Also open the possibility to interpret for example 'western asia' as middle east, for example.

Hope you guys manage to make this work :)

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

Valentino Di Donato

unread,
Mar 21, 2013, 12:22:38 PM3/21/13
to google-visua...@googlegroups.com
Thanks Carlos,

I really hope they will fix it soon :)

Cheers
Reply all
Reply to author
Forward
0 new messages