Okay, so icons are a different use-case than "graphics" and in particular graphs, right? Font-awesome (as an example) and The Noun Project are excellent packages and ones that use SVGs to good effect.
Graphs, though? Graphs?
The sweet spot for SVGs is when you have relatively small data set sizes, need interactivity, and update the data very little. There's also the question of how competently different browser vendors handle SVG and animation--if you're on a nice desktop or laptop, it'll be great!
Once any of those things change, you need to start looking at using raster or GPU graphics. If your dataset updates frequently (say, faster than every few hundred milliseconds) or is large (say, larger than a few thousand points) or needs to reliably run on mobile devices or older workstations, the SVG approach will show issues pretty quickly.
Oh, and it's not trivial performance gains, unless you have your head so far up your ass that you don't watch how balls slow the average user's device and browsing experience is. Nor is it at the expense of easily-writable or modifiable code, unless you're a hack script-kiddie who cannot fathom how to modularize their code and write clear solutions to problems.
I'm not even going to apologize for this, because there is just so much garbage advice and bad practices going on in the frontend right now because some chucklefuck found D3 and has decided that it has solved all of their charting and drawing problems forever--and never notices how badly their cutesy demos perform in the wild.
Graphs, though? Graphs?
The sweet spot for SVGs is when you have relatively small data set sizes, need interactivity, and update the data very little. There's also the question of how competently different browser vendors handle SVG and animation--if you're on a nice desktop or laptop, it'll be great!
Once any of those things change, you need to start looking at using raster or GPU graphics. If your dataset updates frequently (say, faster than every few hundred milliseconds) or is large (say, larger than a few thousand points) or needs to reliably run on mobile devices or older workstations, the SVG approach will show issues pretty quickly.
Oh, and it's not trivial performance gains, unless you have your head so far up your ass that you don't watch how balls slow the average user's device and browsing experience is. Nor is it at the expense of easily-writable or modifiable code, unless you're a hack script-kiddie who cannot fathom how to modularize their code and write clear solutions to problems.
I'm not even going to apologize for this, because there is just so much garbage advice and bad practices going on in the frontend right now because some chucklefuck found D3 and has decided that it has solved all of their charting and drawing problems forever--and never notices how badly their cutesy demos perform in the wild.