JSFiddle - React, Tailwind, and code Playground
HTML
<script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.1.4/Chart.min.js"></script>
<canvas id="Chart-Line" width="600" height="400"></canvas>
JavaScript
var ctx = document.getElementById('Chart-Line').getContext('2d');
var myChart = new Chart(ctx, {
type: 'line', //
data: {
labels: ['Jan', 'Feb', 'Mar', 'Apr', 'Mei', 'Jun'],
datasets: [{
label: 'our data',
data: [50, 10, 30, 15, 25, 24],
fill:true,
backgroundColor: "rgba(54, 162, 235, 0.2)",
borderWidth:1,
borderColor:"blue"
}]
},
options: {
responsive:false,
scales: {
yAxes: [{
ticks: {
beginAtZero:true
}
}]
}
}
});