使用本示例http://nvd3.com/ghpages/stackedArea.html中所示的堆积面积图
尝试将y轴记号标签和工具提示标签格式化为整数而不是浮点数。尝试将以下代码从
chart.yAxis
.axisLabel('Users')
.tickFormat(d3.format(',.2f'));
至
chart.yAxis
.axisLabel('Users')
.tickFormat(d3.format(',.0d'));
精度保持不变(仍将值显示到第100位)。我已经关注了Github Wiki,但没有用https://github.com/mbostock/d3/wiki/Formatting#wiki-d3_format
我们将非常感谢您的任何建议或提示。
https://stackoverflow.com/questions/11656788
复制相似问题