Skip to content

Commit 00d8559

Browse files
committed
Improve colorscale descriptions.
1 parent ee66bb3 commit 00d8559

File tree

2 files changed

+16
-8
lines changed

2 files changed

+16
-8
lines changed

src/components/colorscale/attributes.js

+7-3
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,13 @@ module.exports = {
3737
description: [
3838
'Sets the colorscale.',
3939
'The colorscale must be an array containing',
40-
'arrays mapping a normalized value to an rgb color. At minimum, a',
41-
'mapping for the lowest (0) and highest (1) values are required.',
42-
'For example, `[[0, \'rgb(0,0,255)\', [1, \'rgb(255,0,0)\']]`'
40+
'arrays mapping a normalized value to an',
41+
'rgb, rgba, hex, hsl, hsv, or named color string.',
42+
'At minimum, a mapping for the lowest (0) and highest (1)',
43+
'values are required. For example,',
44+
'`[[0, \'rgb(0,0,255)\', [1, \'rgb(255,0,0)\']]`.',
45+
'To control the bounds of the colorscale in z space,',
46+
'use zmin and zmax'
4347
].join(' ')
4448
},
4549
autocolorscale: {

src/traces/scatter/attributes.js

+9-5
Original file line numberDiff line numberDiff line change
@@ -246,11 +246,15 @@ module.exports = {
246246
valType: 'colorscale',
247247
role: 'style',
248248
description: [
249-
'Has only an effect if `marker.color` is set to a numerical array.',
250-
'Sets the colorscale. The colorscale must be an array containing',
251-
'arrays mapping a normalized value to an rgb color. At minimum, a',
252-
'mapping for the lowest (0) and highest (1) values are required.',
253-
'For example, `[[0, \'rgb(0,0,255)\', [1, \'rgb(255,0,0)\']]`'
249+
'Sets the colorscale.',
250+
'The colorscale must be an array containing',
251+
'arrays mapping a normalized value to an',
252+
'rgb, rgba, hex, hsl, hsv, or named color string.',
253+
'At minimum, a mapping for the lowest (0) and highest (1)',
254+
'values are required. For example,',
255+
'`[[0, \'rgb(0,0,255)\', [1, \'rgb(255,0,0)\']]`.',
256+
'To control the bounds of the colorscale in color space,',
257+
'use cmin and cmax'
254258
].join(' ')
255259
},
256260
cauto: {

0 commit comments

Comments
 (0)