https://github.com/jcolechanged/svg2d3js
Compiles SVG to rudimentary D3.js
https://github.com/jcolechanged/svg2d3js
Last synced: 9 months ago
JSON representation
Compiles SVG to rudimentary D3.js
- Host: GitHub
- URL: https://github.com/jcolechanged/svg2d3js
- Owner: jColeChanged
- License: mit
- Created: 2016-05-01T20:39:06.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2016-05-01T20:43:51.000Z (about 10 years ago)
- Last Synced: 2025-04-06T19:07:28.084Z (over 1 year ago)
- Language: HTML
- Size: 2.93 KB
- Stars: 9
- Watchers: 1
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# SVG to D3.js Compiler
This is a very simple SVG to D3.js compiler. It was written with the intention of allowing me to
quickly translate textures generated in Inkscape to Javascript. This translation isn't a particularly good
one. UUID like variables are used to get variable names and there is no concept of .enter() or of .remove().
However, it does a good job translating a multitude of nested attributes. So it can end up saving a lot of time.
1. Load page and hit Ctrl-V to paste into the SVG text area.
2. Press tab.
3. Press Ctrl-A to select all of the D3.js text area contents.
4. Press Ctrl-C to copy all the contents.
Given an existing 500 line SVG file, already in the paste buffer, it should be possible to replace your
clipboard with a d3.js equivalent within two seconds of loading the page.