in desktop/src/app/components/job/graphs/all-job-graphs-home/jobs-bar-chart/jobs-bar-chart.component.ts [51:95]
public updateOptions() {
this.options = {
responsive: true,
maintainAspectRatio: false,
animation: { duration: 0 },
tooltips: {
enabled: true,
mode: "single",
callbacks: {
title: (tooltipItems, data) => {
return this._getToolTip(tooltipItems[0]);
},
label: () => null,
},
},
scales: {
xAxes: [{
display: false,
stacked: true,
}],
yAxes: [{
type: "linear",
stacked: true,
ticks: {
min: 0,
callback: (value: number) => {
const seconds = Math.floor(value / 1000);
if (seconds > 180) {
if (seconds % 60 === 0) {
return seconds / 60 + "m";
}
} else {
if (seconds % 1 === 0) {
return seconds + "s";
}
}
},
},
scaleLabel: {
display: true,
},
}],
},
};
}