ChartJS Line Chart
Multiple Line Chart
HTML
<script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/3.0.0-beta.13/chart.js"></script>
<body>
<canvas id="chartJSContainer" width="600" height="300"></canvas>
</body>
CSS
canvas { background-color : #eee;
}
JavaScript
var options = {
type: 'line',
data: {
labels: ["Red Red Red Red", "Blue Blue Blue Blue", "Black Black Black Black", "Green Green Green Green", "Purple Purple Purple Purple", "Orange Orange Orange Orange"],
datasets: [
{
label: '# of Votes',
data: [12, 19, 3, 5, 2, 3]
},
{
label: '# of Points',
data: [7, 11, 5, 8, 3, 7]
}
]
}
}
var ctx = document.getElementById('chartJSContainer').getContext('2d');
new Chart(ctx, options);