Line and area charts
Line charts are used to display a correlation between two sets of data, where one of the sets should contain categorical or ordered data (ascending or descending). The most common application of a line chart is the time series, where the ordered set consists of instants of time. If arbitrary categories are used, it should be possible to establish some kind of connected sequence with them (for example, an ordered sequence of steps).
Line charts display estimates. The points that correlate the datasets are connected with straight or curved lines that represent estimated values. Line charts can be used to predict intermediate values and reveal trends.
Creating a simple line chart
Just like the bar chart, you need to load the Chart.js JavaScript library, place a <canvas>
object somewhere in the <body>
of your page, and create a new chart referring to the ID of the canvas, and an object with the chart data. The chart
object should specify line
 as the chart type....