Skip to content

Commit 15354d2

Browse files
committed
improve surface attribute descriptions
1 parent bf2658a commit 15354d2

File tree

2 files changed

+16
-6
lines changed

2 files changed

+16
-6
lines changed

src/traces/surface/attributes.js

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,8 @@ module.exports = {
9898
surfacecolor: {
9999
valType: 'data_array',
100100
description: [
101-
'Sets the surface intensity values,',
102-
'used for setting a color scale independent of z'
101+
'Sets the surface color values,',
102+
'used for setting a color scale independent of `z`.'
103103
].join(' ')
104104
},
105105
cauto: colorscaleAttrs.zauto,
@@ -171,8 +171,14 @@ module.exports = {
171171
},
172172

173173
_deprecated: {
174-
zauto: colorscaleAttrs.zauto,
175-
zmin: colorscaleAttrs.zmin,
176-
zmax: colorscaleAttrs.zmax
174+
zauto: extendFlat({}, colorscaleAttrs.zauto, {
175+
description: 'Obsolete. Use `cauto` instead.'
176+
}),
177+
zmin: extendFlat({}, colorscaleAttrs.zmin, {
178+
description: 'Obsolete. Use `cmin` instead.'
179+
}),
180+
zmax: extendFlat({}, colorscaleAttrs.zmax, {
181+
description: 'Obsolete. Use `cmax` instead.'
182+
})
177183
}
178184
};

src/traces/surface/index.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,11 @@ Surface.meta = {
3030
'or {2D arrays} (e.g. to graph parametric surfaces).',
3131

3232
'If not provided in `x` and `y`, the x and y coordinates are assumed',
33-
'to be linear starting at 0 with a unit step.'
33+
'to be linear starting at 0 with a unit step.',
34+
35+
'The color scale corresponds to the `z` values by default.',
36+
'For custom color scales, use `surfacecolor` which should be a {2D array},',
37+
'where its bounds can be controlled using `cmin` and `cmax`.'
3438
].join(' ')
3539
};
3640

0 commit comments

Comments
 (0)