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

Color by category within one dimension, for parcats (and parcoords?) #3061

Closed
alexcjohnson opened this issue Sep 28, 2018 · 3 comments
Closed
Labels
feature something new

Comments

@alexcjohnson
Copy link
Collaborator

In #2963, when @jonmmease introduced the parcats trace type, he showed some existing examples like this one:
parallel sets kosara
One thing this and other examples he showed do that parcats does not is give a categorical colorscale to paths based on one of their dimensions. We let users specify per-path color only with a new line.color array, which is nice for programmatic applications like brushing but not as useful for simply exploring within one parcats diagram. In fact, all these examples color by the first dimension, but in principle it would be nice to be able to color by any dimension. Users should be able to use either layout.colorway or a different colorway, and we should be careful to keep the colors from changing if you drag categories around. I could also imagine letting users perhaps doubleclick a category to switch the coloring to that category.

parcoords might like this feature as well; in that context it would be a colorscale related to a specific dimension.

@alexcjohnson alexcjohnson added the feature something new label Sep 28, 2018
@jonmmease
Copy link
Contributor

I think this would work out pretty naturally once we have categorical color scales (#1747).

Basically setting parcats.line.color to the parcats.dimension.values array of any dimension would accomplish the coloring. Then the doulbeclick support could switch out which dimension's values are used for coloring.

@alexcjohnson
Copy link
Collaborator Author

Thinking about this in the context of uirevision #3236, while a values array should definitely be supported, using a reference to the dimension would be preferable when that's what you're doing. That way if the underlying data is updated the colors follow along.

@gvwilson
Copy link
Contributor

Hi - this issue has been sitting for a while, so as part of our effort to tidy up our public repositories I'm going to close it. If it's still a concern, we'd be grateful if you could open a new issue (with a short reproducible example if appropriate) so that we can add it to our stack. Cheers - @gvwilson

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

No branches or pull requests

3 participants