@@ -140,6 +140,17 @@ module.exports = {
140140 role : 'style' ,
141141 description : 'Sets the width (in px) of annotation arrow.'
142142 } ,
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+ } ,
143154 ax : {
144155 valType : 'any' ,
145156 role : 'info' ,
@@ -236,17 +247,17 @@ module.exports = {
236247 dflt : 'auto' ,
237248 role : 'info' ,
238249 description : [
239- 'Sets the annotation \'s horizontal position anchor' ,
250+ 'Sets the text box \'s horizontal position anchor' ,
240251 'This anchor binds the `x` position to the *left*, *center*' ,
241252 'or *right* of the annotation.' ,
242253 'For example, if `x` is set to 1, `xref` to *paper* and' ,
243254 '`xanchor` to *right* then the right-most portion of the' ,
244255 'annotation lines up with the right-most edge of the' ,
245256 'plotting area.' ,
246257 '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.'
250261 ] . join ( ' ' )
251262 } ,
252263 yref : {
@@ -286,17 +297,53 @@ module.exports = {
286297 dflt : 'auto' ,
287298 role : 'info' ,
288299 description : [
289- 'Sets the annotation \'s vertical position anchor' ,
300+ 'Sets the text box \'s vertical position anchor' ,
290301 'This anchor binds the `y` position to the *top*, *middle*' ,
291302 'or *bottom* of the annotation.' ,
292303 'For example, if `y` is set to 1, `yref` to *paper* and' ,
293304 '`yanchor` to *top* then the top-most portion of the' ,
294305 'annotation lines up with the top-most edge of the' ,
295306 'plotting area.' ,
296307 '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.'
300347 ] . join ( ' ' )
301348 } ,
302349
0 commit comments