-
-
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
Changes from 5 commits
abf1dd3
8645d4d
5955336
af200f9
f2a0704
47bef38
9203fe5
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
- Add `unselected.line.color` and `unselected.line.opacity` options to `parcoords` trace [[#6216](https://github.com/plotly/plotly.js/pull/6216)] |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -149,7 +149,10 @@ function model(layout, d, i) { | |
var trace = cd0.trace; | ||
var lineColor = helpers.convertTypedArray(cd0.lineColor); | ||
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 commentThe reason will be displayed to describe this comment to others. Learn more. Can There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't think so. Using There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Good call. Addressed in 47bef38. |
||
opacity: trace.unselected.line.opacity | ||
}; | ||
var cOpts = Colorscale.extractOpts(line); | ||
var cscale = cOpts.reversescale ? Colorscale.flipScale(cd0.cscale) : cd0.cscale; | ||
var domain = trace.domain; | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,6 +24,12 @@ | |
] | ||
}, | ||
|
||
"unselected": { | ||
"line": { | ||
"color": "white" | ||
} | ||
}, | ||
|
||
"dimensions": [ | ||
{ | ||
"label": "±1.1", | ||
|
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.