charts
This commit is contained in:
@@ -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)' },
|
||||||
|
|||||||
Reference in New Issue
Block a user