-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Range slider fixes (user set y axis types + trace clearance) #1472
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 all commits
de1668f
3274284
cb0202c
ea1a458
db85763
339ba49
e1d703f
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 |
---|---|---|
|
@@ -571,23 +571,25 @@ plots.cleanPlot = function(newFullData, newFullLayout, oldFullData, oldFullLayou | |
if(oldUid === newTrace.uid) continue oldLoop; | ||
} | ||
|
||
// clean old heatmap, contour, and scatter traces | ||
// | ||
// Note: This is also how scatter traces (cartesian and scatterternary) get | ||
// removed since otherwise the scatter module is not called (and so the join | ||
// doesn't register the removal) if scatter traces disappear entirely. | ||
var query = ( | ||
'.hm' + oldUid + | ||
',.contour' + oldUid + | ||
',#clip' + oldUid + | ||
',.trace' + oldUid | ||
); | ||
|
||
// clean old heatmap, contour traces and clip paths | ||
// that rely on uid identifiers | ||
if(hasPaper) { | ||
oldFullLayout._paper.selectAll( | ||
'.hm' + oldUid + | ||
',.contour' + oldUid + | ||
',#clip' + oldUid + | ||
',.trace' + oldUid | ||
).remove(); | ||
oldFullLayout._paper.selectAll(query).remove(); | ||
} | ||
|
||
// clean old colorbars | ||
// clean old colorbars and range slider plot | ||
if(hasInfoLayer) { | ||
oldFullLayout._infolayer.selectAll('.cb' + oldUid).remove(); | ||
|
||
oldFullLayout._infolayer.selectAll('g.rangeslider-container') | ||
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 chose this pattern
over keeping a ref to some underscore key e.g. |
||
.selectAll(query).remove(); | ||
} | ||
} | ||
}; | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
"data": [ | ||
{ | ||
"x": [ 1, 2, 3 ], | ||
"y": [ 4, 5, 6 ], | ||
"y": [ 4, 5e5, 6e8 ], | ||
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. @alexcjohnson here's |
||
"type": "bar" | ||
}, | ||
{ | ||
|
@@ -31,7 +31,7 @@ | |
}, | ||
"yaxis": { | ||
"domain": [ 0.3, 0.8 ], | ||
"type": "linear" | ||
"type": "log" | ||
}, | ||
"yaxis2": { | ||
"anchor": "x2", | ||
|
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.
Before, we were strictly relying on the axis-auto-type routines in
Plots.supplyDefaults
to determine the range plot y-axis type - which obviously fails when a overrides the y axis type (e.g. in the case of log y axes as presented in #1470)