Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix xref description of shapes #6194

Merged
merged 3 commits into from
May 26, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions draftlogs/6194_fix.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- Fix `xref` description of `shapes` [[#6194](https://github.com/plotly/plotly.js/pull/6194)]
8 changes: 2 additions & 6 deletions src/components/shapes/attributes.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,7 @@ module.exports = templatedArray('shape', {
xref: extendFlat({}, annAttrs.xref, {
description: [
'Sets the shape\'s x coordinate axis.',
axisPlaceableObjs.axisRefDescription('x', 'left', 'right'),
'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.'
axisPlaceableObjs.axisRefDescription('x', 'left', 'right')
].join(' ')
}),
xsizemode: {
Expand Down Expand Up @@ -108,7 +104,7 @@ module.exports = templatedArray('shape', {
yref: extendFlat({}, annAttrs.yref, {
description: [
'Sets the annotation\'s y coordinate axis.',
axisPlaceableObjs.axisRefDescription('y', 'bottom', 'top'),
axisPlaceableObjs.axisRefDescription('y', 'bottom', 'top')
].join(' ')
}),
ysizemode: {
Expand Down
2 changes: 1 addition & 1 deletion test/plot-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -6975,7 +6975,7 @@
"valType": "any"
},
"xref": {
"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.",
"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.",
"editType": "calc",
"valType": "enumerated",
"values": [
Expand Down