fix(charts): use the app's sans money treatment in tooltips, not mono

font-mono in this codebase marks code, keys, and admin surfaces; money
is sans + tabular-nums everywhere else (cards, KPIs, tables). Keep the
tabular figures for scrub stability, drop the mono.
This commit is contained in:
Guillem Arias
2026-06-05 09:54:58 +02:00
parent 10b9291221
commit 904f699cfc
3 changed files with 7 additions and 6 deletions

View File

@@ -22,10 +22,11 @@ export const CHART_TOOLTIP_CLASSES =
// Content conventions (kept here so the controllers stay aligned):
// - context line (date / node title): `text-xs text-secondary mb-1`
// - money / numeric figures: mono + tabular so digits don't jitter while
// the scrubber moves; secondary parentheticals in `text-secondary`
// - money / numeric figures: tabular-nums so digits don't jitter while the
// scrubber moves (sans, not mono — the app's money convention everywhere
// else); secondary parentheticals in `text-secondary`
export const CHART_TOOLTIP_CONTEXT_CLASSES = "text-xs text-secondary mb-1";
export const CHART_TOOLTIP_VALUE_CLASSES = "font-mono font-medium tabular-nums";
export const CHART_TOOLTIP_VALUE_CLASSES = "font-medium tabular-nums";
// Convenience factory for the raw-DOM idiom (no d3.select). Creates a hidden
// tooltip div carrying the shared contract and appends it to `parent`.