-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Better polar setConvert + a few misc polar touch ups #2895
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 1 commit
e9c3ef8
80717d5
3d8eef2
87a3920
91064ca
3787bfa
4f881fa
449dc43
dae3ccd
d3b3615
ec57a42
f5bceda
0c517d1
4c11c84
b4700ca
c3044e0
b81885d
75786e4
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 |
---|---|---|
|
@@ -1122,6 +1122,13 @@ describe('Test polar interactions:', function() { | |
patch: function(fig) { | ||
fig.data.forEach(function(trace) { trace.mode = 'markers+lines'; }); | ||
} | ||
}, { | ||
desc: 'gl and non-gl on same subplot case', | ||
patch: function(fig) { | ||
fig.data.forEach(function(trace, i) { | ||
trace.type = (i % 2) ? 'scatterpolar' : 'scatterpolargl'; | ||
}); | ||
} | ||
}]; | ||
|
||
specs.forEach(function(s) { | ||
|
@@ -1136,7 +1143,9 @@ describe('Test polar interactions:', function() { | |
fig.layout.margin = {l: 50, t: 50, b: 50, r: 50}; | ||
|
||
if(s.patch) s.patch(fig); | ||
nTraces = fig.data.length; | ||
nTraces = fig.data.reduce(function(acc, trace) { | ||
return (trace.type === 'scatterpolargl') ? ++acc : acc; | ||
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. hmm, OK. I always find prefix 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. you're right, filter is better: b4700ca |
||
}, 0); | ||
|
||
Plotly.newPlot(gd, fig).then(function() { | ||
scene = gd._fullLayout.polar._subplot._scene; | ||
|
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.
is it possible to not have
_this._scene
at this point if there's agl
trace?BTW this would be clearer with
traceType
instead ofk
.I don't see a problem at the moment because there's only one
gl
type that can be here, but for future reference seems like if we ever add another we'll have to make sure only the first one clears the scene.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.
Thanks for tip. Improvements in -> b81885d