Skip to content

Commit a5b202c

Browse files
authored
Merge pull request #7236 from plotly/drop-autotick
Drop deprecated `autotick` attributes from cartesian and gl3d axes
2 parents 2be6fcc + 61ac98f commit a5b202c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+83
-120
lines changed

draftlogs/7236_remove.md

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
- Drop deprecated autotick attributes from cartesian and gl3d axes [[#7236](https://github.com/plotly/plotly.js/pull/7236)]

src/plot_api/helpers.js

-9
Original file line numberDiff line numberDiff line change
@@ -81,15 +81,6 @@ exports.cleanLayout = function(layout) {
8181

8282
// prune empty domain arrays made before the new nestedProperty
8383
if(emptyContainer(ax, 'domain')) delete ax.domain;
84-
85-
// autotick -> tickmode
86-
if(ax.autotick !== undefined) {
87-
if(ax.tickmode === undefined) {
88-
ax.tickmode = ax.autotick ? 'auto' : 'linear';
89-
}
90-
delete ax.autotick;
91-
}
92-
9384
}
9485
}
9586

src/plots/cartesian/layout_attributes.js

-12
Original file line numberDiff line numberDiff line change
@@ -1230,16 +1230,4 @@ module.exports = {
12301230
].join(' ')
12311231
},
12321232
editType: 'calc',
1233-
1234-
_deprecated: {
1235-
autotick: {
1236-
valType: 'boolean',
1237-
editType: 'ticks',
1238-
description: [
1239-
'Obsolete.',
1240-
'Set `tickmode` to *auto* for old `autotick` *true* behavior.',
1241-
'Set `tickmode` to *linear* for `autotick` *false*.'
1242-
].join(' ')
1243-
},
1244-
}
12451233
};

