fix: honor explicit format_d3 in tooltips and big numbers - #9798
Open
nishantmonu51 wants to merge 2 commits into
Open
fix: honor explicit format_d3 in tooltips and big numbers#9798nishantmonu51 wants to merge 2 commits into
format_d3 in tooltips and big numbers#9798nishantmonu51 wants to merge 2 commits into
Conversation
Measures with an explicit d3 format were humanized in the tooltip and big-number formatter contexts, so sub-cent values like $0.0002 with format_d3 "$,.4f" rendered as ~$0.00. The explicit format is now honored in every context except axis, and the time-series chart hover uses the tooltip context.
The big number for the d3 measure renders 300576.840 (actual sum), and the chart hover expectation formatter must use the tooltip context to mirror the chart.
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.
format_d3were humanized in thetooltipandbig-numberformatter contexts, capping precision at ~2 decimals. Sub-cent measures like$0.0002withformat_d3: "$,.4f"rendered as~$0.00on the big number and in hover tooltips, while the leaderboard, TDD, and pivot showed full precision.createMeasureValueFormatternow honors an explicit d3 format in every context exceptaxis(tick labels stay humanized so they remain compact). This fixes the explore big number and its hover tooltip, the canvas KPI, the leaderboard/dimension table/pivot cell tooltips, and the cell inspector in one place.tooltipformatter context instead of thetabledefault; themeasure-chartrefactor (chore/feat: MeasureChart refactor #8752) predated the tooltip-context standardization in APP-768: fix: tooltip formatting for measure values across leaderboard, dimension table, and pivot table #9109. This also removes the remaining~$0.00path for sub-cent hovers onformat_presetmeasures.format_presetmeasures keep their humanized big numbers. Updated the unit specs and the e2e expectation for the d3-formatted measure, and fixed the docs paragraph that described the old big number behavior.Checklist: