You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "kleostouraiti (via GitHub)" <gi...@apache.org> on 2026/06/03 17:17:17 UTC

[D] feat(currency-format): per-currency symbol position for auto-detect currency [superset]

GitHub user kleostouraiti created a discussion: feat(currency-format): per-currency symbol position for auto-detect currency

## Problem

Dynamic / **Auto-detect** currency formatting ([#36416](https://github.com/apache/superset/pull/36416)) correctly resolves **which** ISO 4217 symbol to show, but symbol **placement** (prefix vs suffix) is inconsistent:

1. Chart controls often persist `symbolPosition: "suffix"` even when the prefix/suffix dropdown appears empty (upstream default). GBP and USD charts then render as `1,234 £` instead of `£ 1,234`.
2. With Auto-detect and an unset position, every currency inherits the same global default (suffix), which does not match common conventions (e.g. EUR often shown as `1.234,56 €`, USD/GBP as `$1,234` / `£1,234`).

## Proposed behavior

| Case | Behavior |
|------|----------|
| User selects **prefix** | Always prefix |
| User selects **suffix** | Suffix only for currencies in a small default suffix set (initially EUR); USD/GBP still prefix |
| Position unset / auto-detect | EUR → suffix; other ISO codes → prefix |

## Scope

- `@superset-ui/core` `CurrencyFormatter` and `utils.ts` (auto-detect path)
- Unit tests in `superset-ui-core/test/currency-format/`

## Out of scope (for now)

- Instance-level config for suffix currency list (could follow in a separate PR)
- Changing D3 number locale / `D3_FORMAT` (orthogonal)

## Context

We hit this in production with multi-currency datasets (currency code column + Auto-detect). Happy to contribute a PR if this direction aligns with maintainers.


GitHub link: https://github.com/apache/superset/discussions/40728

----
This is an automatically sent email for notifications@superset.apache.org.
To unsubscribe, please send an email to: notifications-unsubscribe@superset.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [D] feat(currency-format): per-currency symbol position for auto-detect currency [superset]

Posted by "139Vaibhav (via GitHub)" <gi...@apache.org>.
GitHub user 139Vaibhav added a comment to the discussion: feat(currency-format): per-currency symbol position for auto-detect currency

🤖 **Devin has been assigned to this issue.**

Session: https://app.devin.ai/sessions/64f06c06f9e24bae9317cac158e2c778

_I will post a follow-up comment when a pull request is ready._

GitHub link: https://github.com/apache/superset/discussions/40728#discussioncomment-17169523

----
This is an automatically sent email for notifications@superset.apache.org.
To unsubscribe, please send an email to: notifications-unsubscribe@superset.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org