-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
hoverformat/tickformat overwrites separators #1264
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
Comments
Indeed, surprisingly.
Then used like
Which should do the job. I'll try to use it and keep you posted here |
We are experiencing this as well. Is there any workaround or plan to fix this? |
I have found a workaround for displaying numbers correctly with a german locale if you are using var germanLocale = Plotly.d3.locale({
decimal: ',',
thousands: '.',
grouping: [3],
currency: ['€', ''],
dateTime: '%a %b %e %X %Y',
date: '%m.%d.%Y',
time: '%H:%M:%S',
periods: ['AM', 'PM'],
days: ['Sontag', 'Montag', 'Dienstag', 'Mittwoch', 'Donnerstag', 'Freitag', 'Samstag'],
shortDays: ['So', 'Mo', 'Di', 'Mi', 'Do', 'Fr', 'Sa'],
months: ['Januar', 'Februar', 'März', 'April', 'Mai', 'Juni', 'Juli', 'August', 'September', 'Oktober', 'November', 'Dezember'],
shortMonths: ['Jan', 'Feb', 'Mär', 'Apr', 'Mai', 'Jun', 'Jul', 'Aug', 'Sep', 'Okt', 'Nov', 'Dez']
});
Plotly.d3.format = germanLocale.numberFormat; |
cc @alexcjohnson would may or may not come across the same code paths in his i18n work. |
It's not possible to set the separators of thounds and comma when also setting the tickformat or hoverformat.
Settings:
Expected output:
When hover, following number should be printed: "2.323,45".
Example: Codepen
I want to reformat ticks and hover to not show "k" as thounds, but also keep the localized thousand separator and comma.
The text was updated successfully, but these errors were encountered: