Skip to content

Commit 182cbca

Browse files
authored
Merge pull request #6194 from plotly/shape-yref-description
Fix `xref` description of `shapes`
2 parents b194d8c + 81d24db commit 182cbca

File tree

3 files changed

+4
-7
lines changed

3 files changed

+4
-7
lines changed

draftlogs/6194_fix.md

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
- Fix `xref` description of `shapes` [[#6194](https://github.com/plotly/plotly.js/pull/6194)]

src/components/shapes/attributes.js

+2-6
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,7 @@ module.exports = templatedArray('shape', {
5353
xref: extendFlat({}, annAttrs.xref, {
5454
description: [
5555
'Sets the shape\'s x coordinate axis.',
56-
axisPlaceableObjs.axisRefDescription('x', 'left', 'right'),
57-
'If the axis `type` is *log*, then you must take the',
58-
'log of your desired range.',
59-
'If the axis `type` is *date*, then you must convert',
60-
'the date to unix time in milliseconds.'
56+
axisPlaceableObjs.axisRefDescription('x', 'left', 'right')
6157
].join(' ')
6258
}),
6359
xsizemode: {
@@ -108,7 +104,7 @@ module.exports = templatedArray('shape', {
108104
yref: extendFlat({}, annAttrs.yref, {
109105
description: [
110106
'Sets the annotation\'s y coordinate axis.',
111-
axisPlaceableObjs.axisRefDescription('y', 'bottom', 'top'),
107+
axisPlaceableObjs.axisRefDescription('y', 'bottom', 'top')
112108
].join(' ')
113109
}),
114110
ysizemode: {

test/plot-schema.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -6975,7 +6975,7 @@
69756975
"valType": "any"
69766976
},
69776977
"xref": {
6978-
"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 the axis `type` is *log*, then you must take the log of your desired range. If the axis `type` is *date*, then you must convert the date to unix time in milliseconds.",
6978+
"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.",
69796979
"editType": "calc",
69806980
"valType": "enumerated",
69816981
"values": [

0 commit comments

Comments
 (0)