fix(dashboards): Use scientific notation for small numbers in breakdown table#113144
Open
fix(dashboards): Use scientific notation for small numbers in breakdown table#113144
Conversation
…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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Small number values in the breakdown table below charts showed
<0.0001with a tooltip that displayed0for very small values (becausetoLocaleString()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:
formatBreakdownLegendValuenow returns scientific notation (3 significant digits) for smallnumber-type values instead of<0.0001<Tooltip>wrapper for small numbers inVisualizationWidgetsince the value is no longer obfuscatedformatBreakdownLegendValueI 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