krispo / angular-nvd3

AngularJS directive for NVD3 reusable charting library (based on D3). Easily customize your charts via JSON API.
http://krispo.github.io/angular-nvd3
MIT License
1.29k stars 377 forks source link

MultiBar Horizontal Chart Not displaying properly according to largest number and axis #674

Open w0ns88 opened 7 years ago

w0ns88 commented 7 years ago

I am using the MultiBar Horizontal Chart to display some data about users in my system.

But for some reason, the Horizontal Bars values and the axis values are not in sync.

horizontalbarchart

Anyone know the reason for this? If you need more info I can provide :)

w0ns88 commented 7 years ago

OK I think I found the issue:

  1. The values I was fetching were strings, I changed them to be numbers

  2. As shown above on the axis, some values are repeated. I changed it like so: tickFormat: function (d) { return d3.format('B ,.0f')(d); } where "B" is important to include in the format.