<!DOCTYPE html>
<html>
<head>
<title>Bar Chart</title>
<script src="https://cdn.jsdelivr.net/npm/chart.js@2.8.0"></script>
<meta name="viewport" content="initial-scale = 1, user-scalable = no" />
<style>
canvas {}
</style>
</head>
<body>
<canvas id="canvas" height="450" width="600"></canvas>
<script>
let labels = [];
let data1 = [];
let data2 = [];
for (let i = 0; i < 2000; i++) {
labels.push("l" + i);
data1.push(Math.floor(Math.random() * 100));
data2.push(Math.floor(Math.random() * 100));
}
var ctx = document.getElementById('canvas').getContext('2d');
var chart = new Chart(ctx, {
// The type of chart we want to create
type: 'line',
// The data for our dataset
data: {
labels: labels,
datasets: [{
label: 'My First dataset',
//backgroundColor: 'rgb(255, 99, 132)',
borderColor: 'rgb(255, 99, 132)',
data: data1
}, {
label: 'My First dataset',
//backgroundColor: 'rgb(255, 255, 132)',
borderColor: 'rgb(255, 255, 132)',
data: data2
}]
},
// Configuration options go here
options: {}
});
</script>
</body>
</html>
// Code goes here
/* Styles go here */