Sorry if off topic, but there’s one thing about charts and visualizations on the Web that I’ve…
Šime Vidas

I think this is possible.

But I see two problems (I’m not an expert, so I could me wrong):

  1. The pre-rendered html may not be any smaller in a large number of cases. Imagine how many bytes you’d need to define just one path and then multiply that by the number of data points. In such a case, it may be better to just send the data and the logic to the browser and let the browser do the work of rendering.
  2. Interactivity is one major appeal of d3. You don’t want to send http requests to the server every time the user initiates a change in the dom structure.

Again, I think it depends on the case. But for most cases, pre-rendering doesn’t bring much efficiency in my opinion. If I misunderstood your point, I’m happy to be corrected.

One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.