diff --git a/draftlogs/6194_fix.md b/draftlogs/6194_fix.md new file mode 100644 index 00000000000..88cb978d373 --- /dev/null +++ b/draftlogs/6194_fix.md @@ -0,0 +1 @@ + - Fix `xref` description of `shapes` [[#6194](https://github.com/plotly/plotly.js/pull/6194)] diff --git a/src/components/shapes/attributes.js b/src/components/shapes/attributes.js index 9b81133d150..437952415f9 100644 --- a/src/components/shapes/attributes.js +++ b/src/components/shapes/attributes.js @@ -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: { @@ -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: { diff --git a/test/plot-schema.json b/test/plot-schema.json index 9cf4bbd1950..dc158f4f64a 100644 --- a/test/plot-schema.json +++ b/test/plot-schema.json @@ -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": [