-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
/
Copy pathattributes.js
122 lines (117 loc) · 4.44 KB
/
attributes.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
/**
* Copyright 2012-2016, Plotly, Inc.
* All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
'use strict';
var scatterAttrs = require('../scatter/attributes');
var plotAttrs = require('../../plots/attributes');
var extendFlat = require('../../lib/extend').extendFlat;
var scatterMarkerAttrs = scatterAttrs.marker,
scatterLineAttrs = scatterAttrs.line,
scatterMarkerLineAttrs = scatterMarkerAttrs.line;
module.exports = {
a: {
valType: 'data_array',
description: [
'Sets the quantity of component `a` in each data point.',
'If `a`, `b`, and `c` are all provided, they need not be',
'normalized, only the relative values matter. If only two',
'arrays are provided they must be normalized to match',
'`ternary<i>.sum`.'
].join(' ')
},
b: {
valType: 'data_array',
description: [
'Sets the quantity of component `a` in each data point.',
'If `a`, `b`, and `c` are all provided, they need not be',
'normalized, only the relative values matter. If only two',
'arrays are provided they must be normalized to match',
'`ternary<i>.sum`.'
].join(' ')
},
c: {
valType: 'data_array',
description: [
'Sets the quantity of component `a` in each data point.',
'If `a`, `b`, and `c` are all provided, they need not be',
'normalized, only the relative values matter. If only two',
'arrays are provided they must be normalized to match',
'`ternary<i>.sum`.'
].join(' ')
},
sum: {
valType: 'number',
role: 'info',
dflt: 0,
min: 0,
description: [
'The number each triplet should sum to,',
'if only two of `a`, `b`, and `c` are provided.',
'This overrides `ternary<i>.sum` to normalize this specific',
'trace, but does not affect the values displayed on the axes.',
'0 (or missing) means to use ternary<i>.sum'
].join(' ')
},
mode: extendFlat({}, scatterAttrs.mode, {dflt: 'markers'}),
text: extendFlat({}, scatterAttrs.text, {
description: [
'Sets text elements associated with each (a,b,c) point.',
'If a single string, the same string appears over',
'all the data points.',
'If an array of strings, the items are mapped in order to the',
'the data points in (a,b,c).'
].join(' ')
}),
line: {
color: scatterLineAttrs.color,
width: scatterLineAttrs.width,
dash: scatterLineAttrs.dash,
shape: extendFlat({}, scatterLineAttrs.shape,
{values: ['linear', 'spline']}),
smoothing: scatterLineAttrs.smoothing
},
connectgaps: scatterAttrs.connectgaps,
fill: extendFlat({}, scatterAttrs.fill, {
values: ['none', 'toself', 'tonext']
}),
fillcolor: scatterAttrs.fillcolor,
marker: {
symbol: scatterMarkerAttrs.symbol,
opacity: scatterMarkerAttrs.opacity,
maxdisplayed: scatterMarkerAttrs.maxdisplayed,
size: scatterMarkerAttrs.size,
sizeref: scatterMarkerAttrs.sizeref,
sizemin: scatterMarkerAttrs.sizemin,
sizemode: scatterMarkerAttrs.sizemode,
color: scatterMarkerAttrs.color,
colorscale: scatterMarkerAttrs.colorscale,
cauto: scatterMarkerAttrs.cauto,
cmax: scatterMarkerAttrs.cmax,
cmin: scatterMarkerAttrs.cmin,
autocolorscale: scatterMarkerAttrs.autocolorscale,
reversescale: scatterMarkerAttrs.reversescale,
showscale: scatterMarkerAttrs.showscale,
line: {
color: scatterMarkerLineAttrs.color,
width: scatterMarkerLineAttrs.width,
colorscale: scatterMarkerLineAttrs.colorscale,
cauto: scatterMarkerLineAttrs.cauto,
cmax: scatterMarkerLineAttrs.cmax,
cmin: scatterMarkerLineAttrs.cmin,
autocolorscale: scatterMarkerLineAttrs.autocolorscale,
reversescale: scatterMarkerLineAttrs.reversescale
}
},
textfont: scatterAttrs.textfont,
textposition: scatterAttrs.textposition,
hoverinfo: extendFlat({}, plotAttrs.hoverinfo, {
flags: ['a', 'b', 'c', 'text', 'name']
}),
_nestedModules: {
'marker.colorbar': 'Colorbar'
}
};