JSFiddle - React, Tailwind, and code Playground
HTML
<script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.2.1/Chart.min.js"></script>
<canvas id="canvas" height="200"></canvas>
JavaScript
var ctx = document.getElementById("canvas");
var myChart = new Chart(ctx, {
type: 'line',
data: {
labels: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug"],
datasets: [{
label: '# of Value',
data: [12, 19, 3, 5, 2, 3, 10, 29],
backgroundColor: 'rgba(33, 145, 81, 0.2)',
borderColor: 'rgba(33, 145, 81, 1)',
borderWidth: 1
}]
},
options: {
scales: {
yAxes: [{
ticks: {
beginAtZero:true
}
}]
}
}
});