Skip to content

Instantly share code, notes, and snippets.

@wboykinm
Created December 12, 2012 19:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wboykinm/4270624 to your computer and use it in GitHub Desktop.
Save wboykinm/4270624 to your computer and use it in GitHub Desktop.
Google pie chart w/ cartodb data pulled in
http://chart.apis.google.com/chart?chs=270x200&cht=p3&chco=A6CEE3|1F78B4|B2DF8A|33A02C|FB9A99|E31A1C|FDBF6F&chd=t:{{content.data.sum_white}},{{content.data.sum_black}},{{content.data.sum_amind}},{{content.data.sum_asian}},{{content.data.sum_hawpac}},{{content.data.sum_tworac}},{{content.data.sum_other}}&chdl=White|Black|American+Indian|Asian|Hawaiian%2FPacific+Native|Multiracial|Other&chdlp=b&chp=2&chl={{content.data.sum_white}}|{{content.data.sum_black}}|{{content.data.sum_amind}}|{{content.data.sum_asian}}|{{content.data.sum_hawpac}}|{{content.data.sum_tworac}}|{{content.data.sum_other}}&chds=a&chma=5,5,10,5|5
@PeterGilles
Copy link

Dear wboykinm,
I found this guist when browsing for a possibility to draw a dynamically generated pie chart on a CartoDB map. It seems that you call Google's chart API filled with values drawn from a CartoDB table (?), but I don't know how to insert this into CartoDB CSS (?). I would be very grateful, if you could explain how you made your example work in CartoDB.

Thank you very much,
Peter

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment