Rendering more than 20'000 SVG circles will slow down every browser. Render time, scroll and hover performance degrade to an in-actable level. This examples illustrates how to render an almost infinite amount of hoverable circles with canvas, d3.timer (requestAnimationFrame
) and d3.geom.quadtree.
Be aware of iOS image size limitation which also apply to canvas. Potential solution is to disable retina (window.devicePixelRatio
) on older iPads and iPhones.
Open the example in a new window to see the rendering adapt to scrolling and window width changes.
This is an extracted example of the rendering code behind 2014.nzz.ch.
https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.5/d3.min.js