fix(explore): y-axis formatting decimal truncation for heatmaps#116144
Conversation
📊 Type Coverage Diff✅ No new type safety issues introduced. Coverage: 93.58% |
nsdeschenes
left a comment
There was a problem hiding this comment.
Everything looks good, just some upset tests 👀
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit b30133b. Configure here.
| default: | ||
| return value.toString(); | ||
| } | ||
| } |
There was a problem hiding this comment.
Near-complete duplication of time series Y-axis formatter
Medium Severity
The new heat map formatYAxisValue is a near-verbatim copy of the time series formatYAxisValue — the 'integer', 'percentage', 'duration', 'size', 'rate', 'currency', and default cases are all identical line-by-line. Only the 'number' case differs. Any future bug fix or behavior change to these shared cases (e.g., duration or size formatting) would need to be applied to both files independently, risking silent divergence. The common logic could be extracted into a shared helper, with only the 'number' formatting strategy parameterized or overridden per widget type.
Reviewed by Cursor Bugbot for commit b30133b. Configure here.
There was a problem hiding this comment.
yes but this is NEEDED


This fixes y-axis formatting for all charts but it was a needed fix for heat maps. Initially the y-axis would preserve decimal points up to 20 spaces (that's way too much) and it would take up so much space on the chart. This is especially seen with the logarithmic heat maps y-axis. I've changed this to use the default in
formatNumberWithDynamicDecimalPointsor 4 decimal points in really small numbers. This way the y-axis values are shown with enough detail but don't take up a big chunk of space.