Skip to content

fix(frontend): Correctly display small usage percentages#1774

Merged
jcscottiii merged 2 commits intomainfrom
jcscottiii/fix-usage-chart
Aug 30, 2025
Merged

fix(frontend): Correctly display small usage percentages#1774
jcscottiii merged 2 commits intomainfrom
jcscottiii/fix-usage-chart

Conversation

@jcscottiii
Copy link
Collaborator

Fixes #1773

The feature usage chart panel was rounding very small percentages (e.g., 0.01%) down to "0.0%", which was inaccurate and hid information from the user.

This change adjusts the formatting logic in the tooltip to:

  • Display percentages between 0.01% and 0.1% with two decimal places.
  • Display percentages smaller than 0.01% with their full precision to avoid rounding them to zero.

This ensures that the tooltip provides the most accurate information available, especially for features with very low usage.

Unit tests for the component have been updated to verify the new formatting behavior.

@jcscottiii jcscottiii marked this pull request as ready for review August 30, 2025 00:44
@jcscottiii jcscottiii requested a review from jrobbins August 30, 2025 00:45
The feature usage chart panel was rounding very small percentages
(e.g., 0.01%) down to "0.0%", which was inaccurate and hid
information from the user.

This change adjusts the formatting logic in the tooltip to:
- Display percentages between 0.01% and 0.1% with two decimal places.
- Display percentages smaller than 0.01% with their full precision
  to avoid rounding them to zero.

This ensures that the tooltip provides the most accurate information
available, especially for features with very low usage.

Unit tests for the component have been updated to verify the new
formatting behavior.
@jcscottiii jcscottiii force-pushed the jcscottiii/fix-usage-chart branch from 8a94b16 to 730cd8f Compare August 30, 2025 01:51
@jcscottiii jcscottiii enabled auto-merge August 30, 2025 01:52
@jcscottiii jcscottiii added this pull request to the merge queue Aug 30, 2025
Merged via the queue into main with commit de229fc Aug 30, 2025
8 of 9 checks passed
@jcscottiii jcscottiii deleted the jcscottiii/fix-usage-chart branch August 30, 2025 09:38
@jrobbins jrobbins mentioned this pull request Sep 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] Very low use counter data is not shown on chart

2 participants