I have this problem - I want my chart to have custom markers (points) that rotate depending on the value from the dataset. I have my custom markers (arrows), but I don't know how to rotate them. I am using Chart.js
My JS Code:
var canvas = document.getElementById('myChart');
var ctx = canvas.getContext('2d');
var yourImage = new Image(30, 30);
yourImage.src = 'arrow.png';
var myChart = new Chart(canvas, {
type: 'scatter',
data: {
datasets: [{
label: 'Scatter Dataset',
data: [{
x: 1,
y: 1.45
}, {
x: 2,
y: 0.25
}, {
x: 3,
y: 2.56
}, {
x: 4,
y: 1.65
}],
pointStyle: yourImage,
}]
},
options: {
scales: {
xAxes: [{
type: 'linear',
position: 'bottom'
}]
}
}
});