setupDurationGraphOptions() {
this.durationChartOptions = {
indexAxis: "y",
scales: {
x: {
ticks: {
callback: (param) => {
return this.convertSeconds(param);
},
},
},
},
plugins: {
tooltip: {
enabled: true,
callbacks: {
label: (tooltipItem) => {
return this.convertSeconds(tooltipItem.raw);
},
},
},
},
};
}
chart.js in Angular
Válasz