Skip to content

fix(dashboards): Use scientific notation for small numbers in breakdown table#113144

Open
gggritso wants to merge 1 commit intomasterfrom
georgegritsouk/dain-1430-tooltip-for-small-values-shows-0
Open

fix(dashboards): Use scientific notation for small numbers in breakdown table#113144
gggritso wants to merge 1 commit intomasterfrom
georgegritsouk/dain-1430-tooltip-for-small-values-shows-0

Conversation

@gggritso
Copy link
Copy Markdown
Member

@gggritso gggritso commented Apr 16, 2026

Small number values in the breakdown table below charts showed <0.0001 with a tooltip that displayed 0 for very small values (because toLocaleString() without options rounds aggressively).

This replaces the threshold indicator with scientific notation (e.g., 3.35E-5), which shows the actual value precisely and eliminates the need for a tooltip. This aligns with the number formatting guidelines proposed in #112410.

Changes:

  • formatBreakdownLegendValue now returns scientific notation (3 significant digits) for small number-type values instead of <0.0001
  • Removed the <Tooltip> wrapper for small numbers in VisualizationWidget since the value is no longer obfuscated
  • Added tests for formatBreakdownLegendValue

I didn't bother changing anything else for this PR, though in the future as we solidify the guidelines we'll implement them more rigorously.

Closes DAIN-1430

…wn table

Small number values in the breakdown table below charts showed '<0.0001'
with a tooltip that rounded to '0' for very small values. Replace the
threshold indicator with scientific notation (e.g., '3.35E-5'), which
shows the actual value and eliminates the need for a tooltip.

Refs DAIN-1430
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@linear-code
Copy link
Copy Markdown

linear-code bot commented Apr 16, 2026

@github-actions github-actions bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Apr 16, 2026
@gggritso gggritso marked this pull request as ready for review April 16, 2026 03:18
@gggritso gggritso requested a review from a team as a code owner April 16, 2026 03:18
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