Skip to content

Commit 68a2305

Browse files
committed
assert axLettter in trace
1 parent 595de82 commit 68a2305

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

src/plots/cartesian/axes.js

-1
Original file line numberDiff line numberDiff line change
@@ -2243,7 +2243,6 @@ axes.draw = function(gd, arg, opts) {
22432243

22442244
plotinfo.xaxislayer.selectAll('.' + xa._id + 'tick').remove();
22452245
plotinfo.yaxislayer.selectAll('.' + ya._id + 'tick').remove();
2246-
debugger;
22472246
plotinfo.xaxislayer.selectAll('.' + xa._id + 'tick2').remove();
22482247
plotinfo.yaxislayer.selectAll('.' + ya._id + 'tick2').remove();
22492248
plotinfo.xaxislayer.selectAll('.' + xa._id + 'divider').remove();

src/plots/cartesian/set_convert.js

+8-7
Original file line numberDiff line numberDiff line change
@@ -384,17 +384,18 @@ module.exports = function setConvert(ax, fullLayout) {
384384
var axLabels = [];
385385
var fullObjectList = [];
386386
var cols = [];
387-
388-
for(var k = 0; k < fullData[traceIndices[0]][axLetter].length; k++) {
389-
cols.push('col' + k.toString());
390-
}
391-
if(cols.length < 2) {
392-
return;
393-
}
394387
// Don't think that the trace should be drawn at all if the lengths don't match. Removing the arrays length check. It is better to fail loudly than silently.
395388

396389
for(i = 0; i < traceIndices.length; i++) {
397390
var trace = fullData[traceIndices[i]];
391+
cols = [];
392+
393+
for(var k = 0; k < fullData[traceIndices[0]][axLetter].length; k++) {
394+
cols.push('col' + k.toString());
395+
}
396+
if(cols.length < 2) {
397+
return;
398+
}
398399

399400
if(axLetter in trace) {
400401
var arrayIn = trace[axLetter];

0 commit comments

Comments
 (0)