Javascript based live updated graphing is picking up speed for analytics and now for print. A few noted names are D3JS, rickshaw, flot, graphael. A good table of comparisons can be found at http://socialcompare.com/en/comparison/javascript-graphs-and-charts-libraries
Scraping off SVG graphics off your browser
You can easily scrape off the graphics from your browser after running your javascript based graph generator either via print screen. or scraping it off to a local svg using SVG crowbar found at https://github.com/NYTimes/svg-crowbar
Converting SVG to PNG
The first is command line method..
For generating and exporting the svg graphs to png versions. Use svg2png via brew (not npm version)
> brew install svg2png.
Then to convert..
> sudo svg2png raphael-ico.svg rap.png
To have a large printable version..
> sudo svg2png -s3 raphael-ico.svg rap3.png.
note: -w300 -h300 argvs will yield width and height respectively.
The second is online method.. which i recommend for non-cli fans. This can be done using cloud convert at https://cloudconvert.org/svg-to-png .Or a personal favourite just because theres a unicorn at http://www.grumpicon.com/
Bonus on online PNG compression
Finally once you get your png file. Use https://tinypng.com/ to compress your images average to 60% compression. The image above was 765kb unedited, and after compression its around 250kb.
Good References
- http://blog.omgmog.net/post/converting-svg-to-png-online-and-in-your-terminal/
- http://www.flotcharts.org/
- https://gist.github.com/mbostock/6466603