-
Notifications
You must be signed in to change notification settings - Fork 0
Description
The default formatting of numerical values in the legend is not standard (for example it respects neither the FR nor the US rule for number formatting, but is a mixture of both). For example, the value 12345.67 is currently formatted as 12 345.67 by default.
I know there are values_thousands and values_decimal parameters to choose the thousand separator and the decimal separator, but I think it might be a good thing either to use defaults that match an existing formatting rule, or to be able to control the locale with which the numbers are formatted (optionally it could be possible to say that the map should use the locale of the users displaying it, so that the numbers are always displayed in a way that is correct for them).
Number.prototype.toLocaleString() allows you to format with the current locale or with a given locale (but maybe d3.formatLocale, that you are already using, can do the same thing).