Skip to content

Commit 1c0d3ed

Browse files
committed
add deprecation warning to legacy polar charts attr descriptions
1 parent c5cf89b commit 1c0d3ed

File tree

1 file changed

+20
-5
lines changed

1 file changed

+20
-5
lines changed

src/plots/polar/legacy/axis_attributes.js

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ var axesAttrs = require('../../cartesian/layout_attributes');
1313
var extendFlat = require('../../../lib/extend').extendFlat;
1414
var overrideAll = require('../../../plot_api/edit_types').overrideAll;
1515

16+
var deprecationWarning = 'Legacy polar charts are deprecated!';
17+
1618
var domainAttr = extendFlat({}, axesAttrs.domain, {
1719
description: [
1820
'Polar chart subplots are not supported yet.',
@@ -26,6 +28,7 @@ function mergeAttrs(axisName, nonCommonAttrs) {
2628
valType: 'boolean',
2729
role: 'style',
2830
description: [
31+
deprecationWarning,
2932
'Determines whether or not the line bounding this',
3033
axisName, 'axis',
3134
'will be shown on the figure.'
@@ -35,6 +38,7 @@ function mergeAttrs(axisName, nonCommonAttrs) {
3538
valType: 'boolean',
3639
role: 'style',
3740
description: [
41+
deprecationWarning,
3842
'Determines whether or not the',
3943
axisName, 'axis ticks',
4044
'will feature tick labels.'
@@ -45,6 +49,7 @@ function mergeAttrs(axisName, nonCommonAttrs) {
4549
values: ['horizontal', 'vertical'],
4650
role: 'style',
4751
description: [
52+
deprecationWarning,
4853
'Sets the orientation (from the paper perspective)',
4954
'of the', axisName, 'axis tick labels.'
5055
].join(' ')
@@ -54,31 +59,36 @@ function mergeAttrs(axisName, nonCommonAttrs) {
5459
min: 0,
5560
role: 'style',
5661
description: [
62+
deprecationWarning,
5763
'Sets the length of the tick lines on this', axisName, 'axis.'
5864
].join(' ')
5965
},
6066
tickcolor: {
6167
valType: 'color',
6268
role: 'style',
6369
description: [
70+
deprecationWarning,
6471
'Sets the color of the tick lines on this', axisName, 'axis.'
6572
].join(' ')
6673
},
6774
ticksuffix: {
6875
valType: 'string',
6976
role: 'style',
7077
description: [
78+
deprecationWarning,
7179
'Sets the length of the tick lines on this', axisName, 'axis.'
7280
].join(' ')
7381
},
7482
endpadding: {
7583
valType: 'number',
76-
role: 'style'
84+
role: 'style',
85+
description: deprecationWarning,
7786
},
7887
visible: {
7988
valType: 'boolean',
8089
role: 'info',
8190
description: [
91+
deprecationWarning,
8292
'Determines whether or not this axis will be visible.'
8393
].join(' ')
8494
}
@@ -97,6 +107,7 @@ module.exports = overrideAll({
97107
{ valType: 'number' }
98108
],
99109
description: [
110+
deprecationWarning,
100111
'Defines the start and end point of this radial axis.'
101112
].join(' ')
102113
},
@@ -105,6 +116,7 @@ module.exports = overrideAll({
105116
valType: 'number',
106117
role: 'style',
107118
description: [
119+
deprecationWarning,
108120
'Sets the orientation (an angle with respect to the origin)',
109121
'of the radial axis.'
110122
].join(' ')
@@ -120,6 +132,7 @@ module.exports = overrideAll({
120132
{ valType: 'number', dflt: 360 }
121133
],
122134
description: [
135+
deprecationWarning,
123136
'Defines the start and end point of this angular axis.'
124137
].join(' ')
125138
},
@@ -133,16 +146,18 @@ module.exports = overrideAll({
133146
values: ['clockwise', 'counterclockwise'],
134147
role: 'info',
135148
description: [
136-
'For polar plots only.',
137-
'Sets the direction corresponding to positive angles.'
149+
deprecationWarning,
150+
'Sets the direction corresponding to positive angles',
151+
'in legacy polar charts.'
138152
].join(' ')
139153
},
140154
orientation: {
141155
valType: 'angle',
142156
role: 'info',
143157
description: [
144-
'For polar plots only.',
145-
'Rotates the entire polar by the given angle.'
158+
deprecationWarning,
159+
'Rotates the entire polar by the given angle',
160+
'in legacy polar charts.'
146161
].join(' ')
147162
}
148163
}

0 commit comments

Comments
 (0)