Definitely looking forward to try the new release.
Definitely looking forward to try the new release.
D3 is good if your visualization benefits from interactivity, either with dynamic data adjustment or rich tooltips. But static visualizations are important too. (I recently restructured my workflow so I can output static images and interactive charts with the same code, which makes it the best of both worlds.)
To convert D3 to SVG, I believe all you need is a helper function but that is not my area of expertise.
Also there is ggvis https://github.com/rstudio/ggvis which is nice if you are already using ggplot2.
It's pretty easy to use. I don't do interactive so I just find it easier to export EPS files from R.
output.append('div').text(svg.node().outerHTML);
You can see it in action here:
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="250" height="250"><rect x="25" y="25" width="200" height="200" fill="lime" stroke-width="4" stroke="pink"></rect><circle cx="125" cy="125" r="75" fill="orange"></circle><polyline points="50,125 50,200 200,200 200,125" stroke="red" stroke-width="4" fill="none"></polyline><path d="M50 125 c 25 -60 50 -60 75 0 c 25 60 50 60 75 0" fill="none" stroke-width="4" stroke="white"></path><text x="125" y="125" font-family="monospace" font-size="20" text-anchor="middle" fill="black">Hello world</text></svg>
A simple
d3.select('svg').node().outerHTML
would do the trick.
(You can use the same trick as in console-save to generate a download URL though.)
Currently, I am trying to make a dashboard for visualizing many different data sources with WebSockets and Chartjs but it's still not quite ideal-- there's a bit of lag, and sending too much data via JSON really slows things down. If anyone has solved that this problem I would appreciate it if they told me how they did it.
0. http://epochjs.github.io/epoch/
On ios, the performance wasnt the best though
it was replaced with straight d3 i think, or maybe something rendering on canvas
I know you probably know this, but for other people's sake - NVD3 requires the D3 library to work. It's therefore probably quite a good entry point into D3 - less complexity, but the same underlying code.
Keep in mind, D3 isn't a graphing library. It's a data binding library.