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

hovertemplate d3-format numbers ignoring locale #3580

Closed
jwmann opened this issue Feb 25, 2019 · 1 comment · Fixed by #3586
Closed

hovertemplate d3-format numbers ignoring locale #3580

jwmann opened this issue Feb 25, 2019 · 1 comment · Fixed by #3586
Assignees

Comments

@jwmann
Copy link

jwmann commented Feb 25, 2019

When I set the locale, the dates are formatted correctly. But the numbers using the d3-format ignores that locale and instead follows the en-us default format and not the defined format from Plotly.

As per the built-in locales. => https://github.com/plotly/plotly.js/blob/master/lib/locales/fr.js#L86-L87
For FR, the separator should be a space " " and the decimal should be a comma ",".

Here is a sandbox of my implementation.
Edit react-plotly.js DOM element is null or undefined -- fixed

Hover over the bars on the chart.

The $000,000.00 should look like this $000 000,00 in FR

Maybe I'm missing something obvious though.

@antoinerg
Copy link
Contributor

Thank you @jwmann for reporting this issue. I don't think you're missing anything obvious: the problem probably lies in our current implementation of hovertemplate. We will work on a fix as soon as possible.

Thanks again :)

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

Successfully merging a pull request may close this issue.

2 participants