https://github.com/d3-node/d3node-output
simple way to export d3-node instance to png/jpg, svg & html files
https://github.com/d3-node/d3node-output
Last synced: 9 months ago
JSON representation
simple way to export d3-node instance to png/jpg, svg & html files
- Host: GitHub
- URL: https://github.com/d3-node/d3node-output
- Owner: d3-node
- Created: 2017-03-12T03:19:03.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2022-04-08T03:08:04.000Z (almost 4 years ago)
- Last Synced: 2024-04-14T18:54:09.431Z (almost 2 years ago)
- Language: JavaScript
- Homepage:
- Size: 29.3 KB
- Stars: 16
- Watchers: 5
- Forks: 8
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# D3Node-output
Used in examples to export a d3node instance to html, svg, & png files
## Install
```bash
npm install d3node-output
```
### Usage
```js
const output = require('d3node-output')
const voronoi = require('d3node-voronoi');
const data = new Array(99);
// crop your png to a custom size
// defaults to the size of your svg if not defined
const options = {width: 100, height: 200};
// output files to /dist dir
output('./dist/myVoronoi', voronoi(data), options, callback);
```
### PaaS usage:
- Heroku: set buildpack to: https://github.com/mikeraimondi/heroku-buildpack-google-chrome
- AWS Lambda: tbd
- Azure functions: tbd
## Contributing
1. Fork it!
2. Create your feature branch: `git checkout -b my-new-feature`
3. Commit your changes: `git commit -am 'Add some feature'`
4. Push to the branch: `git push origin my-new-feature`
5. Submit a pull request :D
### LICENSE
[MIT](LICENSE) © [d3-node](https://github.com/d3-node)