Skip to content

Instantly share code, notes, and snippets.

@CrimsonGlory
Created October 5, 2016 17:40
Show Gist options
  • Save CrimsonGlory/a09ed26e69e44b0f7311eb3c28ff176a to your computer and use it in GitHub Desktop.
Save CrimsonGlory/a09ed26e69e44b0f7311eb3c28ff176a to your computer and use it in GitHub Desktop.
d3 graph to svg to png to google maps
When you have a D3 chart that is so big, you may want to browse it using Google Maps API.
Steps:
Once you have the D3 chart, use SVG Crowbar to extract the SVG.
http://nytimes.github.io/svg-crowbar/
To convert the SVG to PNG use:
https://runemadsen.com/svg-converter/
This script crash with big values but you can get to 20kx20k pixels
Then
http://blog.mikecouturier.com/2011/07/create-zoomable-images-using-google.html
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment