Skip to content

fix(explore): y-axis formatting decimal truncation for heatmaps#116144

Merged
nikkikapadia merged 7 commits into
masterfrom
nikki/fix/heatmaps-yaxis-value-format
May 27, 2026
Merged

fix(explore): y-axis formatting decimal truncation for heatmaps#116144
nikkikapadia merged 7 commits into
masterfrom
nikki/fix/heatmaps-yaxis-value-format

Conversation

@nikkikapadia
Copy link
Copy Markdown
Member

@nikkikapadia nikkikapadia commented May 25, 2026

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 formatNumberWithDynamicDecimalPoints or 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.

Before After
image image

@github-actions github-actions Bot added the Scope: Frontend Automatically applied to PRs that change frontend components label May 25, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 25, 2026

📊 Type Coverage Diff

✅ No new type safety issues introduced. Coverage: 93.58%

@nikkikapadia nikkikapadia marked this pull request as ready for review May 25, 2026 18:57
@nikkikapadia nikkikapadia requested a review from a team as a code owner May 25, 2026 18:57
@nikkikapadia nikkikapadia requested a review from a team as a code owner May 26, 2026 20:34
Comment thread static/app/views/dashboards/widgets/heatMapWidget/formatters/formatYAxisValue.tsx Outdated
Copy link
Copy Markdown
Contributor

@nsdeschenes nsdeschenes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Everything looks good, just some upset tests 👀

Copy link
Copy Markdown
Contributor

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ 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();
}
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit b30133b. Configure here.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes but this is NEEDED

@nikkikapadia nikkikapadia enabled auto-merge (squash) May 27, 2026 16:57
@nikkikapadia nikkikapadia merged commit 7e849ef into master May 27, 2026
76 checks passed
@nikkikapadia nikkikapadia deleted the nikki/fix/heatmaps-yaxis-value-format branch May 27, 2026 17:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Frontend Automatically applied to PRs that change frontend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants