reading-notes

Charts.js and Canvas

Javascript Canvas

  1. What does the allow a developer to acheive?

Canvas allows developers to draw out 2d graphics such as graphs and charts, but there are so many more options for what can be done with it. These canvas items are easy to manipulate and can be edited just like an image.

  1. What is the importance of the closing `</canvas> tag?

Well if you don’t have a closing canvas tag then any content within won’t load. The content needs that closing tag will show any fallback data if canvas is not supported.

  1. Explain what the getContext() method does.

Getcontext is something that helps to render detail into the object. It takes in an argument like 2d to render a 2d context object. This will then allow you to draw shapes and such.

Chart.js Documentation

  1. What is Chart.js and how it can be brought into your project?

Chart.js is a really cool piece of library code that can be pulled into your code to be able to insert a beautiful graph to display data. It makes the process of building the charts super easy and then lets you focus on customizing and integrating it into your code.

  1. List 3 different Chart types you can create using Chart.js.

There are so many different charts you can create using chart.js. You can build Area Charts, Bar Charts, Bubble Charts, Pie Charts, Line Charts, Polar Area Chart, Radar Charts and finally Scatter Charts.

Stunning charts with chart.js

  1. What are some advantages to displaying data via a chart over a table?

When you display information via a chart, you can easily and cleanly communicate information without having to sort through data. At a quick glance you can see so many important pieces of information like data distribution or popularity that can be figured out easily. It is an extremely simplistic and visually beautiful way to show this data.

  1. How could Chart.js aid your previously created applications visually?

Chart.js will help all my previous applications by adding in a beautiful layer of data to my projects. This would have been super helpful earlier on and I am so glad to know how easy this can be.