Professional Documents
Culture Documents
The canvas element specifies a display region where JavaScript can be used
to draw simple graphics. In contrast, SVG is an XML language for defining
vector graphic elements that are added to a DOM which can be modified
using JavaScript.
SVG is well-suited for graphics that must be scalable and whose components
need to be modified (e.g. panning and zooming a map) whereas canvas is
better suited where a static bitmap is sufficient (e.g. drawing a scatter-chart or
creating visual effects).