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

pie charts legends not using label() #785

Open
sylvinus opened this issue Dec 7, 2014 · 3 comments
Open

pie charts legends not using label() #785

sylvinus opened this issue Dec 7, 2014 · 3 comments
Milestone

Comments

@sylvinus
Copy link

sylvinus commented Dec 7, 2014

Hello!

Newcomer to dc.js, sorry for the possibly dumb question.

When doing a pie chart, the legend is using d.key, which in my case is an ID and not a label. I'm using the label() function to translate them and the pie chart itself looks fine, but the legend shows the IDs. So for consistency, why not use the label function to generate the names in the legend?

Thanks!

@christianmalek
Copy link

It's often that the labels show different information like percentage values or sth. like that. That wouldn't make so much sense with the legend. But I agree with you that the legend should be more configurable.

@gordonwoodhull gordonwoodhull added this to the v2.1 milestone Dec 9, 2014
@digitalsanity
Copy link

Is this dead?

@gordonwoodhull
Copy link
Contributor

Hi @digitalsanity, dc.js is alive and well, but not every contribution has been merged.

It looks like the associated PR #916 stalled because I wasn’t sure if the same change had to be made for other charts. I.e. should the legendLabelAccessor go on the pie chart or the base mixin?

Without that merged, a workaround could be to override .legendables and change labels. Messy though.

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

No branches or pull requests

4 participants