【发布时间】:2013-07-10 14:47:34
【问题描述】:
如何将图表条 y 轴的货币值格式化为:
R$ 123.456,00
代替:
R$ 123,456.00
目前我正在使用此函数进行格式化,但无法进行这种简单的更改:
var format = d3.format(',.2f'); // Need to change this, but don't know how
chart.yAxis.tickFormat(function(d) {
return "R$ " + format(d);
});
我已经在 D3 文档中进行了搜索,但找不到任何内容。
【问题讨论】: