@@ -8,6 +8,7 @@ var extendFlat = require('../../lib/extend').extendFlat;
88var templatedArray = require ( '../../plot_api/plot_template' ) . templatedArray ;
99var axisPlaceableObjs = require ( '../../constants/axis_placeable_objects' ) ;
1010var basePlotAttributes = require ( '../../plots/attributes' ) ;
11+ var annAttrs = require ( '../annotations/attributes' ) ;
1112const { shapeTexttemplateAttrs, templatefallbackAttrs } = require ( '../../plots/template_attributes' ) ;
1213var shapeLabelTexttemplateVars = require ( './label_texttemplate' ) ;
1314
@@ -114,21 +115,15 @@ module.exports = templatedArray('shape', {
114115 ] . join ( ' ' )
115116 } ,
116117
117- xref : {
118+ xref : extendFlat ( { } , annAttrs . xref , {
118119 arrayOk : true ,
119- valType : 'enumerated' ,
120- values : [
121- 'paper' ,
122- cartesianConstants . idRegex . x . toString ( )
123- ] ,
124- editType : 'calc' ,
125120 description : [
126121 "Sets the shape's x coordinate axis." ,
127122 axisPlaceableObjs . axisRefDescription ( 'x' , 'left' , 'right' ) ,
128123 'If an array of axis IDs is provided, each `x` value will refer to the corresponding axis' ,
129124 '(e.g., [\'x\', \'x2\'] for a rectangle means `x0` uses the `x` axis and `x1` uses the `x2` axis).' ,
130125 ] . join ( ' ' )
131- } ,
126+ } ) ,
132127 xsizemode : {
133128 valType : 'enumerated' ,
134129 values : [ 'scaled' , 'pixel' ] ,
@@ -191,21 +186,15 @@ module.exports = templatedArray('shape', {
191186 'corresponds to the end of the category.'
192187 ] . join ( ' ' )
193188 } ,
194- yref : {
189+ yref : extendFlat ( { } , annAttrs . yref , {
195190 arrayOk : true ,
196- valType : 'enumerated' ,
197- values : [
198- 'paper' ,
199- cartesianConstants . idRegex . y . toString ( )
200- ] ,
201- editType : 'calc' ,
202191 description : [
203192 "Sets the shape's y coordinate axis." ,
204193 axisPlaceableObjs . axisRefDescription ( 'y' , 'bottom' , 'top' ) ,
205194 'If an array of axis IDs is provided, each `y` value will refer to the corresponding axis' ,
206195 '(e.g., [\'y\', \'y2\'] for a rectangle means `y0` uses the `y` axis and `y1` uses the `y2` axis).' ,
207196 ] . join ( ' ' )
208- } ,
197+ } ) ,
209198 ysizemode : {
210199 valType : 'enumerated' ,
211200 values : [ 'scaled' , 'pixel' ] ,
0 commit comments