JSFiddle - React, Tailwind, and code Playground
HTML
<script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.7.1/Chart.min.js"></script>
<canvas id="line-chart" width="600" height="350"></canvas>
JavaScript
new Chart(document.getElementById("line-chart"), {
type: 'line',
backgroundColor: 'rgb(255, 0, 0)',
data: {
labels: [0, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30],
datasets: [{
data: [86,114,106,106,107,111,133,221,783,2478],
label: "Утомляемость после тренировки",
borderColor: "#a8b3ba",
fill: false
},
{
data: [282,350,411,502,635,809,947,1402,3700,5267],
label: "Сложность выполнения тренировки",
borderColor: "#21b99b",
fill: false
}
]
},
options: {
legend: {
display: false,
position: 'bottom',
labels: {
fontColor: 'rgb(0, 0, 0)'
}
},
scales: {
yAxes: [{
ticks: {
display: false
},
gridLines : {
display : false
}
}],
xAxes: [{
gridLines : {
borderDash : [5]
}
}]
}
}
});