2013-10-29 41 views

回答

0

如果我正确理解你的问题,你想格式化y轴的数量。您可以使用tickFormat选项。

https://github.com/mbostock/d3/wiki/Quantitative-Scales#wiki-linear_tickFormat

喜欢的东西:

.tickFormat(function(d) { return d/Math.pow(10,6) } 
+0

是的,我想格式化的y轴的数量,但使用Python绑定nvd3,而不是JavaScript的直接 –

+0

是否蟒蛇,nvd3具有tickFormat功能?我知道nvd3有它。 –

+0

该文档不全面。我在这里找不到它:[链接](http://python-nvd3.readthedocs.org/en/latest/classes-doc/NVD3Chart.html)。 –