Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 8 additions & 7 deletions src/plots/cartesian/axes.js
Original file line number Diff line number Diff line change
Expand Up @@ -133,14 +133,15 @@ axes.coercePosition = function(containerOut, gd, coerce, axRef, attr, dflt) {
// empty out types for all axes containing these traces
// so we auto-set them again
axes.clearTypes = function(gd, traces) {
if(!Array.isArray(traces) || !traces.length) {
traces = (gd._fullData).map(function(d, i) { return i; });
var fullData = gd._fullData;
var mockGd = { _fullLayout: gd.layout };

for(var i = 0; i < traces.length; i++) {
var trace = fullData[traces[i]];

(axes.getFromId(mockGd, trace.xaxis) || {}).type = '-';
(axes.getFromId(mockGd, trace.xaxis) || {}).type = '-';
}
traces.forEach(function(tracenum) {
var trace = gd.data[tracenum];
delete (axes.getFromId(gd, trace.xaxis) || {}).type;
delete (axes.getFromId(gd, trace.yaxis) || {}).type;
});
};

// get counteraxis letter for this axis (name or id)
Expand Down