Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 74574b6

Browse files
committed
Update description of attribute colormodel in image traces
1 parent 19ce21d commit 74574b6

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/traces/image/attributes.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,12 @@ module.exports = extendFlat({
4343
colormodel: {
4444
valType: 'enumerated',
4545
values: cm,
46-
dflt: 'rgb',
4746
role: 'info',
4847
editType: 'calc',
4948
description: [
5049
'Color model used to map the numerical color components described in `z` into colors.',
51-
'If `source` is specified, this attribute will be set to `rgba256`.'
50+
'If `source` is specified, this attribute will be set to `rgba256`',
51+
'otherwise it defaults to `rgb`.'
5252
].join(' ')
5353
},
5454
zmin: {

src/traces/image/defaults.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ module.exports = function supplyDefaults(traceIn, traceOut) {
3636

3737
var cm;
3838
if(traceOut._hasZ) {
39-
coerce('colormodel');
39+
coerce('colormodel', 'rgb');
4040
cm = constants.colormodel[traceOut.colormodel];
4141
coerce('zmin', (cm.zminDflt || cm.min));
4242
coerce('zmax', (cm.zmaxDflt || cm.max));

0 commit comments

Comments
 (0)