src/plots/cartesian/set_convert.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ function isValidCategory(v) {
5858
* Creates/updates these conversion functions, and a few more utilities
5959
* like cleanRange, and makeCalcdata
6060
*
61-
* also clears the autotick constraints ._minDtick, ._forceTick0
61+
* also clears ._minDtick, ._forceTick0
6262
*/
6363
module.exports = function setConvert(ax, fullLayout) {
6464
fullLayout = fullLayout || {};

src/plots/gl3d/layout/tick_marks.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,9 @@ function computeTickMarks(scene) {
5252
axes.range[1] += 1;
5353
}
5454
// this is necessary to short-circuit the 'y' handling
55-
// in autotick part of calcTicks... Treating all axes as 'y' in this case
56-
// running the autoticks here, then setting
57-
// autoticks to false to get around the 2D handling in calcTicks.
55+
// in tickmode part of calcTicks... Treating all axes as 'y' in this case
56+
// running the tickmode here, then setting
57+
// automode to linear to get around the 2D handling in calcTicks.
5858
var tickModeCached = axes.tickmode;
5959
if(axes.tickmode === 'auto') {
6060
axes.tickmode = 'linear';

tasks/test_mock.mjs

-3
Original file line numberDiff line numberDiff line change
@@ -144,9 +144,7 @@ function notBlackListed(name) {
144144
'32',
145145
'annotations',
146146
'annotations-autorange',
147-
'axes_booleans',
148147
'axes_labels',
149-
'axes-ticks',
150148
'candlestick_double-y-axis',
151149
'candlestick_rangeslider_thai',
152150
'category-autorange',
@@ -163,7 +161,6 @@ function notBlackListed(name) {
163161
'gl2d_14',
164162
'gl2d_17',
165163
'gl2d_annotations',
166-
'gl2d_axes_booleans',
167164
'gl2d_axes_labels',
168165
'gl2d_fill_trace_tozero_order',
169166
'gl2d_fonts',

test/image/mocks/11.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@
9696
"showgrid": true,
9797
"zeroline": false,
9898
"showline": false,
99-
"autotick": true,
99+
"tickmode": "auto",
100100
"nticks": 0,
101101
"ticks": "",
102102
"showticklabels": true,
@@ -140,7 +140,7 @@
140140
"showgrid": true,
141141
"zeroline": false,
142142
"showline": false,
143-
"autotick": true,
143+
"tickmode": "auto",
144144
"nticks": 0,
145145
"ticks": "",
146146
"showticklabels": true,

test/image/mocks/12.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,7 @@
376376
"showgrid": false,
377377
"zeroline": false,
378378
"showline": true,
379-
"autotick": true,
379+
"tickmode": "auto",
380380
"nticks": 0,
381381
"ticks": "",
382382
"showticklabels": true,
@@ -416,7 +416,7 @@
416416
"showgrid": false,
417417
"zeroline": false,
418418
"showline": true,
419-
"autotick": true,
419+
"tickmode": "auto",
420420
"nticks": 0,
421421
"ticks": "",
422422
"showticklabels": true,

test/image/mocks/13.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@
232232
"showgrid": true,
233233
"zeroline": true,
234234
"showline": true,
235-
"autotick": true,
235+
"tickmode": "auto",
236236
"nticks": 13,
237237
"ticks": "",
238238
"showticklabels": true,
@@ -272,7 +272,7 @@
272272
"showgrid": true,
273273
"zeroline": true,
274274
"showline": true,
275-
"autotick": true,
275+
"tickmode": "auto",
276276
"nticks": 13,
277277
"ticks": "",
278278
"showticklabels": true,

test/image/mocks/14.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
"showgrid": true,
5555
"zeroline": true,
5656
"showline": false,
57-
"autotick": true,
57+
"tickmode": "auto",
5858
"nticks": 40,
5959
"ticks": "",
6060
"showticklabels": true,
@@ -95,7 +95,7 @@
9595
"showgrid": true,
9696
"zeroline": true,
9797
"showline": false,
98-
"autotick": true,
98+
"tickmode": "auto",
9999
"nticks": 6,
100100
"ticks": "",
101101
"showticklabels": true,

test/image/mocks/15.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@
170170
"showgrid": false,
171171
"zeroline": true,
172172
"showline": false,
173-
"autotick": true,
173+
"tickmode": "auto",
174174
"nticks": 0,
175175
"ticks": "outside",
176176
"showticklabels": true,
@@ -210,7 +210,7 @@
210210
"showgrid": true,
211211
"zeroline": true,
212212
"showline": false,
213-
"autotick": false,
213+
"tickmode": "linear",
214214
"nticks": 0,
215215
"ticks": "",
216216
"showticklabels": true,

test/image/mocks/17.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -494,7 +494,7 @@
494494
"showgrid": true,
495495
"zeroline": true,
496496
"showline": false,
497-
"autotick": true,
497+
"tickmode": "auto",
498498
"nticks": 0,
499499
"ticks": "outside",
500500
"showticklabels": true,
@@ -538,7 +538,7 @@
538538
"showgrid": true,
539539
"zeroline": true,
540540
"showline": false,
541-
"autotick": true,
541+
"tickmode": "auto",
542542
"nticks": 0,
543543
"ticks": "outside",
544544
"showticklabels": true,

test/image/mocks/18.json

+6-6
Original file line numberDiff line numberDiff line change
@@ -1127,7 +1127,7 @@
11271127
"showgrid": true,
11281128
"zeroline": false,
11291129
"showline": false,
1130-
"autotick": true,
1130+
"tickmode": "auto",
11311131
"nticks": 0,
11321132
"ticks": "",
11331133
"showticklabels": true,
@@ -1170,7 +1170,7 @@
11701170
"showgrid": true,
11711171
"zeroline": false,
11721172
"showline": false,
1173-
"autotick": true,
1173+
"tickmode": "auto",
11741174
"nticks": 0,
11751175
"ticks": "",
11761176
"showticklabels": true,
@@ -1242,7 +1242,7 @@
12421242
"showgrid": true,
12431243
"zeroline": false,
12441244
"showline": false,
1245-
"autotick": true,
1245+
"tickmode": "auto",
12461246
"nticks": 0,
12471247
"ticks": "",
12481248
"showticklabels": true,
@@ -1285,7 +1285,7 @@
12851285
"showgrid": true,
12861286
"zeroline": false,
12871287
"showline": false,
1288-
"autotick": true,
1288+
"tickmode": "auto",
12891289
"nticks": 0,
12901290
"ticks": "",
12911291
"showticklabels": true,
@@ -1328,7 +1328,7 @@
13281328
"showgrid": true,
13291329
"zeroline": false,
13301330
"showline": false,
1331-
"autotick": true,
1331+
"tickmode": "auto",
13321332
"nticks": 0,
13331333
"ticks": "",
13341334
"showticklabels": true,
@@ -1371,7 +1371,7 @@
13711371
"showgrid": true,
13721372
"zeroline": false,
13731373
"showline": false,
1374-
"autotick": true,
1374+
"tickmode": "auto",
13751375
"nticks": 0,
13761376
"ticks": "",
13771377
"showticklabels": true,

test/image/mocks/19.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
"showgrid": true,
5252
"zeroline": true,
5353
"showline": false,
54-
"autotick": true,
54+
"tickmode": "auto",
5555
"nticks": 0,
5656
"ticks": "",
5757
"showticklabels": true,
@@ -92,7 +92,7 @@
9292
"showgrid": true,
9393
"zeroline": true,
9494
"showline": false,
95-
"autotick": true,
95+
"tickmode": "auto",
9696
"nticks": 0,
9797
"ticks": "",
9898
"showticklabels": true,
@@ -165,7 +165,7 @@
165165
"showgrid": true,
166166
"zeroline": true,
167167
"showline": false,
168-
"autotick": true,
168+
"tickmode": "auto",
169169
"nticks": 0,
170170
"ticks": "",
171171
"showticklabels": true,
@@ -205,7 +205,7 @@
205205
"showgrid": true,
206206
"zeroline": true,
207207
"showline": false,
208-
"autotick": true,
208+
"tickmode": "auto",
209209
"nticks": 0,
210210
"ticks": "",
211211
"showticklabels": true,

test/image/mocks/21.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -388,7 +388,7 @@
388388
"showgrid": true,
389389
"zeroline": true,
390390
"showline": false,
391-
"autotick": false,
391+
"tickmode": "linear",
392392
"nticks": 0,
393393
"ticks": "outside",
394394
"showticklabels": true,
@@ -428,7 +428,7 @@
428428
"showgrid": true,
429429
"zeroline": true,
430430
"showline": false,
431-
"autotick": true,
431+
"tickmode": "auto",
432432
"nticks": 0,
433433
"ticks": "outside",
434434
"showticklabels": true,

test/image/mocks/22.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@
180180
"showgrid": true,
181181
"zeroline": true,
182182
"showline": false,
183-
"autotick": true,
183+
"tickmode": "auto",
184184
"nticks": 0,
185185
"ticks": "outside",
186186
"showticklabels": true,
@@ -220,7 +220,7 @@
220220
"showgrid": true,
221221
"zeroline": true,
222222
"showline": false,
223-
"autotick": true,
223+
"tickmode": "auto",
224224
"nticks": 0,
225225
"ticks": "outside",
226226
"showticklabels": true,

test/image/mocks/23.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
"showgrid": false,
4545
"zeroline": false,
4646
"showline": false,
47-
"autotick": true,
47+
"tickmode": "auto",
4848
"nticks": 0,
4949
"ticks": "",
5050
"showticklabels": true,
@@ -84,7 +84,7 @@
8484
"showgrid": true,
8585
"zeroline": true,
8686
"showline": false,
87-
"autotick": true,
87+
"tickmode": "auto",
8888
"nticks": 0,
8989
"ticks": "",
9090
"showticklabels": true,

test/image/mocks/24.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@
7575
"showgrid": true,
7676
"zeroline": true,
7777
"showline": false,
78-
"autotick": true,
78+
"tickmode": "auto",
7979
"nticks": 0,
8080
"ticks": "",
8181
"showticklabels": true,
@@ -123,7 +123,7 @@
123123
"showgrid": true,
124124
"zeroline": true,
125125
"showline": false,
126-
"autotick": true,
126+
"tickmode": "auto",
127127
"nticks": 0,
128128
"ticks": "",
129129
"showticklabels": true,

test/image/mocks/25.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@
8282
"showgrid": true,
8383
"zeroline": true,
8484
"showline": false,
85-
"autotick": true,
85+
"tickmode": "auto",
8686
"nticks": 16,
8787
"ticks": "",
8888
"showticklabels": true,
@@ -122,7 +122,7 @@
122122
"showgrid": true,
123123
"zeroline": true,
124124
"showline": false,
125-
"autotick": true,
125+
"tickmode": "auto",
126126
"nticks": 16,
127127
"ticks": "",
128128
"showticklabels": true,

test/image/mocks/26.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -20995,7 +20995,7 @@
2099520995
"showgrid": true,
2099620996
"zeroline": true,
2099720997
"showline": false,
20998-
"autotick": true,
20998+
"tickmode": "auto",
2099920999
"nticks": 0,
2100021000
"ticks": "",
2100121001
"showticklabels": true,
@@ -21035,7 +21035,7 @@
2103521035
"showgrid": true,
2103621036
"zeroline": true,
2103721037
"showline": false,
21038-
"autotick": true,
21038+
"tickmode": "auto",
2103921039
"nticks": 0,
2104021040
"ticks": "",
2104121041
"showticklabels": true,

test/image/mocks/27.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@
215215
"showgrid": false,
216216
"zeroline": true,
217217
"showline": true,
218-
"autotick": true,
218+
"tickmode": "auto",
219219
"nticks": 0,
220220
"ticks": "outside",
221221
"showticklabels": true,
@@ -255,7 +255,7 @@
255255
"showgrid": true,
256256
"zeroline": false,
257257
"showline": true,
258-
"autotick": true,
258+
"tickmode": "auto",
259259
"nticks": 0,
260260
"ticks": "",
261261
"showticklabels": true,

0 commit comments

Comments
 (0)