JSFiddle - React, Tailwind, and code Playground
HTML
<script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.7.0/Chart.min.js"></script>
<canvas></canvas>
JavaScript
new Chart(document.querySelector('canvas'), {
type: 'scatter',
data: {
datasets: [ {
label: 'hello, world!!',
data: [
{ x: 1, y: 3 },
{ x: 2, y: 7 },
{ x: 5, y: 8 },
{ x: 8, y: 4 },
{ x: 6, y: 2 },
{ x: 5, y: 5 },
{ x: 1, y: 3 },
],
borderColor: 'black',
borderWidth: 1,
fill: false,
tension: 0,
showLine: true
}]
},
options: {
scales: {
xAxes: [ {
ticks: {
min: 0,
max: 10
},
} ],
yAxes: [ {
ticks: {
min: 0,
max: 10,
},
} ],
},
},
});