Skip to content

Commit c2203fa

Browse files
committed
Rename 'data' to 'scaled' for size mode attrs of fixed size shapes #2193
1 parent d386b2d commit c2203fa

File tree

1 file changed

+17
-13
lines changed

1 file changed

+17
-13
lines changed

src/components/shapes/attributes.js

+17-13
Original file line numberDiff line numberDiff line change
@@ -77,18 +77,20 @@ module.exports = {
7777
}),
7878
xsizemode: {
7979
valType: 'enumerated',
80-
values: ['data', 'pixel'],
81-
dflt: 'data',
80+
values: ['scaled', 'pixel'],
81+
dflt: 'scaled',
8282
role: 'info',
8383
editType: 'calcIfAutorange+arraydraw',
8484
description: [
8585
'Sets the shapes\'s sizing mode along the x axis.',
86-
'If set to *data*, `x0`, `x1` and x coordinates within `path` refer to',
87-
'data values on the x axis.',
86+
'If set to *scaled*, `x0`, `x1` and x coordinates within `path` refer to',
87+
'data values on the x axis or a fraction of the plot area\'s width',
88+
'(`xref` set to *paper*).',
8889
'If set to *pixel*, `xanchor` specifies the x position in terms',
89-
'of data but `x0`, `x1` and x coordinates within `path`',
90+
'of data or plot fraction but `x0`, `x1` and x coordinates within `path`',
9091
'are pixels relative to `xanchor`. This way, the shape can have',
91-
'a fixed width while maintaining a position relative to data.'
92+
'a fixed width while maintaining a position relative to data or',
93+
'plot fraction.'
9294
].join(' ')
9395
},
9496
xanchor: {
@@ -134,18 +136,20 @@ module.exports = {
134136
}),
135137
ysizemode: {
136138
valType: 'enumerated',
137-
values: ['data', 'pixel'],
138-
dflt: 'data',
139+
values: ['scaled', 'pixel'],
140+
dflt: 'scaled',
139141
role: 'info',
140142
editType: 'calcIfAutorange+arraydraw',
141143
description: [
142144
'Sets the shapes\'s sizing mode along the y axis.',
143-
'If set to *data*, `y0`, `y1` and y coordinates within `path` refer to',
144-
'data values on the y axis.',
145+
'If set to *scaled*, `y0`, `y1` and y coordinates within `path` refer to',
146+
'data values on the y axis or a fraction of the plot area\'s height',
147+
'(`yref` set to *paper*).',
145148
'If set to *pixel*, `yanchor` specifies the y position in terms',
146-
'of data but `y0`, `y1` and y coordinates within `path`',
149+
'of data or plot fraction but `y0`, `y1` and y coordinates within `path`',
147150
'are pixels relative to `yanchor`. This way, the shape can have',
148-
'a fixed height while maintaining a position relative to data.'
151+
'a fixed height while maintaining a position relative to data or',
152+
'plot fraction.'
149153
].join(' ')
150154
},
151155
yanchor: {
@@ -185,7 +189,7 @@ module.exports = {
185189
editType: 'calcIfAutorange+arraydraw',
186190
description: [
187191
'For `type` *path* - a valid SVG path with the pixel values',
188-
'replaced by data values in `xsizemode`/`ysizemode` being *data*',
192+
'replaced by data values in `xsizemode`/`ysizemode` being *scaled*',
189193
'and taken unmodified as pixels relative to `xanchor` and `yanchor`',
190194
'in case of *pixel* size mode.',
191195
'There are a few restrictions / quirks',

0 commit comments

Comments
 (0)