@@ -12,8 +12,15 @@ var scatterAttrs = require('../scatter/attributes');
12
12
var colorAttributes = require ( '../../components/colorscale/color_attributes' ) ;
13
13
var errorBarAttrs = require ( '../../components/errorbars/attributes' ) ;
14
14
var colorbarAttrs = require ( '../../components/colorbar/attributes' ) ;
15
+ var fontAttrs = require ( '../../plots/font_attributes' ) ;
15
16
16
17
var extendFlat = require ( '../../lib/extend' ) . extendFlat ;
18
+ var extendDeep = require ( '../../lib/extend' ) . extendDeep ;
19
+
20
+ var textFontAttrs = extendDeep ( { } , fontAttrs ) ;
21
+ textFontAttrs . family . arrayOk = true ;
22
+ textFontAttrs . size . arrayOk = true ;
23
+ textFontAttrs . color . arrayOk = true ;
17
24
18
25
var scatterMarkerAttrs = scatterAttrs . marker ;
19
26
var scatterMarkerLineAttrs = scatterMarkerAttrs . line ;
@@ -40,8 +47,38 @@ module.exports = {
40
47
y : scatterAttrs . y ,
41
48
y0 : scatterAttrs . y0 ,
42
49
dy : scatterAttrs . dy ,
50
+
43
51
text : scatterAttrs . text ,
44
52
53
+ textposition : {
54
+ valType : 'enumerated' ,
55
+ role : 'info' ,
56
+ values : [ 'inside' , 'outside' , 'auto' , 'none' ] ,
57
+ dflt : 'none' ,
58
+ arrayOk : true ,
59
+ description : [
60
+ 'Specifies the location of the `text`.' ,
61
+ '*inside* positions `text` inside, next to the bar end' ,
62
+ '(rotated and scaled if needed).' ,
63
+ '*outside* positions `text` outside, next to the bar end' ,
64
+ '(scaled if needed).' ,
65
+ '*auto* positions `text` inside or outside' ,
66
+ 'so that `text` size is maximized.'
67
+ ] . join ( ' ' )
68
+ } ,
69
+
70
+ textfont : extendFlat ( { } , textFontAttrs , {
71
+ description : 'Sets the font used for `text`.'
72
+ } ) ,
73
+
74
+ insidetextfont : extendFlat ( { } , textFontAttrs , {
75
+ description : 'Sets the font used for `text` lying inside the bar.'
76
+ } ) ,
77
+
78
+ outsidetextfont : extendFlat ( { } , textFontAttrs , {
79
+ description : 'Sets the font used for `text` lying outside the bar.'
80
+ } ) ,
81
+
45
82
orientation : {
46
83
valType : 'enumerated' ,
47
84
role : 'info' ,
0 commit comments