I'm using a timestamp format to create my scatter chart (datetime won't work for scatter). I need help changing the labels in the X axis from timestamp to datetime so that it's readable by users. Just the axis labels, not the actual timestamp values inserted to the chart.
let ctx = (<HTMLCanvasElement>(
document.getElementById("measurementChart")
)).getContext("2d");
this.myChart = new Chart(ctx, {
type: "scatter",
data: {
datasets: [
{
label: name,
backgroundColor: "black",
borderColor: "blue",
showLine: true,
data: d,
}
]
},
options: {
maintainAspectRatio: false,
responsive: true,
tooltips: {
mode: "interpolate", //interpolate
enabled: true,
intersect: false,
backgroundColor: "black",
},
scales: {
yAxes: [
{
display: true,
scaleLabel: {
display: true,
},
}
],
xAxes: [
{
display: true,
scaleLabel: {
display: false,
labelString: "Date"
},
}
]
},
legend: {
reverse: true,
display: true,
},
}
});