-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
add unselected.line.color and unselected.line.opacity options to parcoords trace
#6216
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
Conversation
unselected.line.color option to parcoords traceunselected.line.color and unselected.line.opacity options to parcoords trace
src/traces/parcoords/parcoords.js
Outdated
| var line = trace.line; | ||
| var deselectedLines = {color: rgba(c.deselectedLineColor)}; | ||
| var deselectedLines = { | ||
| color: rgba(trace.unselected.line.color || '#777'), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can '#777' be the attribute default?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think so. Using #777 (explicitly or any other color) should set the color of lines to exactly that color.
But I am open to using auto instead of blank string as the dflt of unselected.line.color, if you prefer that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have lots of examples where a color and an opacity are specified side-by-side... and it doesn't mean it's NOT that color, just that there's opacity applied later that dilutes it.
Actually thinking about this a bit more, I might even suggest removing the "set opacity to 1 if a color is explicitly specified" and keep 'auto' as the consistent default, because if you did want to change this color most likely you still want it diluted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good call. Addressed in 47bef38.
src/traces/parcoords/attributes.js
Outdated
| max: 1, | ||
| dflt: 'auto', | ||
| editType: 'plot', | ||
| description: 'Sets the opacity of unselected lines.' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we describe 'auto'? Not the full formula, just qualitatively something like "The default 'auto' decreases the opacity smoothly as the number of lines increases."
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good call. Addressed in 47bef38.
|
@alexcjohnson this PR is ready for another round of review. Thank you 🙏 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💃 great!
|
Hi ! Is there any attribute available now that solves this issue in Python . I want to change the unselected line colour from the default grey to another colour. Please let me know . |
….color and unselected.line.opacity options to parcoords trace (plotly/plotly.js#6216)
Helps control the opacity and color of the
parcoordsdeselected lines in the background.Resolves #6213 and resolves #3939.
@plotly/plotly_js