Accepted answer

Looks like this isn't supported by nvd3 at the moment. See the offending line.

In addition, your format specification isn't quite right. As mentioned in the documentation, "d" ignores non-integer values. So you probably want ",.0f" instead, which means:

  • ,: use commas to separate thousands.
  • .0: precision of zero (the exact meaning of this depends on which type is in use).
  • f: The type; in this case, Number.toFixed. This means a fixed number of digits (the precision) appear after the decimal point, and the number is rounded if necessary.


The .tickFormat method on the .yAxis method doesn't update it properly. This is the work around I used:



I have tried like this

.axisLabel('%').tickFormat(function(d) { return parseFloat(d).toFixed(1) + "%"; });

Its working for me.I am getting results with decimal points and percentage.


this one can format label text from float to integer.

for pie chart:


for line chart:


Related Query

More Query from same tag