@@ -12,8 +12,15 @@ var scatterAttrs = require('../scatter/attributes');
1212var colorAttributes = require ( '../../components/colorscale/color_attributes' ) ;
1313var errorBarAttrs = require ( '../../components/errorbars/attributes' ) ;
1414var colorbarAttrs = require ( '../../components/colorbar/attributes' ) ;
15+ var fontAttrs = require ( '../../plots/font_attributes' ) ;
1516
1617var 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 ;
1724
1825var scatterMarkerAttrs = scatterAttrs . marker ;
1926var scatterMarkerLineAttrs = scatterMarkerAttrs . line ;
@@ -40,8 +47,38 @@ module.exports = {
4047 y : scatterAttrs . y ,
4148 y0 : scatterAttrs . y0 ,
4249 dy : scatterAttrs . dy ,
50+
4351 text : scatterAttrs . text ,
4452
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+
4582 orientation : {
4683 valType : 'enumerated' ,
4784 role : 'info' ,
0 commit comments