@@ -140,6 +140,17 @@ module.exports = {
140
140
role : 'style' ,
141
141
description : 'Sets the width (in px) of annotation arrow.'
142
142
} ,
143
+ standoff : {
144
+ valType : 'number' ,
145
+ min : 0 ,
146
+ dflt : 0 ,
147
+ role : 'style' ,
148
+ description : [
149
+ 'Sets a distance, in pixels, to move the arrowhead away from the' ,
150
+ 'position it is pointing at, for example to point at the edge of' ,
151
+ 'a marker independent of zoom.'
152
+ ] . join ( ' ' )
153
+ } ,
143
154
ax : {
144
155
valType : 'any' ,
145
156
role : 'info' ,
@@ -236,17 +247,17 @@ module.exports = {
236
247
dflt : 'auto' ,
237
248
role : 'info' ,
238
249
description : [
239
- 'Sets the annotation \'s horizontal position anchor' ,
250
+ 'Sets the text box \'s horizontal position anchor' ,
240
251
'This anchor binds the `x` position to the *left*, *center*' ,
241
252
'or *right* of the annotation.' ,
242
253
'For example, if `x` is set to 1, `xref` to *paper* and' ,
243
254
'`xanchor` to *right* then the right-most portion of the' ,
244
255
'annotation lines up with the right-most edge of the' ,
245
256
'plotting area.' ,
246
257
'If *auto*, the anchor is equivalent to *center* for' ,
247
- 'data-referenced annotations' ,
248
- 'whereas for paper-referenced, the anchor picked corresponds ' ,
249
- 'to the closest side.'
258
+ 'data-referenced annotations or if there is an arrow, ' ,
259
+ 'whereas for paper-referenced with no arrow , the anchor picked' ,
260
+ 'corresponds to the closest side.'
250
261
] . join ( ' ' )
251
262
} ,
252
263
yref : {
@@ -286,17 +297,53 @@ module.exports = {
286
297
dflt : 'auto' ,
287
298
role : 'info' ,
288
299
description : [
289
- 'Sets the annotation \'s vertical position anchor' ,
300
+ 'Sets the text box \'s vertical position anchor' ,
290
301
'This anchor binds the `y` position to the *top*, *middle*' ,
291
302
'or *bottom* of the annotation.' ,
292
303
'For example, if `y` is set to 1, `yref` to *paper* and' ,
293
304
'`yanchor` to *top* then the top-most portion of the' ,
294
305
'annotation lines up with the top-most edge of the' ,
295
306
'plotting area.' ,
296
307
'If *auto*, the anchor is equivalent to *middle* for' ,
297
- 'data-referenced annotations' ,
298
- 'whereas for paper-referenced, the anchor picked corresponds' ,
299
- 'to the closest side.'
308
+ 'data-referenced annotations or if there is an arrow,' ,
309
+ 'whereas for paper-referenced with no arrow, the anchor picked' ,
310
+ 'corresponds to the closest side.'
311
+ ] . join ( ' ' )
312
+ } ,
313
+ clicktoshow : {
314
+ valType : 'enumerated' ,
315
+ values : [ false , 'onoff' , 'onout' ] ,
316
+ dflt : false ,
317
+ role : 'style' ,
318
+ description : [
319
+ 'Makes this annotation respond to clicks on the plot.' ,
320
+ 'If you click a data point that exactly matches the `x` and `y`' ,
321
+ 'values of this annotation, and it is hidden (visible: false),' ,
322
+ 'it will appear. In *onoff* mode, you must click the same point' ,
323
+ 'again to make it disappear, so if you click multiple points,' ,
324
+ 'you can show multiple annotations. In *onout* mode, a click' ,
325
+ 'anywhere else in the plot (on another data point or not) will' ,
326
+ 'hide this annotation.' ,
327
+ 'If you need to show/hide this annotation in response to different' ,
328
+ '`x` or `y` values, you can set `xclick` and/or `yclick`. This is' ,
329
+ 'useful for example to label the side of a bar. To label markers' ,
330
+ 'though, `standoff` is preferred over `xclick` and `yclick`.'
331
+ ] . join ( ' ' )
332
+ } ,
333
+ xclick : {
334
+ valType : 'any' ,
335
+ role : 'info' ,
336
+ description : [
337
+ 'Toggle this annotation when clicking a data point whose `x` value' ,
338
+ 'is `xclick` rather than the annotation\'s `x` value.'
339
+ ] . join ( ' ' )
340
+ } ,
341
+ yclick : {
342
+ valType : 'any' ,
343
+ role : 'info' ,
344
+ description : [
345
+ 'Toggle this annotation when clicking a data point whose `y` value' ,
346
+ 'is `yclick` rather than the annotation\'s `y` value.'
300
347
] . join ( ' ' )
301
348
} ,
302
349
0 commit comments