Skip to content

Commit

Permalink
Merge pull request #7236 from plotly/drop-autotick
Browse files Browse the repository at this point in the history
Drop deprecated `autotick` attributes from cartesian and gl3d axes
  • Loading branch information
archmoj authored Oct 17, 2024
2 parents 2be6fcc + 61ac98f commit a5b202c
Show file tree
Hide file tree
Showing 41 changed files with 83 additions and 120 deletions.
1 change: 1 addition & 0 deletions draftlogs/7236_remove.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- Drop deprecated autotick attributes from cartesian and gl3d axes [[#7236](https://github.com/plotly/plotly.js/pull/7236)]
9 changes: 0 additions & 9 deletions src/plot_api/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,15 +81,6 @@ exports.cleanLayout = function(layout) {

// prune empty domain arrays made before the new nestedProperty
if(emptyContainer(ax, 'domain')) delete ax.domain;

// autotick -> tickmode
if(ax.autotick !== undefined) {
if(ax.tickmode === undefined) {
ax.tickmode = ax.autotick ? 'auto' : 'linear';
}
delete ax.autotick;
}

}
}

Expand Down
12 changes: 0 additions & 12 deletions src/plots/cartesian/layout_attributes.js
Original file line number Diff line number Diff line change
Expand Up @@ -1230,16 +1230,4 @@ module.exports = {
].join(' ')
},
editType: 'calc',

