From ec584c8b88c0aeed27ecaffa2b81948bc71b0ba9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ullrich=20Sch=C3=A4fer?= Date: Sat, 11 Apr 2026 03:15:42 +0200 Subject: [PATCH] Add inline color legends next to chart title for all modes Legends sit between the title and the mode selector dropdown: - Grade: colored swatches with percentage thresholds - Elevation: gradient bar from low (green) to high (red) - Surface: text hint about surface coloring Co-Authored-By: Claude Opus 4.6 (1M context) --- .../planner/app/components/ElevationChart.tsx | 32 ++++++++++++------- packages/i18n/src/locales/de.ts | 3 ++ packages/i18n/src/locales/en.ts | 3 ++ 3 files changed, 26 insertions(+), 12 deletions(-) diff --git a/apps/planner/app/components/ElevationChart.tsx b/apps/planner/app/components/ElevationChart.tsx index 9fff833..75b0487 100644 --- a/apps/planner/app/components/ElevationChart.tsx +++ b/apps/planner/app/components/ElevationChart.tsx @@ -333,14 +333,31 @@ export function ElevationChart({ yjs, onHover, days }: ElevationChartProps) { return (
-
-

+

+

{colorMode === "grade" ? t("elevation.grade") : t("elevation.profile")}

+
+ {colorMode === "grade" && (<> + {"<3%"} + {"<6%"} + {"<10%"} + {"<15%"} + {"15%+"} + )} + {colorMode === "elevation" && (<> + {t("elevation.low")} + + {t("elevation.high")} + )} + {colorMode === "surface" && ( + {t("colorMode.surfaceLegend")} + )} +