road
road

Reputation: 479

numberDisplay valueAccessor in DC.js seems to round the return value

What I am looking for is to stop the rounding. In this example https://jsfiddle.net/v0rdoyrt/2/ the real value from the .valueAccessor whenever the dataset is above 1000 or 2000 ... is round up to 1k or 2..k. How to turn that off? I have tried .toFixed() and other Javascript method but couldn't make it work.

Upvotes: 0

Views: 172

Answers (1)

Gordon
Gordon

Reputation: 20120

I guess you're looking for numberDisplay.formatNumber?

http://dc-js.github.io/dc.js/docs/html/dc.numberDisplay.html#formatNumber__anchor

Upvotes: 1

Related Questions