Hacker News new | past | comments | ask | show | jobs | submit login

I’ve had no problem rendering far more complex graphics than a pie chart, with SVG, without sending a single byte of JS to clients (not just the SVGs, a variety of fairly interactive content!). I realize that’s fairly niche, and it’s a bit of a personal special interest. But I can say with certainty that it’s possible, because I have done it.

Sure, I have used JS (TS) for building these projects, but that’s immaterial because it never ships to clients.

As for pie chart “primitives”, I’m not asking you to take my word for it but I also can say with relatively high confidence that SVG as a technology is capable of the kinds of composition needed for that. It probably won’t match the ergonomics of a few CSS variables, but it could come close if you’re willing to overlook the verbosity of XML syntax.

Not that I’m saying you or anyone should do that! My original response wasn’t intended to persuade you or anyone that SVG is a better choice of technology for this purpose. Only to clarify that there is no inherent requirement to run client side JS to render SVG charts. That’s probably not super interesting in its own right, it’s only a clarifying statement of fact.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: