Re:Introduction to D3
by dreamcompiler on Wednesday March 04, 2020 @01:47AM
(#22481702)
I very much prefer to generate svg charts on the server. Not only is this more sensible when you have a huge number of data points, but it even works with js turned off (unless you need interactivity).
[ Parent
| on HN ]
Not disagreeing – I do this often too – but the downside can be having a very large dataset which in turn generates a very large response, which might be more efficiently sent as data and constructed client-side. Less importantly, Google’s lighthouse tests for a certain number of DOM elements, which a complex chart can easily exceed.
Re:Introduction to D3
by inferiorhuman on Wednesday March 04, 2020 @06:00AM
(#22482740)
Yeah my server-side use cases are for times when I'd want to use a graph outside of a browser (e.g. PDF reports, printing, email distribution). If you're targeting a browser IMO it only makes sense to move away from the browser and/or JS if you're trying to create a static, raster image.