I understand the differences between <canvas>
and SVG, and the pros and cons of both. I'm creating a hierarchical diagram, whose nodes and connections a user can manipulate through event handling. The clear winner would normally be SVG, as there's a true DOM I can use.
However, I've heard claims that <canvas>
is a contender开发者_C百科 for such an application with the proper scene graph (DOM) library. I can't find consensus on what the go-to scene graph library for <canvas>
is (for SVG, it's Raphael). Can someone point me in the right direction, or are these libraries too immature to supersede SVG for complex DOM manipulation?
Cake (old page) is a library for that. I've used it and it worked quite well.
Sounds like you might like to check out d3.js (still SVG-based, but does allow large datasets and has good performance).
精彩评论