Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

provide currencyFormat for Plotly Dash #2932

Open
wants to merge 2 commits into
base: dev
Choose a base branch
from

Conversation

rodasarede
Copy link

Implements #2329
With this commit it is now allowed currency formatting by setting the currencyFormat property to True only when I have type='number'.
When currencyFormat is enabled, the currencySymbol property allows you to specify the currency symbol to be used.
For example, if the input value is 12345, and currencyFormat = true, currencySymbol = '€' it will be displayed as €12345.

Contributor Checklist

  • I have broken down my PR scope into the following TODO tasks
  • I have run the tests locally and they passed. (refer to testing section in [contributing]

With this commit it is now allowed currency formatting by
setting the currencyFormat property to True.
When currencyFormat is enabled, the currencySymbol property
 allows you to specify the currency symbol to be used.
For example, if the input value is 12345, and currencyFormat = true,
currencySymbol = '€' it will be displayed as €12345.

Co-authored-by: Afonso Faleiro <afonso.faleiro@tecnico.ulisboa.pt>
@gvwilson gvwilson self-assigned this Jul 25, 2024
@gvwilson gvwilson removed their assignment Aug 2, 2024
@gvwilson gvwilson added the feature something new label Aug 13, 2024
@gvwilson gvwilson changed the title Implements #2329 : currencyFormat for Plotly Dash provide currencyFormat for Plotly Dash Aug 13, 2024
@gvwilson gvwilson added P2 considered for next cycle community community contribution labels Aug 13, 2024
}
const {currencySymbol} = this.props;

return `${currencySymbol}${Number(value).toLocaleString()}`;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are there cases where the currency symbol comes after the number? Or is that just odd English typography like 15¢ that isn't used for international currencies?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community community contribution feature something new P2 considered for next cycle
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants