11
11
var ARROWPATHS = require ( './arrow_paths' ) ;
12
12
var fontAttrs = require ( '../../plots/font_attributes' ) ;
13
13
var cartesianConstants = require ( '../../plots/cartesian/constants' ) ;
14
- var extendFlat = require ( '../../lib/extend' ) . extendFlat ;
15
14
16
15
17
16
module . exports = {
@@ -21,6 +20,7 @@ module.exports = {
21
20
valType : 'boolean' ,
22
21
role : 'info' ,
23
22
dflt : true ,
23
+ editType : 'docalcAutorange' ,
24
24
description : [
25
25
'Determines whether or not this annotation is visible.'
26
26
] . join ( ' ' )
@@ -29,6 +29,7 @@ module.exports = {
29
29
text : {
30
30
valType : 'string' ,
31
31
role : 'info' ,
32
+ editType : 'docalcAutorange' ,
32
33
description : [
33
34
'Sets the text associated with this annotation.' ,
34
35
'Plotly uses a subset of HTML tags to do things like' ,
@@ -41,19 +42,23 @@ module.exports = {
41
42
valType : 'angle' ,
42
43
dflt : 0 ,
43
44
role : 'style' ,
45
+ editType : 'docalcAutorange' ,
44
46
description : [
45
47
'Sets the angle at which the `text` is drawn' ,
46
48
'with respect to the horizontal.'
47
49
] . join ( ' ' )
48
50
} ,
49
- font : extendFlat ( { } , fontAttrs , {
51
+ font : fontAttrs ( {
52
+ editType : 'docalcAutorange' ,
53
+ colorEditType : 'doarraydraw' ,
50
54
description : 'Sets the annotation text font.'
51
55
} ) ,
52
56
width : {
53
57
valType : 'number' ,
54
58
min : 1 ,
55
59
dflt : null ,
56
60
role : 'style' ,
61
+ editType : 'docalcAutorange' ,
57
62
description : [
58
63
'Sets an explicit width for the text box. null (default) lets the' ,
59
64
'text set the box width. Wider text will be clipped.' ,
@@ -65,6 +70,7 @@ module.exports = {
65
70
min : 1 ,
66
71
dflt : null ,
67
72
role : 'style' ,
73
+ editType : 'docalcAutorange' ,
68
74
description : [
69
75
'Sets an explicit height for the text box. null (default) lets the' ,
70
76
'text set the box height. Taller text will be clipped.'
@@ -76,13 +82,15 @@ module.exports = {
76
82
max : 1 ,
77
83
dflt : 1 ,
78
84
role : 'style' ,
85
+ editType : 'doarraydraw' ,
79
86
description : 'Sets the opacity of the annotation (text + arrow).'
80
87
} ,
81
88
align : {
82
89
valType : 'enumerated' ,
83
90
values : [ 'left' , 'center' , 'right' ] ,
84
91
dflt : 'center' ,
85
92
role : 'style' ,
93
+ editType : 'doarraydraw' ,
86
94
description : [
87
95
'Sets the horizontal alignment of the `text` within the box.' ,
88
96
'Has an effect only if `text` spans more two or more lines' ,
@@ -95,6 +103,7 @@ module.exports = {
95
103
values : [ 'top' , 'middle' , 'bottom' ] ,
96
104
dflt : 'middle' ,
97
105
role : 'style' ,
106
+ editType : 'doarraydraw' ,
98
107
description : [
99
108
'Sets the vertical alignment of the `text` within the box.' ,
100
109
'Has an effect only if an explicit height is set to override' ,
@@ -105,12 +114,14 @@ module.exports = {
105
114
valType : 'color' ,
106
115
dflt : 'rgba(0,0,0,0)' ,
107
116
role : 'style' ,
117
+ editType : 'doarraydraw' ,
108
118
description : 'Sets the background color of the annotation.'
109
119
} ,
110
120
bordercolor : {
111
121
valType : 'color' ,
112
122
dflt : 'rgba(0,0,0,0)' ,
113
123
role : 'style' ,
124
+ editType : 'doarraydraw' ,
114
125
description : [
115
126
'Sets the color of the border enclosing the annotation `text`.'
116
127
] . join ( ' ' )
@@ -120,6 +131,7 @@ module.exports = {
120
131
min : 0 ,
121
132
dflt : 1 ,
122
133
role : 'style' ,
134
+ editType : 'docalcAutorange' ,
123
135
description : [
124
136
'Sets the padding (in px) between the `text`' ,
125
137
'and the enclosing border.'
@@ -130,6 +142,7 @@ module.exports = {
130
142
min : 0 ,
131
143
dflt : 1 ,
132
144
role : 'style' ,
145
+ editType : 'docalcAutorange' ,
133
146
description : [
134
147
'Sets the width (in px) of the border enclosing' ,
135
148
'the annotation `text`.'
@@ -140,6 +153,7 @@ module.exports = {
140
153
valType : 'boolean' ,
141
154
dflt : true ,
142
155
role : 'style' ,
156
+ editType : 'docalcAutorange' ,
143
157
description : [
144
158
'Determines whether or not the annotation is drawn with an arrow.' ,
145
159
'If *true*, `text` is placed near the arrow\'s tail.' ,
@@ -149,6 +163,7 @@ module.exports = {
149
163
arrowcolor : {
150
164
valType : 'color' ,
151
165
role : 'style' ,
166
+ editType : 'doarraydraw' ,
152
167
description : 'Sets the color of the annotation arrow.'
153
168
} ,
154
169
arrowhead : {
@@ -157,13 +172,15 @@ module.exports = {
157
172
max : ARROWPATHS . length ,
158
173
dflt : 1 ,
159
174
role : 'style' ,
175
+ editType : 'doarraydraw' ,
160
176
description : 'Sets the annotation arrow head style.'
161
177
} ,
162
178
arrowsize : {
163
179
valType : 'number' ,
164
180
min : 0.3 ,
165
181
dflt : 1 ,
166
182
role : 'style' ,
183
+ editType : 'docalcAutorange' ,
167
184
description : [
168
185
'Sets the size of the annotation arrow head, relative to `arrowwidth`.' ,
169
186
'A value of 1 (default) gives a head about 3x as wide as the line.'
@@ -173,13 +190,15 @@ module.exports = {
173
190
valType : 'number' ,
174
191
min : 0.1 ,
175
192
role : 'style' ,
193
+ editType : 'docalcAutorange' ,
176
194
description : 'Sets the width (in px) of annotation arrow line.'
177
195
} ,
178
196
standoff : {
179
197
valType : 'number' ,
180
198
min : 0 ,
181
199
dflt : 0 ,
182
200
role : 'style' ,
201
+ editType : 'docalcAutorange' ,
183
202
description : [
184
203
'Sets a distance, in pixels, to move the arrowhead away from the' ,
185
204
'position it is pointing at, for example to point at the edge of' ,
@@ -191,6 +210,7 @@ module.exports = {
191
210
ax : {
192
211
valType : 'any' ,
193
212
role : 'info' ,
213
+ editType : 'docalcAutorange' ,
194
214
description : [
195
215
'Sets the x component of the arrow tail about the arrow head.' ,
196
216
'If `axref` is `pixel`, a positive (negative) ' ,
@@ -203,6 +223,7 @@ module.exports = {
203
223
ay : {
204
224
valType : 'any' ,
205
225
role : 'info' ,
226
+ editType : 'docalcAutorange' ,
206
227
description : [
207
228
'Sets the y component of the arrow tail about the arrow head.' ,
208
229
'If `ayref` is `pixel`, a positive (negative) ' ,
@@ -220,6 +241,7 @@ module.exports = {
220
241
cartesianConstants . idRegex . x . toString ( )
221
242
] ,
222
243
role : 'info' ,
244
+ editType : 'docalc' ,
223
245
description : [
224
246
'Indicates in what terms the tail of the annotation (ax,ay) ' ,
225
247
'is specified. If `pixel`, `ax` is a relative offset in pixels ' ,
@@ -237,6 +259,7 @@ module.exports = {
237
259
cartesianConstants . idRegex . y . toString ( )
238
260
] ,
239
261
role : 'info' ,
262
+ editType : 'docalc' ,
240
263
description : [
241
264
'Indicates in what terms the tail of the annotation (ax,ay) ' ,
242
265
'is specified. If `pixel`, `ay` is a relative offset in pixels ' ,
@@ -254,6 +277,7 @@ module.exports = {
254
277
cartesianConstants . idRegex . x . toString ( )
255
278
] ,
256
279
role : 'info' ,
280
+ editType : 'docalc' ,
257
281
description : [
258
282
'Sets the annotation\'s x coordinate axis.' ,
259
283
'If set to an x axis id (e.g. *x* or *x2*), the `x` position' ,
@@ -266,6 +290,7 @@ module.exports = {
266
290
x : {
267
291
valType : 'any' ,
268
292
role : 'info' ,
293
+ editType : 'docalcAutorange' ,
269
294
description : [
270
295
'Sets the annotation\'s x position.' ,
271
296
'If the axis `type` is *log*, then you must take the' ,
@@ -283,6 +308,7 @@ module.exports = {
283
308
values : [ 'auto' , 'left' , 'center' , 'right' ] ,
284
309
dflt : 'auto' ,
285
310
role : 'info' ,
311
+ editType : 'docalcAutorange' ,
286
312
description : [
287
313
'Sets the text box\'s horizontal position anchor' ,
288
314
'This anchor binds the `x` position to the *left*, *center*' ,
@@ -301,6 +327,7 @@ module.exports = {
301
327
valType : 'number' ,
302
328
dflt : 0 ,
303
329
role : 'style' ,
330
+ editType : 'docalcAutorange' ,
304
331
description : [
305
332
'Shifts the position of the whole annotation and arrow to the' ,
306
333
'right (positive) or left (negative) by this many pixels.'
@@ -313,6 +340,7 @@ module.exports = {
313
340
cartesianConstants . idRegex . y . toString ( )
314
341
] ,
315
342
role : 'info' ,
343
+ editType : 'docalc' ,
316
344
description : [
317
345
'Sets the annotation\'s y coordinate axis.' ,
318
346
'If set to an y axis id (e.g. *y* or *y2*), the `y` position' ,
@@ -325,6 +353,7 @@ module.exports = {
325
353
y : {
326
354
valType : 'any' ,
327
355
role : 'info' ,
356
+ editType : 'docalcAutorange' ,
328
357
description : [
329
358
'Sets the annotation\'s y position.' ,
330
359
'If the axis `type` is *log*, then you must take the' ,
@@ -342,6 +371,7 @@ module.exports = {
342
371
values : [ 'auto' , 'top' , 'middle' , 'bottom' ] ,
343
372
dflt : 'auto' ,
344
373
role : 'info' ,
374
+ editType : 'docalcAutorange' ,
345
375
description : [
346
376
'Sets the text box\'s vertical position anchor' ,
347
377
'This anchor binds the `y` position to the *top*, *middle*' ,
@@ -360,6 +390,7 @@ module.exports = {
360
390
valType : 'number' ,
361
391
dflt : 0 ,
362
392
role : 'style' ,
393
+ editType : 'docalcAutorange' ,
363
394
description : [
364
395
'Shifts the position of the whole annotation and arrow up' ,
365
396
'(positive) or down (negative) by this many pixels.'
@@ -370,6 +401,7 @@ module.exports = {
370
401
values : [ false , 'onoff' , 'onout' ] ,
371
402
dflt : false ,
372
403
role : 'style' ,
404
+ editType : 'doarraydraw' ,
373
405
description : [
374
406
'Makes this annotation respond to clicks on the plot.' ,
375
407
'If you click a data point that exactly matches the `x` and `y`' ,
@@ -388,6 +420,7 @@ module.exports = {
388
420
xclick : {
389
421
valType : 'any' ,
390
422
role : 'info' ,
423
+ editType : 'doarraydraw' ,
391
424
description : [
392
425
'Toggle this annotation when clicking a data point whose `x` value' ,
393
426
'is `xclick` rather than the annotation\'s `x` value.'
@@ -396,6 +429,7 @@ module.exports = {
396
429
yclick : {
397
430
valType : 'any' ,
398
431
role : 'info' ,
432
+ editType : 'doarraydraw' ,
399
433
description : [
400
434
'Toggle this annotation when clicking a data point whose `y` value' ,
401
435
'is `yclick` rather than the annotation\'s `y` value.'
@@ -404,6 +438,7 @@ module.exports = {
404
438
hovertext : {
405
439
valType : 'string' ,
406
440
role : 'info' ,
441
+ editType : 'doarraydraw' ,
407
442
description : [
408
443
'Sets text to appear when hovering over this annotation.' ,
409
444
'If omitted or blank, no hover label will appear.'
@@ -413,6 +448,7 @@ module.exports = {
413
448
bgcolor : {
414
449
valType : 'color' ,
415
450
role : 'style' ,
451
+ editType : 'doarraydraw' ,
416
452
description : [
417
453
'Sets the background color of the hover label.' ,
418
454
'By default uses the annotation\'s `bgcolor` made opaque,' ,
@@ -422,23 +458,27 @@ module.exports = {
422
458
bordercolor : {
423
459
valType : 'color' ,
424
460
role : 'style' ,
461
+ editType : 'doarraydraw' ,
425
462
description : [
426
463
'Sets the border color of the hover label.' ,
427
464
'By default uses either dark grey or white, for maximum' ,
428
465
'contrast with `hoverlabel.bgcolor`.'
429
466
] . join ( ' ' )
430
467
} ,
431
- font : extendFlat ( { } , fontAttrs , {
468
+ font : fontAttrs ( {
469
+ editType : 'doarraydraw' ,
432
470
description : [
433
471
'Sets the hover label text font.' ,
434
472
'By default uses the global hover font and size,' ,
435
473
'with color from `hoverlabel.bordercolor`.'
436
474
] . join ( ' ' )
437
- } )
475
+ } ) ,
476
+ editType : 'doarraydraw'
438
477
} ,
439
478
captureevents : {
440
479
valType : 'boolean' ,
441
480
role : 'info' ,
481
+ editType : 'doarraydraw' ,
442
482
description : [
443
483
'Determines whether the annotation text box captures mouse move' ,
444
484
'and click events, or allows those events to pass through to data' ,
@@ -448,11 +488,13 @@ module.exports = {
448
488
'you must explicitly enable `captureevents`.'
449
489
] . join ( ' ' )
450
490
} ,
491
+ editType : 'docalc' ,
451
492
452
493
_deprecated : {
453
494
ref : {
454
495
valType : 'string' ,
455
496
role : 'info' ,
497
+ editType : 'docalc' ,
456
498
description : [
457
499
'Obsolete. Set `xref` and `yref` separately instead.'
458
500
] . join ( ' ' )
0 commit comments