reading-notes

Chart.js and Canvas

Canvas

JavaScript Canvas

  1. The canvas tag allows a dev to make 2d graphics in JavaScript. It requires a hight and width.
  2. It requires a closing tag unlike img elements because all the content inside the brackets is fallback content.
  3. teh getContext method allows you to render content.

Chart.js Docs

  1. Chart.js is a tool you can use to add charts to your JS.
  2. 3 chart types:
    • bar chart
    • donut/pie charts
    • line chart

Create Animated Charts with Charts.js

  1. Charts are better for data than a table because they can be visual instead of just numbers on a screen.
  2. Chart.js can be used to make the outcome of the results look better.