@@ -13,6 +13,22 @@ var constants = require('./constants');
13
13
14
14
var extendFlat = require ( '../../lib/extend' ) . extendFlat ;
15
15
16
+ var makeFillcolorAttr = function ( hasFillgradient ) {
17
+ return {
18
+ valType : 'color' ,
19
+ editType : 'style' ,
20
+ anim : true ,
21
+ description : [
22
+ 'Sets the fill color.' ,
23
+ 'Defaults to a half-transparent variant of the line color,' ,
24
+ 'marker color, or marker line color, whichever is available.' ,
25
+ hasFillgradient ?
26
+ 'If fillgradient is specified, fillcolor is ignored except for setting the background color of the hover label, if any.' :
27
+ ''
28
+ ] . join ( ' ' )
29
+ } ;
30
+ }
31
+
16
32
function axisPeriod ( axis ) {
17
33
return {
18
34
valType : 'any' ,
@@ -391,18 +407,7 @@ module.exports = {
391
407
'consecutive, the later ones will be pushed down in the drawing order.'
392
408
] . join ( ' ' )
393
409
} ,
394
- fillcolor : {
395
- valType : 'color' ,
396
- editType : 'style' ,
397
- anim : true ,
398
- description : [
399
- 'Sets the fill color.' ,
400
- 'Defaults to a half-transparent variant of the line color,' ,
401
- 'marker color, or marker line color, whichever is available.' ,
402
- 'If fillgradient is specified, fillcolor is ignored except for' ,
403
- 'setting the background color of the hover label, if any.'
404
- ] . join ( ' ' )
405
- } ,
410
+ fillcolor : makeFillcolorAttr ( true ) ,
406
411
fillgradient : extendFlat ( {
407
412
type : {
408
413
valType : 'enumerated' ,
0 commit comments