d3.formatLocale()

d3.formatLocale(definition)

Returns a locale object for the specified definition with locale.format and locale.formatPrefix methods. The definition must include the following properties:

  • decimal - the decimal point (e.g., ".").
  • thousands - the group separator (e.g., ",").
  • grouping - the array of group sizes (e.g., [3]), cycled as needed.
  • currency - the currency prefix and suffix (e.g., ["$", ""]).

Note that the thousands property is a misnomer, as the grouping definition allows groups other than thousands.

doc_D3_Js
2016-11-24 10:26:06
Comments
Leave a Comment

Please login to continue.