Charts
Charts are far better for displaying data visually than tables and have the added benefit that no one is ever going to press-gang them into use as a layout tool. They’re easier to look at and convey data quickly, but they’re not always easy to create.
- we can create charts by Chart.js,
a JavaScript plugin that uses HTML5’s canvas element to draw the graph onto the page. It’s a well documented plugin that makes using all kinds of bar charts, line charts, pie charts and more, incredibly easy.
It’s easy to get started with Chart.js. All that’s required is the script included in your page along with a single < canvas > node to render the chart.
In this example, we create a bar chart for a single dataset and render that in our page
Contributing
Before submitting an issue or a pull request to the project, please take a moment to look over the contributing guidelines first.
For support using Chart.js, please post questions with the chartjs
The < canvas > element
the canvas element just like a img but with no surce the canvas will initially be 300 pixels wide and 150 pixels high.
- Draw shapes with canvas and we can apply styles and colors to this shapes