Class Twelve Notes (201)
Canvas, Chart.js
JS Canvas
<canvas>
allows a developer to represent a 2D graphics using JS, with attributes of height and width
- The closing
</canvas>
tag shows the fallback content that will display only if the browser doesn’t support the <canvas>
element
getContext()
returns a rendered text object
Chart Js
- Chart.js is a library that frequently used chart types, plugins, and customization options, one example of how it can be used in my project is to use it to render chart elements on a canvas.
- Example of chart types that can be made include: box-plots, error bars, and financial charts (ex candle sticks).
Animanted Charts
- Charts are easier to interpret and read than tables as they are more visual. It can communicate and analyze data more efficiently.
- I can potentially use Chart.js to plot the table from the salmon-cookie project, so the sales of the day, by the hour, and by store can be more easily visualized.
Things I want to know more about
- How to use chart with other data analytics methods such as regressions
Back to main page
References