apache/superset

Percentage number formatting in table not working on very small numbers in 5.0.0

已關閉

#36,189 建立於 2025年11月19日

 (8 則留言) (1 個反應) (0 位負責人)TypeScript (17,291 個分叉)batch import
good first issueviz:charts:table🦾 ai-candidate

倉庫指標

星標
 (72,837 顆星)
PR 合併指標
 (平均合併 31天 15小時) (30 天內合併 773 個 PR)

描述

Bug description

Percentage formatting for very small numbers is not applied. The result of attempts to format very small numbers as percentages is that no format is applied and the raw number is returned.

It seems what triggers this is a case in which some of the numbers are very small, but non-zero. If so, all formatting breaks for the column and even larger numbers are not formatted correctly.

E.g. -0.00001229 with D3 format .8% and Small number format .8% will just return the raw value. -0.00001229.

It doesn't matter what percentage format is applied. It fails if the attempted format is .4% or .2% as well.

Here's a link to the Slack conversation I had about this with the AI bots: https://apache-superset.slack.com/archives/C072KSLBTC1/p1763566767804459

There is mention of similar issues with number/currency formatting but nothing relating to percentage formatting specifically.

Screenshots/recordings

No response

Superset version

master / latest-dev

Python version

3.9

Node version

16

Browser

Chrome

Additional context

No response

Checklist

  • I have searched Superset docs and Slack and didn't find a solution to my problem.
  • I have searched the GitHub issue tracker and didn't find a similar bug report.
  • I have checked Superset's logs for errors and if I found a relevant Python stacktrace, I included it here as text in the "additional context" section.

貢獻者指南