I have a 2-line chart, one drawn without any points (0 sized), and the other with only 2 points (no line). I'd like to have the points over the line and not the contrary (the line is literally crossing over the point which is not what I want). You can see the result on this image :enter image description here
Here is my code:
const ctx = document.getElementById('myChart').getContext('2d');
const myChart = new Chart(ctx, {
type: 'line',
data: {
datasets: [
{
label: '',
data: dataset,
borderColor: 'rgb(0, 0, 255, 1)',
borderWidth: 2,
pointRadius: 0,
pointHoverRadius: 0,
fill: "origin",
},
{
label: 'Events',
data: [{x: "2020-10-22", y: 4850}, {x: "2020-10-27", y: 4730}],
fill: false,
pointRadius: 15,
pointHoverRadius: 15,
pointBorderWidth: 0,
pointHoverBorderWidth: 0,
pointBackgroundColor: 'rgba(255, 0, 0)',
pointStyle: 'triangle',
pointHoverBackgroundColor: 'green',
showLine: false,
},
],
},
options: {
responsive: false,
scales: {
y: {
beginAtZero: false,
}
},
},
});
Many thanks