Library to speed up interactive svg-based data visualizations by transforming them into canvases.
npm install ssvgLibrary to speed up interactive svg-based data visualizations by transforming them into canvases.
Just add this after loading d3:
```
If you want to toggle SSVG on and off using a hash, use this:
``
You need to have npm, webpack and webpack-cli installed (npm i --global webpack webpack-cli).
1. Clone the repo
2. Install the dependencies: npm iwebpack
3. Transpile and bundle the code: npm link
4. Make SSVG usable as package in other projects: npm link ssvg
5. cd into your visualization directory
6. Locally "install" SSVG: . This should add an ssvg directory to your node_modules folder.npm init
If this fails, you may not have npm set up in your project folder. You can init a new npm package with ,
after which running the npm link command as above should install ssvg correctly.
7. After loading d3.js, you should add the library. If you just want to enable it by default, use:
``
Otherwise, if you want to toggle SSVG on and off based on whether you are using a hash, you could use the manual
version like so:
``
git pull && webpack`