@@ -19,7 +19,7 @@ module.exports = function makeColorScaleAttributes(context) {
19
19
role : 'style' ,
20
20
description : [
21
21
'Sets the ' , context , ' color. It accepts either a specific color' ,
22
- ' or an array of values that are mapped to the colorscale' ,
22
+ ' or an array of numbers that are mapped to the colorscale' ,
23
23
' relative to the max and min values of the array or relative to' ,
24
24
' `cmin` and `cmax` if set.'
25
25
] . join ( '' )
@@ -35,14 +35,19 @@ module.exports = function makeColorScaleAttributes(context) {
35
35
' values are required. For example,' ,
36
36
' `[[0, \'rgb(0,0,255)\', [1, \'rgb(255,0,0)\']]`.' ,
37
37
' To control the bounds of the colorscale in color space,' ,
38
- ' use `' , context , '.cmin` and `' , context , '.cmax`.'
38
+ ' use `' , context , '.cmin` and `' , context , '.cmax`.' ,
39
+ ' Alternatively, `colorscale` may be a palette name string' ,
40
+ ' such as `"Viridis"` or `"Greens"`.'
39
41
] . join ( '' )
40
42
} ) ,
41
43
cauto : extendDeep ( { } , colorScaleAttributes . zauto , {
42
44
description : [
43
- 'Has an effect only if `' , context , '.color` is set to a numerical array.' ,
44
- ' Determines the whether or not the color domain is computed' ,
45
- ' automatically.'
45
+ 'Has an effect only if `' , context , '.color` is set to a numerical array' ,
46
+ ' and `cmin`, `cmax` are set by the user. In this case,' ,
47
+ ' it controls whether the first/last colors in `colorscale` correspond to' ,
48
+ ' the lowest/highest values in `color` (`cauto: true`), or the `cmin`/`cmax`' ,
49
+ ' values (`cauto: false`).' ,
50
+ ' Defaults to `false` when `cmin`, `cmax` are set by the user.'
46
51
] . join ( '' )
47
52
} ) ,
48
53
cmax : extendDeep ( { } , colorScaleAttributes . zmax , {
@@ -64,14 +69,16 @@ module.exports = function makeColorScaleAttributes(context) {
64
69
autocolorscale : extendDeep ( { } , colorScaleAttributes . autocolorscale , {
65
70
description : [
66
71
'Has an effect only if `' , context , '.color` is set to a numerical array.' ,
67
- ' Determines whether or not the colorscale is picked using ' ,
68
- ' values inside `' , context , '.color `.'
72
+ ' Determines whether the colorscale is the default palette (`autocolorscale: true`) ' ,
73
+ ' or the palette determined by `' , context , '.colorscale `.'
69
74
] . join ( '' )
70
75
} ) ,
71
76
reversescale : extendDeep ( { } , colorScaleAttributes . reversescale , {
72
77
description : [
73
78
'Has an effect only if `' , context , '.color` is set to a numerical array.' ,
74
- ' Reverses the colorscale.'
79
+ ' Reverses the color mapping if true (`cmin` or lowest `color` value will' ,
80
+ ' correspond to the last color and `cmax` or highest `color` value will' ,
81
+ ' correspond to the first color).'
75
82
] . join ( '' )
76
83
} )
77
84
} ;
0 commit comments