Skip to content

Commit ab843f5

Browse files
committed
581a dry colors - heatmap
1 parent b0c4d32 commit ab843f5

File tree

1 file changed

+72
-73
lines changed

1 file changed

+72
-73
lines changed

src/traces/heatmap/attributes.js

+72-73
Original file line numberDiff line numberDiff line change
@@ -14,78 +14,77 @@ var colorscaleAttrs = require('../../components/colorscale/attributes');
1414
var extendFlat = require('../../lib/extend').extendFlat;
1515

1616

17-
module.exports = {
18-
z: {
19-
valType: 'data_array',
20-
description: 'Sets the z data.'
21-
},
22-
x: scatterAttrs.x,
23-
x0: scatterAttrs.x0,
24-
dx: scatterAttrs.dx,
25-
y: scatterAttrs.y,
26-
y0: scatterAttrs.y0,
27-
dy: scatterAttrs.dy,
28-
text: {
29-
valType: 'data_array',
30-
description: 'Sets the text elements associated with each z value.'
31-
},
32-
transpose: {
33-
valType: 'boolean',
34-
dflt: false,
35-
role: 'info',
36-
description: 'Transposes the z data.'
37-
},
38-
xtype: {
39-
valType: 'enumerated',
40-
values: ['array', 'scaled'],
41-
role: 'info',
42-
description: [
43-
'If *array*, the heatmap\'s x coordinates are given by *x*',
44-
'(the default behavior when `x` is provided).',
45-
'If *scaled*, the heatmap\'s x coordinates are given by *x0* and *dx*',
46-
'(the default behavior when `x` is not provided).'
47-
].join(' ')
48-
},
49-
ytype: {
50-
valType: 'enumerated',
51-
values: ['array', 'scaled'],
52-
role: 'info',
53-
description: [
54-
'If *array*, the heatmap\'s y coordinates are given by *y*',
55-
'(the default behavior when `y` is provided)',
56-
'If *scaled*, the heatmap\'s y coordinates are given by *y0* and *dy*',
57-
'(the default behavior when `y` is not provided)'
58-
].join(' ')
59-
},
60-
zauto: colorscaleAttrs.zauto,
61-
zmin: colorscaleAttrs.zmin,
62-
zmax: colorscaleAttrs.zmax,
63-
colorscale: colorscaleAttrs.colorscale,
64-
autocolorscale: extendFlat({}, colorscaleAttrs.autocolorscale,
65-
{dflt: false}),
66-
reversescale: colorscaleAttrs.reversescale,
67-
showscale: colorscaleAttrs.showscale,
68-
zsmooth: {
69-
valType: 'enumerated',
70-
values: ['fast', 'best', false],
71-
dflt: false,
72-
role: 'style',
73-
description: [
74-
'Picks a smoothing algorithm use to smooth `z` data.'
75-
].join(' ')
76-
},
77-
connectgaps: {
78-
valType: 'boolean',
79-
dflt: false,
80-
role: 'info',
81-
description: [
82-
'Determines whether or not gaps',
83-
'(i.e. {nan} or missing values)',
84-
'in the `z` data are filled in.'
85-
].join(' ')
17+
module.exports = extendFlat(
18+
{},
19+
colorscaleAttrs,
20+
{
21+
autocolorscale: extendFlat({}, colorscaleAttrs.autocolorscale,
22+
{dflt: false})
8623
},
24+
{
25+
z: {
26+
valType: 'data_array',
27+
description: 'Sets the z data.'
28+
},
29+
x: scatterAttrs.x,
30+
x0: scatterAttrs.x0,
31+
dx: scatterAttrs.dx,
32+
y: scatterAttrs.y,
33+
y0: scatterAttrs.y0,
34+
dy: scatterAttrs.dy,
35+
text: {
36+
valType: 'data_array',
37+
description: 'Sets the text elements associated with each z value.'
38+
},
39+
transpose: {
40+
valType: 'boolean',
41+
dflt: false,
42+
role: 'info',
43+
description: 'Transposes the z data.'
44+
},
45+
xtype: {
46+
valType: 'enumerated',
47+
values: ['array', 'scaled'],
48+
role: 'info',
49+
description: [
50+
'If *array*, the heatmap\'s x coordinates are given by *x*',
51+
'(the default behavior when `x` is provided).',
52+
'If *scaled*, the heatmap\'s x coordinates are given by *x0* and *dx*',
53+
'(the default behavior when `x` is not provided).'
54+
].join(' ')
55+
},
56+
ytype: {
57+
valType: 'enumerated',
58+
values: ['array', 'scaled'],
59+
role: 'info',
60+
description: [
61+
'If *array*, the heatmap\'s y coordinates are given by *y*',
62+
'(the default behavior when `y` is provided)',
63+
'If *scaled*, the heatmap\'s y coordinates are given by *y0* and *dy*',
64+
'(the default behavior when `y` is not provided)'
65+
].join(' ')
66+
},
67+
zsmooth: {
68+
valType: 'enumerated',
69+
values: ['fast', 'best', false],
70+
dflt: false,
71+
role: 'style',
72+
description: [
73+
'Picks a smoothing algorithm use to smooth `z` data.'
74+
].join(' ')
75+
},
76+
connectgaps: {
77+
valType: 'boolean',
78+
dflt: false,
79+
role: 'info',
80+
description: [
81+
'Determines whether or not gaps',
82+
'(i.e. {nan} or missing values)',
83+
'in the `z` data are filled in.'
84+
].join(' ')
85+
},
8786

88-
_nestedModules: {
89-
'colorbar': 'Colorbar'
90-
}
91-
};
87+
_nestedModules: {
88+
'colorbar': 'Colorbar'
89+
}
90+
});

0 commit comments

Comments
 (0)