Skip to content

Commit 28016cf

Browse files
committed
Set arrayOk for xref/yref and update plot-schema diff
1 parent ef94099 commit 28016cf

2 files changed

Lines changed: 18 additions & 4 deletions

File tree

src/components/shapes/attributes.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,8 @@ module.exports = templatedArray('shape', {
115115
},
116116

117117
xref: {
118-
valType: 'any',
118+
arrayOk: true,
119+
valType: 'enumerated',
119120
editType: 'calc',
120121
description: [
121122
"Sets the shape's x coordinate axis.",
@@ -187,7 +188,8 @@ module.exports = templatedArray('shape', {
187188
].join(' ')
188189
},
189190
yref: {
190-
valType: 'any',
191+
arrayOk: true,
192+
valType: 'enumerated',
191193
editType: 'calc',
192194
description: [
193195
"Sets the shape's y coordinate axis.",

test/plot-schema.json

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9898,9 +9898,15 @@
98989898
"valType": "any"
98999899
},
99009900
"xref": {
9901+
"arrayOk": true,
99019902
"description": "Sets the shape's x coordinate axis. If set to a x axis id (e.g. *x* or *x2*), the `x` position refers to a x coordinate. If set to *paper*, the `x` position refers to the distance from the left of the plotting area in normalized coordinates where *0* (*1*) corresponds to the left (right). If set to a x axis ID followed by *domain* (separated by a space), the position behaves like for *paper*, but refers to the distance in fractions of the domain length from the left of the domain of that axis: e.g., *x2 domain* refers to the domain of the second x axis and a x position of 0.5 refers to the point between the left and the right of the domain of the second x axis. If an array of axis IDs is provided, each `x` value will refer to the corresponding axis (e.g., ['x', 'x2'] for a rectangle means `x0` uses the `x` axis and `x1` uses the `x2` axis).",
99029903
"editType": "calc",
9903-
"valType": "any"
9904+
"valType": "enumerated"
9905+
},
9906+
"xrefsrc": {
9907+
"description": "Sets the source reference on Chart Studio Cloud for `xref`.",
9908+
"editType": "none",
9909+
"valType": "string"
99049910
},
99059911
"xsizemode": {
99069912
"description": "Sets the shapes's sizing mode along the x axis. If set to *scaled*, `x0`, `x1` and x coordinates within `path` refer to data values on the x axis or a fraction of the plot area's width (`xref` set to *paper*). If set to *pixel*, `xanchor` specifies the x position in terms of data or plot fraction but `x0`, `x1` and x coordinates within `path` are pixels relative to `xanchor`. This way, the shape can have a fixed width while maintaining a position relative to data or plot fraction.",
@@ -9944,9 +9950,15 @@
99449950
"valType": "any"
99459951
},
99469952
"yref": {
9953+
"arrayOk": true,
99479954
"description": "Sets the shape's y coordinate axis. If set to a y axis id (e.g. *y* or *y2*), the `y` position refers to a y coordinate. If set to *paper*, the `y` position refers to the distance from the bottom of the plotting area in normalized coordinates where *0* (*1*) corresponds to the bottom (top). If set to a y axis ID followed by *domain* (separated by a space), the position behaves like for *paper*, but refers to the distance in fractions of the domain length from the bottom of the domain of that axis: e.g., *y2 domain* refers to the domain of the second y axis and a y position of 0.5 refers to the point between the bottom and the top of the domain of the second y axis. If an array of axis IDs is provided, each `y` value will refer to the corresponding axis (e.g., ['y', 'y2'] for a rectangle means `y0` uses the `y` axis and `y1` uses the `y2` axis).",
99489955
"editType": "calc",
9949-
"valType": "any"
9956+
"valType": "enumerated"
9957+
},
9958+
"yrefsrc": {
9959+
"description": "Sets the source reference on Chart Studio Cloud for `yref`.",
9960+
"editType": "none",
9961+
"valType": "string"
99509962
},
99519963
"ysizemode": {
99529964
"description": "Sets the shapes's sizing mode along the y axis. If set to *scaled*, `y0`, `y1` and y coordinates within `path` refer to data values on the y axis or a fraction of the plot area's height (`yref` set to *paper*). If set to *pixel*, `yanchor` specifies the y position in terms of data or plot fraction but `y0`, `y1` and y coordinates within `path` are pixels relative to `yanchor`. This way, the shape can have a fixed height while maintaining a position relative to data or plot fraction.",

0 commit comments

Comments
 (0)