{"action":"opened","issue":{"url":"https://api.github.com/repos/novus/nvd3/issues/1052","labels_url":"https://api.github.com/repos/novus/nvd3/issues/1052/labels{/name}","comments_url":"https://api.github.com/repos/novus/nvd3/issues/1052/comments","events_url":"https://api.github.com/repos/novus/nvd3/issues/1052/events","html_url":"https://github.com/novus/nvd3/issues/1052","id":79538456,"number":1052,"title":"Bullet char - number of ticks is \"hardcoded\"","user":{"login":"tothand","id":3285907,"avatar_url":"https://avatars.githubusercontent.com/u/3285907?v=3","gravatar_id":"","url":"https://api.github.com/users/tothand","html_url":"https://github.com/tothand","followers_url":"https://api.github.com/users/tothand/followers","following_url":"https://api.github.com/users/tothand/following{/other_user}","gists_url":"https://api.github.com/users/tothand/gists{/gist_id}","starred_url":"https://api.github.com/users/tothand/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tothand/subscriptions","organizations_url":"https://api.github.com/users/tothand/orgs","repos_url":"https://api.github.com/users/tothand/repos","events_url":"https://api.github.com/users/tothand/events{/privacy}","received_events_url":"https://api.github.com/users/tothand/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-05-22T17:24:40Z","updated_at":"2015-05-22T17:24:40Z","closed_at":null,"body":"Hi,\r\n\r\nI've just started to use nvd3.js (which is really cool and very easy to use) and I stumbled upon a problem with the number of ticks in bullet charts.\r\n\r\nWhen I have big numbers like thousands, millions as ticks it gets unreadable, too dense (like in the next image)\r\n(sometimes it's ok to scale down, divide it by 1000 or a million and add a subtitle that US$ in millions, but there are cases when the actual number should be there)\r\n\r\n![nvd3_bulletchar_ticks_orig](https://cloud.githubusercontent.com/assets/3285907/7775681/8376bf68-00b5-11e5-81f6-cd3fd61dad4d.png)\r\n\r\nI've found the relevant code here:\r\n```javascript\r\n 2308       // Compute the tick format.\r\n 2309       var format = tickFormat || x1.tickFormat( availableWidth / 100 );\r\n 2310 \r\n 2311       // Update the tick groups.\r\n 2312       var tick = g.selectAll('g.nv-tick')\r\n 2313           .data(x1.ticks( availableWidth / 100 ), function(d) {\r\n 2314             return this.textContent || format(d);\r\n 2315           });\r\n 2316 \r\n```\r\n\r\nThe number of ticks are calculated by dividing the availableWidth with 50 so I've changed it to 100\r\n(as shown in the code above, line 2313) and I got a better result (see screenshot 2 below)\r\n\r\n![nvd3_bulletchar_ticks_mod](https://cloud.githubusercontent.com/assets/3285907/7775761/35b509e6-00b6-11e5-8fc3-5e4d4a4eeafa.png)\r\n\r\nI'm quite new to d3 and nvd3 so I can't really do a proper fix to add a new parameter for the number of ticks or for the number to divide and create a pull request so I'm kindly asking if someone can do that.\r\n\r\nIn the meantime I'm ok with my 'patch' for the current project but it's far from a fix.\r\n\r\nThanks,\r\nAndrew\r\n"}}