Engrain by ByteRush

WEB.20.01 Junior

SVG for UI and charts

Comes up in: Web fundamentals, Machine coding

This concept is being written. It gets the full five steps — explanation, predict, interview angle, practice with tests, and review cards. Here is exactly what it will cover, so you can study it elsewhere in the meantime.

What it covers

  • viewBox and coordinate system
  • paths
  • accessible SVG (title, role="img")
  • styling with CSS
  • sprites vs inline
  • SVG performance with thousands of nodes

Words you will know

SVGviewBoxpath

What you will practise

  • accessible bar chart

Interview questions this answers

  • SVG vs Canvas: when do you choose each?
  • How would you make a canvas chart accessible?
  • How would you render a chart with 100,000 points smoothly?