3 ms·
Right now everything I want to do is capable of being done reasonably well in SVG, however, there has been talk of effects that we wish to add that are easier d
by sophacles 13y ago
Right now everything I want to do is capable of being done reasonably well in SVG, however, there has been talk of effects that we wish to add that are easier done in canvas.
We are doing a graph diagram using force directed layout, and are displaying various overlays of paths through the graph based on input data parameters. As I mentioned, this is currently all fine in SVG, however, we'd like to in the future be able to make those overlays a bit more dynamic in the graphic sense - by adding some effects that canvas makes easy. Also, our future drawing of the graph will include enough custom shapes and images/sprites that the canvas context + drawing objects will result in cleaner code than the equivalent SVG operations.
Also, and this part is a personal bias, I just dislike SVG and it's DOM for runtime graphics manipulation, and prefer the canvas API for it.
- ph0rque 13y agoWe are doing a graph diagram using force directed layout... Can you provide a link to this?
- npalli 13y agoThanks for the detailed comment. As you might imagine, I think the killer feature of D3 is the binding of data to the DOM and all the awesome manipulation that is possible (via CSS/javascript/jquery etc.). It also happens to scale very well for us. So I look for examples where Canvas is a better fit.