-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Fix scattergl unselected marker opacity for array marker opacity traces #2503
Fix scattergl unselected marker opacity for array marker opacity traces #2503
Conversation
"size": 20, | ||
"opacity": [0.9, 0.8, 0.7, 1, 0.6, 0.8] | ||
}, | ||
"selectedpoints": [1, 4, 2] |
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.
src/traces/scattergl/convert.js
Outdated
|
||
if(Array.isArray(trace.marker.opacity)) { | ||
var mo = trace.marker.opacity; | ||
opts.unselected.opacity = new Array(mo.length); |
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.
what if trace.unselected.marker.opacity
is already defined?
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 guess that would override it. Good eye. Thanks!
}, | ||
"unselected": { | ||
"marker": { | ||
"opacity": 0 |
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.
Looks great 💃 |
fixes #2500 by handling the case where
marker.opacity
is an array and no[un]selected
attributes are set (more info here). To be merged in #2499 to not have to regenerate the baselines once in master.cc @dfcreative @alexcjohnson