-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
/
Copy pathattributes.js
140 lines (137 loc) · 4.03 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
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
/**
* Copyright 2012-2017, 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 fxAttrs = require('../components/fx/attributes');
module.exports = {
type: {
valType: 'enumerated',
role: 'info',
values: [], // listed dynamically
dflt: 'scatter',
editType: 'calc+clearAxisTypes'
},
visible: {
valType: 'enumerated',
values: [true, false, 'legendonly'],
role: 'info',
dflt: true,
editType: 'calc',
description: [
'Determines whether or not this trace is visible.',
'If *legendonly*, the trace is not drawn,',
'but can appear as a legend item',
'(provided that the legend itself is visible).'
].join(' ')
},
showlegend: {
valType: 'boolean',
role: 'info',
dflt: true,
editType: 'style',
description: [
'Determines whether or not an item corresponding to this',
'trace is shown in the legend.'
].join(' ')
},
legendgroup: {
valType: 'string',
role: 'info',
dflt: '',
editType: 'style',
description: [
'Sets the legend group for this trace.',
'Traces part of the same legend group hide/show at the same time',
'when toggling legend items.'
].join(' ')
},
opacity: {
valType: 'number',
role: 'style',
min: 0,
max: 1,
dflt: 1,
editType: 'style',
description: 'Sets the opacity of the trace.'
},
name: {
valType: 'string',
role: 'info',
editType: 'style',
description: [
'Sets the trace name.',
'The trace name appear as the legend item and on hover.'
].join(' ')
},
uid: {
valType: 'string',
role: 'info',
dflt: '',
editType: 'calc'
},
ids: {
valType: 'data_array',
editType: 'calc',
description: [
'Assigns id labels to each datum.',
'These ids for object constancy of data points during animation.'
].join(' ')
},
customdata: {
valType: 'data_array',
editType: 'calc',
description: [
'Assigns extra data each datum.',
'This may be useful when listening to hover, click and selection events.',
'Note that, *scatter* traces also appends customdata items in the markers',
'DOM elements'
].join(' ')
},
hoverinfo: {
valType: 'flaglist',
role: 'info',
flags: ['x', 'y', 'z', 'text', 'name'],
extras: ['all', 'none', 'skip'],
arrayOk: true,
dflt: 'all',
editType: 'none',
description: [
'Determines which trace information appear on hover.',
'If `none` or `skip` are set, no information is displayed upon hovering.',
'But, if `none` is set, click and hover events are still fired.'
].join(' ')
},
hoverlabel: fxAttrs.hoverlabel,
stream: {
token: {
valType: 'string',
noBlank: true,
strict: true,
role: 'info',
editType: 'calc',
description: [
'The stream id number links a data trace on a plot with a stream.',
'See https://plot.ly/settings for more details.'
].join(' ')
},
maxpoints: {
valType: 'number',
min: 0,
max: 10000,
dflt: 500,
role: 'info',
editType: 'calc',
description: [
'Sets the maximum number of points to keep on the plots from an',
'incoming stream.',
'If `maxpoints` is set to *50*, only the newest 50 points will',
'be displayed on the plot.'
].join(' ')
},
editType: 'calc'
}
};