Skip to content

Keep SI prefixes off empty localized NaN labels - #166

Open
Twiink wants to merge 1 commit into
d3:mainfrom
Twiink:fix/missing-si-labels
Open

Twiink wants to merge 1 commit into
d3:mainfrom
Twiink:fix/missing-si-labels

Conversation

@Twiink

@Twiink Twiink commented Nov 18, 2026

Copy link
Copy Markdown

Chart labels can suppress missing observations with formatLocale({nan: ''}). Formatting 12000 and then NaN with the same s formatter currently produces 12.0000k and k. The SI-prefix guard examines the formatted label, and an empty string converts to zero. Retain the original NaN check when deciding whether to append a prefix.

The regression failed on main. The rebuilt package passed all 169 tests and ESLint.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant