Could you help me how to display my existing X and Y coordinates in this area? the x and y above it work fine, i want to transfer it here
<div>
<h3 style="text-align: center;">X:<span id="posX"></span></h3>
<h3 style="text-align: center;">Y:<span id="posY"></span></h3>
</div>
</body>
<canvas id="myChart" width="500" height="150"></canvas>
const plot = document.getElementById('myChart').getContext('2d');
const myChart = new Chart(plot, {
type: 'scatter',
data: {
datasets: [{
label: 'MOVING',
data: ?
}],
},
options: {
scales: {
yAxes: [{
ticks: {
beginAtZero: true
}
}]
}
}
});