JSFiddle - React, Tailwind, and code Playground
HTML
<script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.7.1/Chart.bundle.js"></script>
<button id="btnRemovePoints">
Remove points
</button>
<div class="chart-container">
<div class="leg-stretch-chart-inner">
<canvas id="leg-stretch-chart" width="100%" height=""></canvas>
</div>
</div>
JavaScript
$(document).ready(function(){
var legStretchtCtx = document.getElementById("leg-stretch-chart");
var myChart = new Chart(legStretchtCtx, {
type: 'line',
data: {
labels: ["Day 1", "Day 2", "Day 3", "Day 4", "Day 5", "Day 6","Day 7"],
datasets: [{
label: 'Leg Stretch',
data: [3, 4, 5, 4, 3, 3.5, 3.5],
backgroundColor:"#70d6db",
borderColor: ["#70d6db"],
borderWidth: 4,
pointBackgroundColor: "#fff",
pointRadius: [8, 8, 8, 8, 8, 8, 8],
pointHoverRadius: 8,
pointHoverBackgroundColor: "#0ba8b0",
pointHoverBorderColor: "#26c1c9",
pointBorderColor:"#26c1c9"
}]
},
options: {
legend: {
display: false,
labels: {
display: true
}
},
responsive:true,
scales: {
xAxes: [{
gridLines: {
display: false,
drawBorder:false,
},
ticks: {
display: false,
fontFamily: "Montserrat",
fontColor: "#2c405a",
fontSize: 12
}
}],
yAxes: [{
gridLines: {
display: false,
drawBorder:false,
},
ticks: {
display: false,
fontFamily: "Montserrat",
fontColor: "#2c405a",
...