Can't get Geochart Region to show anything besides countries

60 views
Skip to first unread message

Eric Segal

unread,
Mar 16, 2016, 9:38:32 AM3/16/16
to Google Visualization API
I am trying to create a Geochart using US States instead of Countries. The documentation says this is possible, for example the documentation says
  • An uppercase ISO-3166-2 region code name or its English text equivalent (for example, "US-NJ" or "New Jersey").
However I have tried US-NJ, New Jersey, and many other options but have not been able to get it to work. I've been using the code on this page


in fiddle, just substituting New Jersey for Russia, but I do not get any shading in New Jersey (or any other state). Has anyone been able to do this?

Thanks,

Sergey Grabkovsky

unread,
Mar 16, 2016, 11:04:51 AM3/16/16
to Google Visualization API
Hi Eric,

Along with the `region` option, you also need to set the `resolution` option to something sensible. For instance, if you're trying to set `region` to be a US state, you need to set your resolution to `provinces` or `dmas`, like so: http://jsfiddle.net/3k0b6xob/

--
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/c980307e-6398-4e7a-b49b-0f1dd9566870%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--

unnamed.gif

Sergey Grabkovsky

Software Engineer

Google, Inc

gra...@google.com


Eric Segal

unread,
Mar 16, 2016, 11:58:30 AM3/16/16
to Google Visualization API
Thanks, that is great!


On Wednesday, March 16, 2016 at 11:04:51 AM UTC-4, Sergey wrote:
Hi Eric,

Along with the `region` option, you also need to set the `resolution` option to something sensible. For instance, if you're trying to set `region` to be a US state, you need to set your resolution to `provinces` or `dmas`, like so: http://jsfiddle.net/3k0b6xob/

On Wed, Mar 16, 2016 at 9:38 AM Eric Segal <er...@datacollaborative.com> wrote:
I am trying to create a Geochart using US States instead of Countries. The documentation says this is possible, for example the documentation says
  • An uppercase ISO-3166-2 region code name or its English text equivalent (for example, "US-NJ" or "New Jersey").
However I have tried US-NJ, New Jersey, and many other options but have not been able to get it to work. I've been using the code on this page


in fiddle, just substituting New Jersey for Russia, but I do not get any shading in New Jersey (or any other state). Has anyone been able to do this?

Thanks,

--
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.
Reply all
Reply to author
Forward
0 new messages