fix(dashboards): Reduce max fractional digits for number type to 4#110858
Merged
DominikB2014 merged 3 commits intomasterfrom Mar 17, 2026
Conversation
Tooltip and Y-axis formatters used maximumFractionDigits of 20 for the number data type, producing excessively long decimals especially in percentage charts on prebuilt dashboards. Cap at 4 fractional digits to keep values readable. Refs LINEAR-BROWSE-437 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Contributor
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.
…legend Revert the Y-axis maximumFractionDigits change back to 20 since Y-axis labels are chosen by ECharts and should render at full precision. Instead, update the breakdown legend in visualizationWidget to use formatTooltipValue which caps at 4 fractional digits, matching table cell behavior. Refs LINEAR-BROWSE-437 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Extract the maximumFractionDigits value into a shared constant in widgets/common/settings.tsx, used by both the tooltip formatter and table cell renderer. Includes a TODO to increase precision once we support per-series value types. Refs LINEAR-BROWSE-437 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
DominikB2014
commented
Mar 17, 2026
gggritso
approved these changes
Mar 17, 2026
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.

Reduces
maximumFractionDigitsfrom 20 to 4 for the "number" data type in tooltip formatting and breakdown legend values. This especially helps with percentage-like charts in prebuilt dashboards where values like0.000033452would render with excessive precision.Y-axis labels are left unchanged at full precision since ECharts chooses nice round values for its axis scale and truncating them would misrepresent the scale.
Changes:
formatTooltipValue.tsx— cap number type at 4 fractional digitsvisualizationWidget.tsx— useformatTooltipValueinstead offormatYAxisValuefor breakdown legend values, so they also get capped at 4 digitsBefore

After

Refs LINEAR-BROWSE-437