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

Wrong colors used in scaleOrdinal w/ not all of range used #51

Closed
jrdnmdhl opened this issue Feb 24, 2017 · 3 comments
Closed

Wrong colors used in scaleOrdinal w/ not all of range used #51

jrdnmdhl opened this issue Feb 24, 2017 · 3 comments

Comments

@jrdnmdhl
Copy link

It looks like the wrong colors are used when colorLegend is passed a scale whose range includes more colors than values in the domain.

As an example, the mismatched colors will result when using d3.scaleOrdinal(d3.schemeCategory10) when only two values in the domain are present.

@curran
Copy link

curran commented Feb 25, 2017

Do you have a specific working example of this that you could share?

@jrdnmdhl
Copy link
Author

jrdnmdhl commented Feb 25, 2017

Thought this would be easy to reproduce, but I can't seem to do it minimally. At this point, seems more likely a bug in my code than in d3-legend. Closing for this for now...

@susielu
Copy link
Owner

susielu commented Feb 25, 2017

@curran thanks for responding to this! 😊👌

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

3 participants