_deprecated: {
autotick: {
valType: 'boolean',
editType: 'ticks',
description: [
'Obsolete.',
'Set `tickmode` to *auto* for old `autotick` *true* behavior.',
'Set `tickmode` to *linear* for `autotick` *false*.'
].join(' ')
},
}
};
2 changes: 1 addition & 1 deletion src/plots/cartesian/set_convert.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ function isValidCategory(v) {
* Creates/updates these conversion functions, and a few more utilities
* like cleanRange, and makeCalcdata
*
* also clears the autotick constraints ._minDtick, ._forceTick0
* also clears ._minDtick, ._forceTick0
*/
module.exports = function setConvert(ax, fullLayout) {
fullLayout = fullLayout || {};
Expand Down
6 changes: 3 additions & 3 deletions src/plots/gl3d/layout/tick_marks.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@ function computeTickMarks(scene) {
axes.range[1] += 1;
}
// this is necessary to short-circuit the 'y' handling
// in autotick part of calcTicks... Treating all axes as 'y' in this case
// running the autoticks here, then setting
// autoticks to false to get around the 2D handling in calcTicks.
// in tickmode part of calcTicks... Treating all axes as 'y' in this case
// running the tickmode here, then setting
// automode to linear to get around the 2D handling in calcTicks.
var tickModeCached = axes.tickmode;
if(axes.tickmode === 'auto') {
axes.tickmode = 'linear';
Expand Down
3 changes: 0 additions & 3 deletions tasks/test_mock.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -144,9 +144,7 @@ function notBlackListed(name) {
'32',
'annotations',
'annotations-autorange',
'axes_booleans',
'axes_labels',
'axes-ticks',
'candlestick_double-y-axis',
'candlestick_rangeslider_thai',
'category-autorange',
Expand All @@ -163,7 +161,6 @@ function notBlackListed(name) {
'gl2d_14',
'gl2d_17',
'gl2d_annotations',
'gl2d_axes_booleans',
'gl2d_axes_labels',
'gl2d_fill_trace_tozero_order',
'gl2d_fonts',
Expand Down
4 changes: 2 additions & 2 deletions test/image/mocks/11.json
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@
"showgrid": true,
"zeroline": false,
"showline": false,
"autotick": true,
"tickmode": "auto",
"nticks": 0,
"ticks": "",
"showticklabels": true,
Expand Down Expand Up @@ -140,7 +140,7 @@
"showgrid": true,
"zeroline": false,
"showline": false,
"autotick": true,
"tickmode": "auto",
"nticks": 0,
"ticks": "",
"showticklabels": true,
Expand Down
4 changes: 2 additions & 2 deletions test/image/mocks/12.json
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@
"showgrid": false,
"zeroline": false,
"showline": true,
"autotick": true,
"tickmode": "auto",
"nticks": 0,
"ticks": "",
"showticklabels": true,
Expand Down Expand Up @@ -416,7 +416,7 @@
"showgrid": false,
"zeroline": false,
"showline": true,
"autotick": true,
"tickmode": "auto",
"nticks": 0,
"ticks": "",
"showticklabels": true,
Expand Down
4 changes: 2 additions & 2 deletions test/image/mocks/13.json
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@
"showgrid": true,
"zeroline": true,
"showline": true,
"autotick": true,
"tickmode": "auto",
"nticks": 13,
"ticks": "",
"showticklabels": true,
Expand Down Expand Up @@ -272,7 +272,7 @@
"showgrid": true,
"zeroline": true,
"showline": true,
"autotick": true,
"tickmode": "auto",
"nticks": 13,
"ticks": "",
"showticklabels": true,
Expand Down
4 changes: 2 additions & 2 deletions test/image/mocks/14.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
"showgrid": true,
"zeroline": true,
"showline": false,
"autotick": true,
"tickmode": "auto",
"nticks": 40,
"ticks": "",
"showticklabels": true,
Expand Down Expand Up @@ -95,7 +95,7 @@
"showgrid": true,
"zeroline": true,
"showline": false,
"autotick": true,
"tickmode": "auto",
"nticks": 6,
"ticks": "",
"showticklabels": true,
Expand Down
4 changes: 2 additions & 2 deletions test/image/mocks/15.json
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@
"showgrid": false,
"zeroline": true,
"showline": false,
"autotick": true,
"tickmode": "auto",
"nticks": 0,
"ticks": "outside",
"showticklabels": true,
Expand Down Expand Up @@ -210,7 +210,7 @@
"showgrid": true,
"zeroline": true,
"showline": false,
"autotick": false,
"tickmode": "linear",
"nticks": 0,
"ticks": "",
"showticklabels": true,
Expand Down
4 changes: 2 additions & 2 deletions test/image/mocks/17.json
Original file line number Diff line number Diff line change
Expand Up @@ -494,7 +494,7 @@
"showgrid": true,
"zeroline": true,
"showline": false,
"autotick": true,
"tickmode": "auto",
"nticks": 0,
"ticks": "outside",
"showticklabels": true,
Expand Down Expand Up @@ -538,7 +538,7 @@
"showgrid": true,
"zeroline": true,
"showline": false,
"autotick": true,
"tickmode": "auto",
"nticks": 0,
"ticks": "outside",
"showticklabels": true,
Expand Down
12 changes: 6 additions & 6 deletions test/image/mocks/18.json
Original file line number Diff line number Diff line change
Expand Up @@ -1127,7 +1127,7 @@
"showgrid": true,
"zeroline": false,
"showline": false,
"autotick": true,
"tickmode": "auto",
"nticks": 0,
"ticks": "",
"showticklabels": true,
Expand Down Expand Up @@ -1170,7 +1170,7 @@
"showgrid": true,
"zeroline": false,
"showline": false,
"autotick": true,
"tickmode": "auto",
"nticks": 0,
"ticks": "",
"showticklabels": true,
Expand Down Expand Up @@ -1242,7 +1242,7 @@
"showgrid": true,
"zeroline": false,
"showline": false,
"autotick": true,
"tickmode": "auto",
"nticks": 0,
"ticks": "",
"showticklabels": true,
Expand Down Expand Up @@ -1285,7 +1285,7 @@
"showgrid": true,
"zeroline": false,
"showline": false,
"autotick": true,
"tickmode": "auto",
"nticks": 0,
"ticks": "",
"showticklabels": true,
Expand Down Expand Up @@ -1328,7 +1328,7 @@
"showgrid": true,
"zeroline": false,
"showline": false,
"autotick": true,
"tickmode": "auto",
"nticks": 0,
"ticks": "",
"showticklabels": true,
Expand Down Expand Up @@ -1371,7 +1371,7 @@
"showgrid": true,
"zeroline": false,
"showline": false,
"autotick": true,
"tickmode": "auto",
"nticks": 0,
"ticks": "",
"showticklabels": true,
Expand Down
8 changes: 4 additions & 4 deletions test/image/mocks/19.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
"showgrid": true,
"zeroline": true,
"showline": false,
"autotick": true,
"tickmode": "auto",
"nticks": 0,
"ticks": "",
"showticklabels": true,
Expand Down Expand Up @@ -92,7 +92,7 @@
"showgrid": true,
"zeroline": true,
"showline": false,
"autotick": true,
"tickmode": "auto",
"nticks": 0,
"ticks": "",
"showticklabels": true,
Expand Down Expand Up @@ -165,7 +165,7 @@
"showgrid": true,
"zeroline": true,
"showline": false,
"autotick": true,
"tickmode": "auto",
"nticks": 0,
"ticks": "",
"showticklabels": true,
Expand Down Expand Up @@ -205,7 +205,7 @@
"showgrid": true,
"zeroline": true,
"showline": false,
"autotick": true,
"tickmode": "auto",
"nticks": 0,
"ticks": "",
"showticklabels": true,
Expand Down
4 changes: 2 additions & 2 deletions test/image/mocks/21.json
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@
"showgrid": true,
"zeroline": true,
"showline": false,
"autotick": false,
"tickmode": "linear",
"nticks": 0,
"ticks": "outside",
"showticklabels": true,
Expand Down Expand Up @@ -428,7 +428,7 @@
"showgrid": true,
"zeroline": true,
"showline": false,
"autotick": true,
"tickmode": "auto",
"nticks": 0,
"ticks": "outside",
"showticklabels": true,
Expand Down
4 changes: 2 additions & 2 deletions test/image/mocks/22.json
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@
"showgrid": true,
"zeroline": true,
"showline": false,
"autotick": true,
"tickmode": "auto",
"nticks": 0,
"ticks": "outside",
"showticklabels": true,
Expand Down Expand Up @@ -220,7 +220,7 @@
"showgrid": true,
"zeroline": true,
"showline": false,
"autotick": true,
"tickmode": "auto",
"nticks": 0,
"ticks": "outside",
"showticklabels": true,
Expand Down
4 changes: 2 additions & 2 deletions test/image/mocks/23.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
"showgrid": false,
"zeroline": false,
"showline": false,
"autotick": true,
"tickmode": "auto",
"nticks": 0,
"ticks": "",
"showticklabels": true,
Expand Down Expand Up @@ -84,7 +84,7 @@
"showgrid": true,
"zeroline": true,
"showline": false,
"autotick": true,
"tickmode": "auto",
"nticks": 0,
"ticks": "",
"showticklabels": true,
Expand Down
4 changes: 2 additions & 2 deletions test/image/mocks/24.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
"showgrid": true,
"zeroline": true,
"showline": false,
"autotick": true,
"tickmode": "auto",
"nticks": 0,
"ticks": "",
"showticklabels": true,
Expand Down Expand Up @@ -123,7 +123,7 @@
"showgrid": true,
"zeroline": true,
"showline": false,
"autotick": true,
"tickmode": "auto",
"nticks": 0,
"ticks": "",
"showticklabels": true,
Expand Down
4 changes: 2 additions & 2 deletions test/image/mocks/25.json
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
"showgrid": true,
"zeroline": true,
"showline": false,
"autotick": true,
"tickmode": "auto",
"nticks": 16,
"ticks": "",
"showticklabels": true,
Expand Down Expand Up @@ -122,7 +122,7 @@
"showgrid": true,
"zeroline": true,
"showline": false,
"autotick": true,
"tickmode": "auto",
"nticks": 16,
"ticks": "",
"showticklabels": true,
Expand Down
4 changes: 2 additions & 2 deletions test/image/mocks/26.json
Original file line number Diff line number Diff line change
Expand Up @@ -20995,7 +20995,7 @@
"showgrid": true,
"zeroline": true,
"showline": false,
"autotick": true,
"tickmode": "auto",
"nticks": 0,
"ticks": "",
"showticklabels": true,
Expand Down Expand Up @@ -21035,7 +21035,7 @@
"showgrid": true,
"zeroline": true,
"showline": false,
"autotick": true,
"tickmode": "auto",
"nticks": 0,
"ticks": "",
"showticklabels": true,
Expand Down
4 changes: 2 additions & 2 deletions test/image/mocks/27.json
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@
"showgrid": false,
"zeroline": true,
"showline": true,
"autotick": true,
"tickmode": "auto",
"nticks": 0,
"ticks": "outside",
"showticklabels": true,
Expand Down Expand Up @@ -255,7 +255,7 @@
"showgrid": true,
"zeroline": false,
"showline": true,
"autotick": true,
"tickmode": "auto",
"nticks": 0,
"ticks": "",
"showticklabels": true,
Expand Down
Loading

0 comments on commit a5b202c

Please sign in to comment.