Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Display values on top of a barChart and for that matter all charts #670

Closed
KobaKhit opened this issue Aug 11, 2014 · 1 comment
Closed

Comments

@KobaKhit
Copy link

Hello. I started using the dc.js because it is an awesome way of condensing so many insights into one dashboard. It is the future of data visualization and has a lot of potential. So far I have multiple suggestions and will start with displaying values on top of bars. The issue I encounter is that I have either a rowChart or a barChart with ordinal x-axis. My goal is to display values on top of the bars while the ordinal labels stay under the x-axis. For the rowChart I was able to use the label function to concatenate bar labels and values. However, for the barChart it requires a lot of hacking (label function is not available for barCharts). Here is a stackoverflow question with a hacky answer for your reference. I think it should be a default option, something like dc.barChart('#Chart').displayValues(true). Related is displaying percentage in the pieChart, but Mike Precup came up with a nice workaround for that. So the values in the bars of a barChart is the hardest of all to achieve and, hopefully, either somebody develops a simple workaround or this feature is added in later commits. I as a intermediate user of javascript am not able to hack my way through and rely on the default options a lot. Thanks for attention.

@gordonwoodhull
Copy link
Contributor

Thanks for reporting this @KobaKhit, however this is a duplicate of #211.

I put a bounty on your SO question and hope to get a slightly less hacky solution. It is not terribly difficult and it's too bad no one contributed code for the earlier issue.

Keep those suggestions coming!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants