reading-notes

Todd Wolden

View on GitHub

Course 201 Class Twelve “Chart.js, Canvas”

HTML5 features the <canvas> element that allows you to draw 2D graphics using JavaScript.

The <canvas> element requires at least two attributes: width and height that specify the size of the canvas.

Unlike the <img> element, The <canvas> element requires the closing tag </canvas>. Any content between the opening and closing tags is fallback content that will display only if the browser doesn’t support the <canvas> element.

Questions

It allows you to draw 2d graphics using javascript.

It allows for the content between the opening and closing tag to be fallback content.

It returns a render context object and take the arguement the type of context(ex 2d)

It is brought into your project via the <canvas></canvas> then <script> tags… it brings a chart into your project.

A line, a bar, pie, and more.

They are simple to use and flexible and they also display some data better visually to the user.

You could use it display unordered lists as charts.

Resources

JavaScript Canvas

Chart.js

Animated Charts with Chart.js

Return to the Table of Contents

Table of Contents