ChartJS Line Chart
Multiple Line Chart
by T1MOXA
HTML
<script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.3.0/Chart.js"></script>
<body>
<canvas id="chartJSContainer" width="600" height="400"></canvas>
</body>
CSS
canvas {
background-color: #eee;
}
JavaScript
var options = {
type: 'line',
data: {
labels: ["-5", "-4", "-3", "-2", "-1", "0", "1", "2", "3", "4", "5"],
datasets: [{
data: [9034,
9055,
8965,
9061,
8970,
9156,
9155,
9189,
9103,
9166,
9147
],
borderWidth: 1
}]
},
options: {
scales: {
yAxes: [{
ticks: {
reverse: false
}
}]
}
}
}
var ctx = document.getElementById('chartJSContainer').getContext('2d');
new Chart(ctx, options);