Reading Notes for Day 12 of 201:
Reading JavaScript Canvas
-
What does the < canvas > element allow a developer to acheive? It allows the developer to draw 2D graphics with JavaScript using the element tag as a placeholder for rendering.
-
What is the importance of the closing `< /canvas > tag?
It allows for placement of fallback content if the canvas element isn’t supported by the client browser.
- Explain what the getContext() method does.
getContext() takes one argument which is the type of context. For example, you use the “2d” to get a 2D rendering context object.
Chart.js Documentation
- What is Chart.js and how it can be brought into your project?
Chart.js is a library that allows you to draw a chart using the canvas tag. You have to port the files to either local storage or your GitHub repository, and then integrate them in your project.
-
List 3 different Chart types you can create using Chart.js.
- Bar Chart
- Bubble Chart
- Line Chart
But honestly there are a lot of chart types. It’s a very robust library.
Easily Create Stunning Animated Charts with Chart.js
- What are some advantages to displaying data via a chart over a table?
Charts give you the option to display data in the way that it’s most easily understood, or has great visual impact. Also lots of tables is boring.
- How could Chart.js aid your previously created applications visually?
Adding charts might make the data easier to understand and more visually appealing to viewers.
Bookmark and Review Drawing Shapes With Canvas, Applying Style and Colors - Canvas API and Drawing Text - Canvas API
Things I want to know more about
I want to play with the charts. I like charts.