MENU
.net Powerful JavaScript charts

Should I use SVG or canvas for the charts on my website?

Post a reply

Posted by marco at 11:33 on Friday 12th June 2026 [link]
I'm creating a new site and want to use rgraph for it but am not sure whether to use canvas or svg. is there any difference between the tw?

Marco

Posted by Richard at 14:57 on Friday 12th June 2026 [link]
Hi,

Well, that's an age-old question! These days, there's little difference between the two. Technically, canvas is faster - but you're unlikely to notice any difference.

SVG is probably quicker to get something up and running if you're drawing from scratch - but using RGraph, again, you won't see any difference.

In terms of RGraph, it was originally a canvas-only library, and as such, the canvas side of things is a bit more mature, though both SVG and canvas have a wide range of features, and neither is missing anything significant.

The SVG charts are a tiny bit sharper (in terms of antialiasing). Before version 7 of RGraph, this was a more significant difference. But now that the canvas charts have better antialiasing, both look very good.

So it really just comes down to personal preference. If you plan on doing any custom drawing after your chart has been rendered, I'd probably lean towards canvas because I think that it's a friendlier drawing API.

HTH

Richard

Post a reply

What's your name?
What do you want to say?