diff --git a/draftlogs/7843_change.md b/draftlogs/7843_change.md new file mode 100644 index 00000000000..13a635d7c1d --- /dev/null +++ b/draftlogs/7843_change.md @@ -0,0 +1 @@ +- Change `splom.axis.matches` default from `false` to `true` [[#7843](https://github.com/plotly/plotly.js/pull/7843)] diff --git a/src/traces/splom/attributes.js b/src/traces/splom/attributes.js index 679337b30bd..b8eadcad9f4 100644 --- a/src/traces/splom/attributes.js +++ b/src/traces/splom/attributes.js @@ -90,10 +90,9 @@ module.exports = { ].join(' ') }, - // TODO make 'true' the default in v3? matches: { valType: 'boolean', - dflt: false, + dflt: true, editType: 'calc', description: [ 'Determines whether or not the x & y axes generated by this', diff --git a/src/types/generated/schema.d.ts b/src/types/generated/schema.d.ts index d8a20e31113..96c6be2e523 100644 --- a/src/types/generated/schema.d.ts +++ b/src/types/generated/schema.d.ts @@ -10038,7 +10038,7 @@ export interface SplomData { axis?: { /** * Determines whether or not the x & y axes generated by this dimension match. Equivalent to setting the `matches` axis attribute in the layout with the correct axis id. - * @default false + * @default true */ matches?: boolean; /** Sets the axis type for this dimension's generated x and y axes. Note that the axis `type` values set in layout take precedence over this attribute. */ diff --git a/test/image/baselines/splom_0.png b/test/image/baselines/splom_0.png index 64cb6360c33..90849761f94 100644 Binary files a/test/image/baselines/splom_0.png and b/test/image/baselines/splom_0.png differ diff --git a/test/image/baselines/splom_array-styles.png b/test/image/baselines/splom_array-styles.png index 58506263771..73af60eb0ba 100644 Binary files a/test/image/baselines/splom_array-styles.png and b/test/image/baselines/splom_array-styles.png differ diff --git a/test/image/baselines/splom_dates.png b/test/image/baselines/splom_dates.png index 830bd0fd863..5d671156356 100644 Binary files a/test/image/baselines/splom_dates.png and b/test/image/baselines/splom_dates.png differ diff --git a/test/image/baselines/splom_iris.png b/test/image/baselines/splom_iris.png index c6f01108f3f..cb54319d0b7 100644 Binary files a/test/image/baselines/splom_iris.png and b/test/image/baselines/splom_iris.png differ diff --git a/test/image/baselines/splom_large.png b/test/image/baselines/splom_large.png index 2596809d59e..a24c4d1223e 100644 Binary files a/test/image/baselines/splom_large.png and b/test/image/baselines/splom_large.png differ diff --git a/test/image/baselines/splom_log.png b/test/image/baselines/splom_log.png index 9f022f5212f..8031034e14d 100644 Binary files a/test/image/baselines/splom_log.png and b/test/image/baselines/splom_log.png differ diff --git a/test/image/baselines/splom_lower-nodiag.png b/test/image/baselines/splom_lower-nodiag.png index 754cae3eac3..1625f0e897a 100644 Binary files a/test/image/baselines/splom_lower-nodiag.png and b/test/image/baselines/splom_lower-nodiag.png differ diff --git a/test/image/baselines/splom_lower.png b/test/image/baselines/splom_lower.png index d19eb8f1ae5..fdc298a97d7 100644 Binary files a/test/image/baselines/splom_lower.png and b/test/image/baselines/splom_lower.png differ diff --git a/test/image/baselines/splom_mismatched-axis-types.png b/test/image/baselines/splom_mismatched-axis-types.png index f45cda7aa60..bf07860e121 100644 Binary files a/test/image/baselines/splom_mismatched-axis-types.png and b/test/image/baselines/splom_mismatched-axis-types.png differ diff --git a/test/image/baselines/splom_multi-axis-type.png b/test/image/baselines/splom_multi-axis-type.png index 45066de6fb9..556d920dd7c 100644 Binary files a/test/image/baselines/splom_multi-axis-type.png and b/test/image/baselines/splom_multi-axis-type.png differ diff --git a/test/image/baselines/splom_nodiag.png b/test/image/baselines/splom_nodiag.png index 7988f84e9b4..1cdcf1d553e 100644 Binary files a/test/image/baselines/splom_nodiag.png and b/test/image/baselines/splom_nodiag.png differ diff --git a/test/image/baselines/splom_ragged-via-axes.png b/test/image/baselines/splom_ragged-via-axes.png index e82fb0e8382..ec06707f464 100644 Binary files a/test/image/baselines/splom_ragged-via-axes.png and b/test/image/baselines/splom_ragged-via-axes.png differ diff --git a/test/image/baselines/splom_ragged-via-visible-false.png b/test/image/baselines/splom_ragged-via-visible-false.png index 549fc147f9b..c55adcadef3 100644 Binary files a/test/image/baselines/splom_ragged-via-visible-false.png and b/test/image/baselines/splom_ragged-via-visible-false.png differ diff --git a/test/image/baselines/splom_symbol_numbers.png b/test/image/baselines/splom_symbol_numbers.png index 23d5d703129..795c20a3698 100644 Binary files a/test/image/baselines/splom_symbol_numbers.png and b/test/image/baselines/splom_symbol_numbers.png differ diff --git a/test/image/baselines/splom_upper-nodiag.png b/test/image/baselines/splom_upper-nodiag.png index 77c7b48acc6..9552e7174c8 100644 Binary files a/test/image/baselines/splom_upper-nodiag.png and b/test/image/baselines/splom_upper-nodiag.png differ diff --git a/test/image/baselines/splom_upper.png b/test/image/baselines/splom_upper.png index 22524ac06ef..d013b8ba7ab 100644 Binary files a/test/image/baselines/splom_upper.png and b/test/image/baselines/splom_upper.png differ diff --git a/test/image/baselines/splom_with-cartesian.png b/test/image/baselines/splom_with-cartesian.png index c40495a487d..1c289aa9895 100644 Binary files a/test/image/baselines/splom_with-cartesian.png and b/test/image/baselines/splom_with-cartesian.png differ diff --git a/test/jasmine/tests/splom_test.js b/test/jasmine/tests/splom_test.js index 9912f1ec499..71b4d7a7559 100644 --- a/test/jasmine/tests/splom_test.js +++ b/test/jasmine/tests/splom_test.js @@ -695,26 +695,26 @@ describe('Test splom interactions:', function() { } _newPlot(gd, fig).then(function() { - _assert([1198, 16558, 3358, 118]); + _assert([1198, 16798, 3358, 118]); return Plotly.restyle(gd, 'showupperhalf', false); }) .then(function() { - _assert([1198, 8476, 1768, 4]); + _assert([1198, 8704, 1768, 4]); return Plotly.restyle(gd, 'diagonal.visible', false); }) .then(function() { - _assert([1138, 7534, 1600]); + _assert([1138, 7864, 1600]); return Plotly.restyle(gd, { showupperhalf: true, showlowerhalf: false }); }) .then(function() { - _assert([7966, 112, 1588]); + _assert([7978, 112, 1588]); return Plotly.restyle(gd, 'diagonal.visible', true); }) .then(function() { - _assert([58, 8908, 1756, 118]); + _assert([58, 8932, 1756, 118]); return Plotly.relayout(gd, { 'xaxis.gridcolor': null, 'xaxis.gridwidth': null, @@ -725,7 +725,7 @@ describe('Test splom interactions:', function() { .then(function() { // one batch for all 'grid' lines // and another for all 'zeroline' lines - _assert([8968, 1876]); + _assert([8992, 1876]); }) .then(done, done.fail); }); @@ -1237,7 +1237,7 @@ describe('Test splom update switchboard:', function() { expect(scene.matrixOptions.size).toBe(20, msg); expect(gd._fullLayout.xaxis.range) - .toBeCloseToArray([0.753, 3.246], 1, 'xrng ' + msg); + .toBeCloseToArray([0.58, 3.42], 1, 'xrng ' + msg); return Plotly.restyle(gd, 'marker.size', [[4, 10, 20]]); }) @@ -1255,7 +1255,7 @@ describe('Test splom update switchboard:', function() { expect(scene.matrixOptions.sizes).toBeCloseToArray([4, 10, 20], 1, msg); expect(gd._fullLayout.xaxis.range) - .toBeCloseToArray([0.853, 3.235], 1, 'xrng ' + msg); + .toBeCloseToArray([0.81, 3.38], 1, 'xrng ' + msg); return Plotly.restyle(gd, 'marker.symbol', 'square'); }) @@ -1484,11 +1484,11 @@ describe('Test splom drag:', function() { expect(scene.matrix.draw).toHaveBeenCalledTimes(3); _assertRanges('after drag', [ - [2.9, 7.3], + [4.0, 8.5], [1.7, 4.7], [0.3, 7.6] ], [ - [5.1, 9.6], + [4.0, 8.5], [1.7, 4.7], [0.3, 7.6] ]); diff --git a/test/plot-schema.json b/test/plot-schema.json index 4effd2f0c3c..e56053f2635 100644 --- a/test/plot-schema.json +++ b/test/plot-schema.json @@ -75855,7 +75855,7 @@ "editType": "calc+clearAxisTypes", "matches": { "description": "Determines whether or not the x & y axes generated by this dimension match. Equivalent to setting the `matches` axis attribute in the layout with the correct axis id.", - "dflt": false, + "dflt": true, "editType": "calc", "valType": "boolean" },