Skip to content

fix(dashboards): Treat TOP_N display type as AREA#109876

Draft
DominikB2014 wants to merge 2 commits intomasterfrom
fix/dain-1267-top-n-to-area
Draft

fix(dashboards): Treat TOP_N display type as AREA#109876
DominikB2014 wants to merge 2 commits intomasterfrom
fix/dain-1267-top-n-to-area

Conversation

@DominikB2014
Copy link
Contributor

@DominikB2014 DominikB2014 commented Mar 4, 2026

TOP_N is an outdated display type that some users still have saved in their
dashboards (e.g. from the General Template). It uses a legacy rendering path
that doesn't abbreviate y-axis values, causing large numbers like 150000000
to display unformatted.

Tested with https://sentry.sentry.io/dashboard/128570/
Before
image

After
image

This PR maps TOP_NAREA in two places:

  • Widget builder: deserializeDisplayType now converts TOP_N to AREA,
    so when users open an old TOP_N widget, the type selector shows "Area". When
    they re-save, the widget is persisted as AREA — gradually migrating users off
    the deprecated type.

  • Widget card: Instead of the old TOP_N-specific query manipulation (trimming
    aggregates, setting a results limit), it simply converts the display type to
    AREA so the widget renders through the standard area chart path with proper
    formatting.

Fixes DAIN-1267

TOP_N is an outdated display type that some users still have saved.
It uses a different rendering path that doesn't abbreviate y-axis
values, causing large numbers to display unformatted.

Map TOP_N to AREA in both the widget builder (so re-saving gradually
migrates widgets) and the widget card (so existing TOP_N widgets
render correctly).

Fixes DAIN-1267
Co-Authored-By: Claude <noreply@anthropic.com>
@linear
Copy link

linear bot commented Mar 4, 2026

@github-actions github-actions bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Mar 4, 2026
@DominikB2014
Copy link
Contributor Author

@cursor review

Copy link
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.

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

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.

1 participant