意思是,对于("s"),精度表示有效位数.Meaning that, for ("s"), the precision indicates the number of significant digits.这是有趣的部分,它在D3 v3.x API中不存在:And here comes the interesting part, that doesn't exist in D3 v3.x API:因此,formatter(400000)的精度默认为6,这将为您提供:So, the precision for formatter(400000) defaults to 6, which gives you:400.000k例如,如果您执行formatter(40),则会得到:For instance, if you do formatter(40), you'll get:40.0000 PS :在包含小数点的数字中尾随零是有效的.PS: Trailing zeros in a number containing a decimal point are significant. 这篇关于在版本4中使用SI前缀更改数字格式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云!
08-12 05:36