Having dealt with another form of this kind of stupid, I cannot stress strongly enough that people just learn how to draw charts their own damn selves.
For some reason, people think D3 is the end-all and be-all of graphing, and the fact of the matter is that it is both way overkill and oddly underpowered for certain perverse datasets (as the author here discovered).
With the major caveat of don’t do this if you need interactive hover/click elements, I would strongly advise doing the charting in raw canvas or, better, WebGL.
Using the SVG scenegraph has super gross performance issues past a few thousand points, and most of the time a simple raster image does an adequate job of displaying the data without murdering performance.
If you need to draw a lot of realtime data, use WebGL with dynamic vertex buffers.
I’ve come to believe the following analogy:
DOM manipulation : jQuery :: data visualisation : D3
Better abstractions haven’t been widely socialised.
Very true! Canvas seemed like an obvious approach when we realized its performance would only vary with the size of the chart instead of the number of points. However, we moved forward with D3 and SVG for a few reasons:
It would be great to explore the canvas option but sometimes the context is just as important as the solution.
FWIW we did a followup on the canvas approach: https://engineering.mongodb.com/post/d3-round-two-how-to-blend-html5-canvas-with-svg-to-speed-up-rendering/