This commit is contained in:
Bastian Wagner
2026-06-19 14:43:25 +02:00
parent 7423920f34
commit 8e9f498d90

View File

@@ -113,6 +113,9 @@ export class RunningMetricChartComponent
} }
private chartOptions(): ChartOptions<'line'> { private chartOptions(): ChartOptions<'line'> {
const points = this.points();
const maxX = points.length > 0 ? Math.max(...points.map((p) => p.x)) : undefined;
return { return {
animation: { duration: 250 }, animation: { duration: 250 },
interaction: { intersect: false, mode: 'index' }, interaction: { intersect: false, mode: 'index' },
@@ -149,6 +152,8 @@ export class RunningMetricChartComponent
text: 'Distanz', text: 'Distanz',
}, },
type: 'linear', type: 'linear',
max: maxX,
bounds: 'data',
}, },
y: { y: {
grid: { color: 'rgba(104, 115, 134, 0.14)' }, grid: { color: 'rgba(104, 115, 134, 0.14)' },