Skip to content

fix: honor explicit format_d3 in tooltips and big numbers - #9798

Open
nishantmonu51 wants to merge 2 commits into
mainfrom
nishant/fix-format-d3-tooltip-bignum
Open

fix: honor explicit format_d3 in tooltips and big numbers#9798
nishantmonu51 wants to merge 2 commits into
mainfrom
nishant/fix-format-d3-tooltip-bignum

Conversation

@nishantmonu51

Copy link
Copy Markdown
Collaborator
  • Measures with an explicit format_d3 were humanized in the tooltip and big-number formatter contexts, capping precision at ~2 decimals. Sub-cent measures like $0.0002 with format_d3: "$,.4f" rendered as ~$0.00 on the big number and in hover tooltips, while the leaderboard, TDD, and pivot showed full precision.
  • createMeasureValueFormatter now honors an explicit d3 format in every context except axis (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.
  • The time-series chart hover readouts now use the tooltip formatter context instead of the table default; the measure-chart refactor (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.00 path for sub-cent hovers on format_preset measures.
  • format_preset measures 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:

  • Covered by tests
  • Ran it and it works as intended
  • Reviewed the diff before requesting a review
  • Checked for unhandled edge cases
  • Linked the issues it closes
  • Checked if the docs need to be updated. If so, create a separate Linear DOCS issue
  • Intend to cherry-pick into the release branch
  • I'm proud of this work!

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.
@nishantmonu51 nishantmonu51 added the blocker A release blocker issue that should be resolved before a new release label Aug 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

blocker A release blocker issue that should be resolved before a new release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant