Legend for bivariate choropleth maps in GeoChart?

22 views
Skip to first unread message

Bryan Maloney

unread,
Nov 25, 2019, 8:54:58 AM11/25/19
to Google Visualization API

I have figured out how to kludge GeoChart into displaying a bivariate choropleth. It requires coding each data point to an arbitrary number that associates with a specific color in the bivariate palette matrix. The legend is, of course, hideous and lacks useful information to transmit. Is there a way to insert a two-dimensional legend instead?


Daniel LaLiberte

unread,
Nov 25, 2019, 9:27:59 AM11/25/19
to Google Visualization API
Hi Bryan,

The best you can do now is to turn off the default legend and draw (i.e. more kludges) your own legend using a 100% stacked stepped area chart.  

But you'll be happy to know we are going to release a Heatmap in an upcoming version (probably not the next, but the one after that) of Google Charts.  So with that, you can more easily draw a 2D color legend for the bivariate choropleth chart.



On Mon, Nov 25, 2019 at 8:55 AM Bryan Maloney <smokin.gal...@gmail.com> wrote:

I have figured out how to kludge GeoChart into displaying a bivariate choropleth. It requires coding each data point to an arbitrary number that associates with a specific color in the bivariate palette matrix. The legend is, of course, hideous and lacks useful information to transmit. Is there a way to insert a two-dimensional legend instead?


--
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 view this discussion on the web visit https://groups.google.com/d/msgid/google-visualization-api/9fd878ef-645e-4f29-8ca2-7a6adde3af31%40googlegroups.com.


--

Bryan Maloney

unread,
Nov 25, 2019, 9:59:21 AM11/25/19
to Google Visualization API


On Monday, November 25, 2019 at 9:27:59 AM UTC-5, Daniel LaLiberte wrote:
Hi Bryan,

The best you can do now is to turn off the default legend and draw (i.e. more kludges) your own legend using a 100% stacked stepped area chart.  



Can the stacked stepped area chart be overlaid as if a legend or will it require a separate <div> (or whatever container)? In that case, I might as well just use a GIF.

Daniel LaLiberte

unread,
Nov 25, 2019, 10:07:37 AM11/25/19
to Google Visualization API
You could wrap the legend chart in a div that is absolute (or relative) positioned, and move it so it overlays your chart.  Yes, you could probably use your own gif more easily for that, but the legend chart would be programmatically generated, and correspond to whatever colors you use in your chart.

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