我正在使用nvd3.js multiBarHorizontalChart http://nvd3.org/ghpages/multiBarHorizontal.html,我试图将值格式化为整数,并去掉小数。
chart.yAxis
.tickFormat(d3.format('d'));
chart.xAxis
.tickFormat(d3.format('d'));http://jsfiddle.net/petran/4DAwU/
发布于 2013-08-30 03:09:03
您将格式说明符放在了错误的位置--您想要格式化显示在条形图之后的值。使用以下命令执行此操作
chart.valueFormat(d3.format('d'));https://stackoverflow.com/questions/18519076
复制相似问题