|
11 | 11 | var heatmapAttrs = require('../heatmap/attributes');
|
12 | 12 | var scatterAttrs = require('../scatter/attributes');
|
13 | 13 | var colorscaleAttrs = require('../../components/colorscale/attributes');
|
| 14 | +var colorbarAttrs = require('../../components/colorbar/attributes'); |
14 | 15 | var extendFlat = require('../../lib/extend').extendFlat;
|
15 | 16 |
|
16 | 17 | var scatterLineAttrs = scatterAttrs.line;
|
17 | 18 |
|
18 |
| -module.exports = extendFlat({}, |
19 |
| - { |
20 |
| - z: heatmapAttrs.z, |
21 |
| - x: heatmapAttrs.x, |
22 |
| - x0: heatmapAttrs.x0, |
23 |
| - dx: heatmapAttrs.dx, |
24 |
| - y: heatmapAttrs.y, |
25 |
| - y0: heatmapAttrs.y0, |
26 |
| - dy: heatmapAttrs.dy, |
27 |
| - text: heatmapAttrs.text, |
28 |
| - transpose: heatmapAttrs.transpose, |
29 |
| - xtype: heatmapAttrs.xtype, |
30 |
| - ytype: heatmapAttrs.ytype, |
| 19 | +module.exports = extendFlat({}, { |
| 20 | + z: heatmapAttrs.z, |
| 21 | + x: heatmapAttrs.x, |
| 22 | + x0: heatmapAttrs.x0, |
| 23 | + dx: heatmapAttrs.dx, |
| 24 | + y: heatmapAttrs.y, |
| 25 | + y0: heatmapAttrs.y0, |
| 26 | + dy: heatmapAttrs.dy, |
| 27 | + text: heatmapAttrs.text, |
| 28 | + transpose: heatmapAttrs.transpose, |
| 29 | + xtype: heatmapAttrs.xtype, |
| 30 | + ytype: heatmapAttrs.ytype, |
31 | 31 |
|
32 |
| - connectgaps: heatmapAttrs.connectgaps, |
| 32 | + connectgaps: heatmapAttrs.connectgaps, |
33 | 33 |
|
34 |
| - autocontour: { |
35 |
| - valType: 'boolean', |
36 |
| - dflt: true, |
| 34 | + autocontour: { |
| 35 | + valType: 'boolean', |
| 36 | + dflt: true, |
| 37 | + role: 'style', |
| 38 | + description: [ |
| 39 | + 'Determines whether or not the contour level attributes are', |
| 40 | + 'picked by an algorithm.', |
| 41 | + 'If *true*, the number of contour levels can be set in `ncontours`.', |
| 42 | + 'If *false*, set the contour level attributes in `contours`.' |
| 43 | + ].join(' ') |
| 44 | + }, |
| 45 | + ncontours: { |
| 46 | + valType: 'integer', |
| 47 | + dflt: 0, |
| 48 | + role: 'style', |
| 49 | + description: [ |
| 50 | + 'Sets the maximum number of contour levels. The actual number', |
| 51 | + 'of contours will be chosen automatically to be less than or', |
| 52 | + 'equal to the value of `ncontours`.', |
| 53 | + 'Has an effect only if `autocontour` is *true*.' |
| 54 | + ].join(' ') |
| 55 | + }, |
| 56 | + |
| 57 | + contours: { |
| 58 | + start: { |
| 59 | + valType: 'number', |
| 60 | + dflt: null, |
| 61 | + role: 'style', |
| 62 | + description: 'Sets the starting contour level value.' |
| 63 | + }, |
| 64 | + end: { |
| 65 | + valType: 'number', |
| 66 | + dflt: null, |
| 67 | + role: 'style', |
| 68 | + description: 'Sets the end contour level value.' |
| 69 | + }, |
| 70 | + size: { |
| 71 | + valType: 'number', |
| 72 | + dflt: null, |
| 73 | + role: 'style', |
| 74 | + description: 'Sets the step between each contour level.' |
| 75 | + }, |
| 76 | + coloring: { |
| 77 | + valType: 'enumerated', |
| 78 | + values: ['fill', 'heatmap', 'lines', 'none'], |
| 79 | + dflt: 'fill', |
37 | 80 | role: 'style',
|
38 | 81 | description: [
|
39 |
| - 'Determines whether or not the contour level attributes are', |
40 |
| - 'picked by an algorithm.', |
41 |
| - 'If *true*, the number of contour levels can be set in `ncontours`.', |
42 |
| - 'If *false*, set the contour level attributes in `contours`.' |
| 82 | + 'Determines the coloring method showing the contour values.', |
| 83 | + 'If *fill*, coloring is done evenly between each contour level', |
| 84 | + 'If *heatmap*, a heatmap gradient coloring is applied', |
| 85 | + 'between each contour level.', |
| 86 | + 'If *lines*, coloring is done on the contour lines.', |
| 87 | + 'If *none*, no coloring is applied on this trace.' |
43 | 88 | ].join(' ')
|
44 | 89 | },
|
45 |
| - ncontours: { |
46 |
| - valType: 'integer', |
47 |
| - dflt: 0, |
| 90 | + showlines: { |
| 91 | + valType: 'boolean', |
| 92 | + dflt: true, |
48 | 93 | role: 'style',
|
49 | 94 | description: [
|
50 |
| - 'Sets the maximum number of contour levels. The actual number', |
51 |
| - 'of contours will be chosen automatically to be less than or', |
52 |
| - 'equal to the value of `ncontours`.', |
53 |
| - 'Has an effect only if `autocontour` is *true*.' |
| 95 | + 'Determines whether or not the contour lines are drawn.', |
| 96 | + 'Has only an effect if `contours.coloring` is set to *fill*.' |
54 | 97 | ].join(' ')
|
55 |
| - }, |
56 |
| - |
57 |
| - contours: { |
58 |
| - start: { |
59 |
| - valType: 'number', |
60 |
| - dflt: null, |
61 |
| - role: 'style', |
62 |
| - description: 'Sets the starting contour level value.' |
63 |
| - }, |
64 |
| - end: { |
65 |
| - valType: 'number', |
66 |
| - dflt: null, |
67 |
| - role: 'style', |
68 |
| - description: 'Sets the end contour level value.' |
69 |
| - }, |
70 |
| - size: { |
71 |
| - valType: 'number', |
72 |
| - dflt: null, |
73 |
| - role: 'style', |
74 |
| - description: 'Sets the step between each contour level.' |
75 |
| - }, |
76 |
| - coloring: { |
77 |
| - valType: 'enumerated', |
78 |
| - values: ['fill', 'heatmap', 'lines', 'none'], |
79 |
| - dflt: 'fill', |
80 |
| - role: 'style', |
81 |
| - description: [ |
82 |
| - 'Determines the coloring method showing the contour values.', |
83 |
| - 'If *fill*, coloring is done evenly between each contour level', |
84 |
| - 'If *heatmap*, a heatmap gradient coloring is applied', |
85 |
| - 'between each contour level.', |
86 |
| - 'If *lines*, coloring is done on the contour lines.', |
87 |
| - 'If *none*, no coloring is applied on this trace.' |
88 |
| - ].join(' ') |
89 |
| - }, |
90 |
| - showlines: { |
91 |
| - valType: 'boolean', |
92 |
| - dflt: true, |
93 |
| - role: 'style', |
94 |
| - description: [ |
95 |
| - 'Determines whether or not the contour lines are drawn.', |
96 |
| - 'Has only an effect if `contours.coloring` is set to *fill*.' |
97 |
| - ].join(' ') |
98 |
| - } |
99 |
| - }, |
100 |
| - |
101 |
| - line: { |
102 |
| - color: extendFlat({}, scatterLineAttrs.color, { |
103 |
| - description: [ |
104 |
| - 'Sets the color of the contour level.', |
105 |
| - 'Has no if `contours.coloring` is set to *lines*.' |
106 |
| - ].join(' ') |
107 |
| - }), |
108 |
| - width: scatterLineAttrs.width, |
109 |
| - dash: scatterLineAttrs.dash, |
110 |
| - smoothing: extendFlat({}, scatterLineAttrs.smoothing, { |
111 |
| - description: [ |
112 |
| - 'Sets the amount of smoothing for the contour lines,', |
113 |
| - 'where *0* corresponds to no smoothing.' |
114 |
| - ].join(' ') |
115 |
| - }) |
116 |
| - }, |
117 |
| - |
118 |
| - _nestedModules: { |
119 |
| - 'colorbar': 'Colorbar' |
120 | 98 | }
|
121 | 99 | },
|
| 100 | + |
| 101 | + line: { |
| 102 | + color: extendFlat({}, scatterLineAttrs.color, { |
| 103 | + description: [ |
| 104 | + 'Sets the color of the contour level.', |
| 105 | + 'Has no if `contours.coloring` is set to *lines*.' |
| 106 | + ].join(' ') |
| 107 | + }), |
| 108 | + width: scatterLineAttrs.width, |
| 109 | + dash: scatterLineAttrs.dash, |
| 110 | + smoothing: extendFlat({}, scatterLineAttrs.smoothing, { |
| 111 | + description: [ |
| 112 | + 'Sets the amount of smoothing for the contour lines,', |
| 113 | + 'where *0* corresponds to no smoothing.' |
| 114 | + ].join(' ') |
| 115 | + }) |
| 116 | + } |
| 117 | +}, |
122 | 118 | colorscaleAttrs,
|
123 |
| - {autocolorscale: extendFlat({}, colorscaleAttrs.autocolorscale, {dflt: false})} |
| 119 | + { autocolorscale: extendFlat({}, colorscaleAttrs.autocolorscale, {dflt: false}) }, |
| 120 | + { colorbar: colorbarAttrs } |
124 | 121 | );
|
0 commit comments