Repository navigation
Commit ab2b845
committed
fix(frontend): route dashboard chart tooltips through formatCurrency
dashboard.ts's Chart.js tooltip and axis-tick callbacks built dollar
strings by hand with `$${x.toLocaleString()}`, six occurrences across
two charts. Same unpinned-locale defect as formatCurrency() before
the previous commit -- these fell back to the host locale too -- but
the deeper issue was duplication: dashboard.ts already imports
formatCurrency from utils.ts and uses it elsewhere in the same file,
so these six were reinventing it inline instead of calling it.
Routes all six through the shared helper. Mechanical: each site
formats a guaranteed-finite number (never null/undefined) with no
fraction digits and a literal '$' prefix, exactly formatCurrency's
default signature, so the change is a straight substitution with no
behavior difference beyond the locale fix itself.
These call sites render into a Chart.js <canvas>, not the DOM, so no
existing test exercises them and none are being added here -- the
change is verified by tsc, eslint, and the full suite passing under
both locales, not by new coverage of previously-untested chart code.1 parent 68d2135 commit ab2b845
1 file changed
Lines changed: 8 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
962 | 962 | | |
963 | 963 | | |
964 | 964 | | |
965 | | - | |
| 965 | + | |
966 | 966 | | |
967 | 967 | | |
968 | 968 | | |
| |||
973 | 973 | | |
974 | 974 | | |
975 | 975 | | |
976 | | - | |
977 | | - | |
978 | | - | |
979 | | - | |
| 976 | + | |
| 977 | + | |
| 978 | + | |
| 979 | + | |
980 | 980 | | |
981 | 981 | | |
982 | 982 | | |
| |||
994 | 994 | | |
995 | 995 | | |
996 | 996 | | |
997 | | - | |
| 997 | + | |
998 | 998 | | |
999 | 999 | | |
1000 | 1000 | | |
| |||
1131 | 1131 | | |
1132 | 1132 | | |
1133 | 1133 | | |
1134 | | - | |
| 1134 | + | |
1135 | 1135 | | |
1136 | 1136 | | |
1137 | 1137 | | |
| |||
1147 | 1147 | | |
1148 | 1148 | | |
1149 | 1149 | | |
1150 | | - | |
| 1150 | + | |
1151 | 1151 | | |
1152 | 1152 | | |
1153 | 1153 | | |
| |||
0 commit comments