From a41189bff2ee513ef1a4a5c71dad61db34daa5e8 Mon Sep 17 00:00:00 2001 From: Andreas Weyer Date: Mon, 16 Feb 2026 16:14:02 +0000 Subject: [PATCH] Update chart tick interval/distance, minor text changes --- src/components/simulation-chart.tsx | 6 ++++-- src/locales/de.ts | 2 +- src/locales/en.ts | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/components/simulation-chart.tsx b/src/components/simulation-chart.tsx index f886f01..8465fd1 100644 --- a/src/components/simulation-chart.tsx +++ b/src/components/simulation-chart.tsx @@ -149,9 +149,9 @@ const SimulationChart = React.memo(({ // Dynamically calculate tick interval based on available pixel width const xTickInterval = React.useMemo(() => { - // Aim for ~46px per label to avoid overlaps on narrow screens + // Aim for ~46px per label to avoid overlaps on narrow screens //const MIN_PX_PER_TICK = 46; - const MIN_PX_PER_TICK = 46; + const MIN_PX_PER_TICK = 56; // increased to 56, partially too tight otherwise const intervals = [1, 2, 3, 4, 6, 8, 12, 24]; const pxPerDay = scrollableWidth / Math.max(1, dispDays); @@ -544,6 +544,8 @@ const SimulationChart = React.memo(({ domain={yAxisDomain as any} axisLine={{ stroke: isDarkTheme ? '#ccc' : '#666' }} tick={} + tickCount={20} + interval={1} allowDecimals={false} allowDataOverflow={false} /> diff --git a/src/locales/de.ts b/src/locales/de.ts index 505ce44..67799c9 100644 --- a/src/locales/de.ts +++ b/src/locales/de.ts @@ -114,7 +114,7 @@ export const de = { xAxisFormat24hDesc: "Wiederholender 0-24h Zyklus", xAxisFormat12h: "Tageszeit (12h AM/PM)", xAxisFormat12hDesc: "Wiederholend 12h Zyklus im AM/PM Format", - showTemplateDayInChart: "Basis-Zeitplan kontinuierlich anzeigen", + showTemplateDayInChart: "Basis-Zeitplan zum Vergleich anzeigen", showTemplateDayTooltip: "Führt die Simulation des Basis-Zeitplans auch dann fort, auch wenn für Tag 2+ abweichende Zeitpläne definiert sind. Die entsprechenden Plasmakonzentrationen werden, nur im Falle einer Abweichung vom Basis-Zeitplan, als zusätzliche gestrichelte Linien dargestellt.\\n\\n__Standard:__ **aktiviert**", simulationSettings: "Simulations-Einstellungen", diff --git a/src/locales/en.ts b/src/locales/en.ts index 0f5213f..212f757 100644 --- a/src/locales/en.ts +++ b/src/locales/en.ts @@ -113,7 +113,7 @@ export const en = { xAxisFormat24hDesc: "Repeating 0-24h cycle", xAxisFormat12h: "Time of Day (12h AM/PM)", xAxisFormat12hDesc: "Repeating 12h cycle in AM/PM format", - showTemplateDayInChart: "Continuously Show Baseline Schedule", + showTemplateDayInChart: "Show Baseline Schedule for Comparison", showTemplateDayTooltip: "Continue simulating the baseline schedule even when deviations are defined for day 2+. Corresponding plasma concentrations will be shown as additional dashed lines, only if deviating from the baseline schedule.\\n\\n__Default:__ **enabled**", simulationSettings: "Simulation Settings", showDayReferenceLines: "Show Day Separators",