

#Graphviz clickable nodes full#
Yet there is no magic bullet for performance, and these four possible approaches don't begin to cover the full space of possibilities. (The Protovis version has to recalculate all attributes on all elements.) The Canvas-based semantic zooming is a bit more zippy than SVG, but SVG semantic zooming still feels responsive. This is because it's doing a lot less work for each zoom event. For semantic zooming, you'll notice that D3 is significantly faster than Protovis. The performance of both geometric zooming examples feels more than adequate. The SVG implementation is particularly simple, updating a single "transform" attribute. Geometric zooming simplifies the implementation: you apply a translate and scale once, and then all the circles are re-rendered. currently uses semantic zooming, but it might be useful to consider other cases. Semantic zooming in contrast means you apply transforms to each circle individually: when you zoom in, the circles remain the same size but they spread out. Geometric zooming means you apply a single transform to the entire viewport: when you zoom in, circles become bigger. Aside from whether the circles are rendered in Canvas or SVG, the other major distinction is whether you use geometric or semantic zooming. These examples use D3's zoom behavior to implement zooming and panning. So here are four possible implementations, two each of Canvas and SVG:


Fortunately, drawing 2000 circles is a pretty easy example to test.
