Show min/max elevation in meters in the elevation legend

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Ullrich Schäfer 2026-04-11 03:16:10 +02:00
parent ec584c8b88
commit 858c7e9118
No known key found for this signature in database
GPG key ID: A32FF691A0F752D9

View file

@ -346,9 +346,9 @@ export function ElevationChart({ yjs, onHover, days }: ElevationChartProps) {
<span className="flex items-center gap-0.5"><span className="inline-block h-1.5 w-2.5 rounded-sm" style={{ background: "#991b1b" }} />{"15%+"}</span>
</>)}
{colorMode === "elevation" && (<>
<span>{t("elevation.low")}</span>
<span>{Math.round(Math.min(...points.map(p => p.elevation)))}m</span>
<span className="inline-block h-1.5 w-16 rounded-sm" style={{ background: "linear-gradient(to right, rgb(0, 200, 50), rgb(255, 200, 50), rgb(255, 0, 50))" }} />
<span>{t("elevation.high")}</span>
<span>{Math.round(Math.max(...points.map(p => p.elevation)))}m</span>
</>)}
{colorMode === "surface" && (
<span>{t("colorMode.surfaceLegend")}</span>