add unselected.line.color and unselected.line.opacity options to parcoords trace#6216
add unselected.line.color and unselected.line.opacity options to parcoords trace#6216
unselected.line.color and unselected.line.opacity options to parcoords trace#6216Conversation
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.
Can '#777' be the attribute default?
There was a problem hiding this comment.
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.
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.
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.
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."
|
@alexcjohnson this PR is ready for another round of review. Thank you 🙏 |
|
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