<canvas>
allow a developer to acheive?It allows a developer to create a ‘canvas’ to draw on using JavaScript.
</canvas>
tag?Anything inside the beginning and closing canvas tags are ‘fallback content’ that will only display to the user if the browser doesn’t suppport the <canvas>
element.
getContext()
method does.The getContext()
method grabs the metaphorical ‘paintbrush and palette’ for drawing on a 2D plane on the canvas element.
Chart.js is a tool we can use to draw charts and graphs on the <canvas>
element of and HTML document. We can bring it into a project by downloading a copy Chart.js, creating a <canvas>
in the HTML file, and then importing the .js file to the HTML doc.
List 3 different Chart types you can create using Chart.js.
Charts have the advantage of being easier to read and can display data visually in ways that are impossible in a table.
On the Salmon Cookies lab, I could’ve made bar charts to visually display sales across every branch, which would’ve provided a visual scale to make comparisons much simpler.