Mit Hilfe von Stackoverflow und der Doku von chart.js habe ich heraus gefunden, dass sich dein Vorhaben mit mehreren charts umsetzen lässt: Ein Linechart für die gelbe Linie und drei Scattercharts für die braunen Punkte. Ich habe mal eine Demo gemacht, Werte, Farben, Stärken der Punkte etc. kannst Du sicher selbst anpassen:
<!DOCTYPE html>
<html>
<head>
<title>chart.js Multiple graphs</title>
<meta charset="utf-8">
</head>
<body>
<script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.1.3/Chart.js"></script>
<canvas id="myChart" width="400" height="400"></canvas>
<script>
var ctx = document.getElementById("myChart");
var scatterChart = new Chart(ctx, {
type: 'line',
data: {
datasets: [{
label: 'Line Dataset',
fill: false,
data: [
{ x: 0, y: 65 },
{ x: 4, y: 59 },
{ x: 100, y: 80 },
{ x: 110, y: 81 },
{ x: 125, y: 56 }
]
}, {
label: '2nd Scatter Dataset',
type: 'scatter',
data: [{ x: 60, y: 70 }
]
}, {
label: '3rd Scatter Dataset',
type: 'scatter',
data: [
{ x: 60, y: 75 }
]
}, {
label: '4th Scatter Dataset',
type: 'scatter',
data: [
{ x: 60, y: 80 }
]
}]
},
options: {
scales: {
xAxes: [{
type: 'linear',
position: 'bottom'
}]
}
}
});
</script>
</body>
</html>
Alles anzeigen