15.Format numbers 数字格式转换

221 阅读1分钟

Number Formats (d3-format)

Format numbers for human consumption.将数字格式化为人类可用产品

  • d3.format - alias for locale.format on the default locale.locale。format的别名,格式化为默认本地格式
  • d3.formatPrefix - alias for locale.formatPrefix on the default locale.formatPrefix别名,带前缀格式化
  • locale.format - create a number format.创建一个格式化对象工具
  • locale.formatPrefix - create a SI-prefix number format.带前缀格式化
  • d3.formatSpecifier - parse a number format specifier.解析一个数字格式区分符
  • new d3.FormatSpecifier - augments a number format specifier object.扩充数字格式说明符对象
  • d3.precisionFixed - compute decimal precision for fixed-point notation.计算定点记数法的十进制精度
  • d3.precisionPrefix - compute decimal precision for SI-prefix notation.计算SI前缀表示法的十进制精度。
  • d3.precisionRound - compute significant digits for rounded notation.计算四舍五入表示法的有效数字。
  • d3.formatLocale - define a custom locale. 定义自定义区域设置
  • d3.formatDefaultLocale - define the default locale. 定义默认区域设置