-
-
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
Bug fix for Scatter3D lines+markers with line color array error #3316
Conversation
src/components/colorscale/calc.js
Outdated
@@ -33,7 +33,12 @@ module.exports = function calc(gd, trace, opts) { | |||
updateStyle(trace._input, containerStr ? (containerStr + '.' + attr) : attr, inputVal); | |||
} | |||
else { | |||
inputContainer[attr] = inputVal; | |||
if(trace._input.type === 'scatter3d') { | |||
trace._input[attr] = inputVal; |
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.
Hmm. Looks to me like containerStr
about isn't getting set properly? What's its value here?
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.
The inputContainer
was undefined
if I recall correctly.
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.
Right , but what about containerStr
?
From this block above
plotly.js/src/components/colorscale/calc.js
Lines 50 to 54 in 3ea5c82
if(containerStr) { | |
container = Lib.nestedProperty(container, containerStr).get(); | |
inputContainer = Lib.nestedProperty(inputContainer, containerStr).get(); | |
fullInputContainer = Lib.nestedProperty(fullInputContainer, containerStr).get() || {}; | |
} |
this leads be to believe that containerStr
isn't getting set properly.
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.
First it is equal to line
; but then when it is set to marker
we get an error.
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.
but then when it is set to
marker
we get an error.
Right, and in this case Colorscale.calc
should not get called in the first place. Something must be not working correctly here:
plotly.js/src/traces/scatter/colorscale_calc.js
Lines 27 to 34 in 3ea5c82
if(subTypes.hasMarkers(trace)) { | |
if(hasColorscale(trace, 'marker')) { | |
calcColorscale(gd, trace, { | |
vals: trace.marker.color, | |
containerStr: 'marker', | |
cLetter: 'c' | |
}); | |
} |
Excellent! |
Fix #2873
@etpinard