An Introduction to Canvas and Chart.js
What does the <canvas> allow a developer to acheive?
You can draw shapes with javascript… when perusing the first reading, I was unimpressed… after reading about chart.js, I see now that “shapes” can get quite complex.
What is the importance of the closing </canvas> tag?
The text between the opening and closing tags will be the fallback content in case the browser rendering the page does not support the
<canvas>element.
Explain what the getContext() method does.
It takes an argument that identifies the type of context being produced.
What is Chart.js and how it can be brought into your project?
Chart.js is an open source, maintained js file you can link to your HTML to display fancy charts using the canvas element.
List 3 different Chart types you can create using Chart.js.
Bar, Bubble, and Radar.
What are some advantages to displaying data via a chart over a table?
Charts are pretty to look at and convey information more quickly than a table. It also conveys relationships between different data more effectively than the raw numbers.
How could Chart.js aid your previously created applications visually?
For the salmon cookies project, a chart might be used to conveniently show the busiest hours for cookie sales at any given store.
I love charts, so I think I want to nerd out on chart.js. However, they also look like they might be hard to make… so maybe not!