-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
/
Copy pathattributes.js
108 lines (105 loc) · 3.01 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
/**
* 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';
module.exports = {
type: {
valType: 'enumerated',
role: 'info',
values: [], // listed dynamically
dflt: 'scatter'
},
visible: {
valType: 'enumerated',
values: [true, false, 'legendonly'],
role: 'info',
dflt: true,
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,
description: [
'Determines whether or not an item corresponding to this',
'trace is shown in the legend.'
].join(' ')
},
legendgroup: {
valType: 'string',
role: 'info',
dflt: '',
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,
description: 'Sets the opacity of the trace.'
},
name: {
valType: 'string',
role: 'info',
description: [
'Sets the trace name.',
'The trace name appear as the legend item and on hover.'
].join(' ')
},
uid: {
valType: 'string',
role: 'info',
dflt: ''
},
hoverinfo: {
valType: 'flaglist',
role: 'info',
flags: ['x', 'y', 'z', 'text', 'name'],
extras: ['all', 'none', 'skip'],
dflt: 'all',
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(' ')
},
stream: {
token: {
valType: 'string',
noBlank: true,
strict: true,
role: 'info',
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',
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(' ')
}
}
};