Skip to content

hovertemplate d3-format numbers ignoring locale #3580

Closed
@jwmann

Description

@jwmann

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.

Metadata

Metadata

Assignees

Labels

bugsomething broken

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions