in desktop/src/app/components/pool/graphs/history-graph/history-graph.component.ts [43:87]
public updateOptions() {
const hitRadius = this.interactive ? 10 : 0;
this.options = {
responsive: true,
maintainAspectRatio: false,
elements: {
point: { radius: 0, hitRadius: hitRadius, hoverRadius: hitRadius },
line: {
tension: 0.05, // disables bezier curves
},
},
legend: {
display: false,
},
scales: {
yAxes: [{
type: "linear",
display: this.interactive,
ticks: {
max: this.max * 1.01, // Need to have max slightly more otherwise the line get's cut.
min: 0,
autoSkip: true,
callback: (value) => { if (value % 1 === 0) { return value; } },
},
}],
xAxes: [{
type: "linear",
position: "bottom",
display: this.interactive,
ticks: {
max: 0,
min: -100,
stepSize: 100,
callback: (value) => {
if (value === 0) {
return "0";
} else {
return `${this.historySize}m`;
}
},
},
}],
},
};
}