Skip to content

Commit 1823904

Browse files
committed
log info when skipping splom dim of conflicting axis types
1 parent 15efc72 commit 1823904

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

src/traces/splom/index.js

+4-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,10 @@ function calc(gd, trace) {
6262
ya = AxisIDs.getFromId(gd, trace._diag[i][1]);
6363

6464
// if corresponding x & y axes don't have matching types, skip dim
65-
if(xa && ya && xa.type !== ya.type) continue;
65+
if(xa && ya && xa.type !== ya.type) {
66+
Lib.log('Skipping splom dimension ' + i + ' with conflicting axis types');
67+
continue;
68+
}
6669

6770
if(xa) {
6871
makeCalcdata(xa, dim);

test/jasmine/tests/splom_test.js

+4
Original file line numberDiff line numberDiff line change
@@ -409,6 +409,8 @@ describe('Test splom trace calc step:', function() {
409409
}
410410

411411
it('should skip dimensions with conflicting axis types', function() {
412+
spyOn(Lib, 'log').and.callThrough();
413+
412414
_calc({
413415
dimensions: [{
414416
values: [1, 2, 3]
@@ -424,6 +426,8 @@ describe('Test splom trace calc step:', function() {
424426

425427
expect(cd.t._scene.matrixOptions.data).toBeCloseTo2DArray([[2, 1, 2]]);
426428
expect(cd.t.visibleDims).toEqual([1]);
429+
expect(Lib.log).toHaveBeenCalledTimes(1);
430+
expect(Lib.log).toHaveBeenCalledWith('Skipping splom dimension 0 with conflicting axis types');
427431
});
428432
});
429433

0 commit comments

Comments
 (0)