Project/progress updates!
JS Canvas
1) <canvas>
allows the developer to draw 2D graphics using JS.
2) The closing tag is important because you’re able to have fallback content in between the opening and closing <canvas>
tags if the browser does not support using canvas.
2) src
is the same as for images, it defines the path to the actual file. controls
is used to indicate which controls to use, either the browser’s own control, or interfaces from JS APIs.
3) getContext()
returns a render context object, in which you’re able to utilize the 2D drawing context to draw 2D graphics on the canvas.
Chart.js
1) Chart.js gives you a set of frequently used chart types, plugins, and customization options for charts. Chart.js renders chart element through canvas and is more efficient than rendering into SVG. It is also very well suited for large data sets.
2) Bar chart: A bar chart provides a way of showing data values represented as vertical bars. Bubble chart: A bubble chart is used to display three dimensions of data at the same time. Doughnut and Pie Charts: a doughnut is divided into segments, the arc of each segment shows the proportional value of each piece of data.
Animated Charts
1) Displayihg data through charts can be more easily interpreted compared to a table. For example, a pie chart can show how proportional your data is by visually giving you a cue on how much it takes up the pie chart.
2) The sales chart of the salmon cookies could be shown visually through a line chart to show trend, or a pie chart to show how much was sold in comparison to each city.
I would like to try some graphics drawing on the canvas elements.