forked from plotly/plotly.js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlayout_attributes.js
74 lines (70 loc) · 2.36 KB
/
layout_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
/**
* 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 extendFlat = require('../../lib/extend').extendFlat;
var fontAttrs = require('../../plots/font_attributes');
var constants = require('./constants');
module.exports = {
dragmode: {
valType: 'enumerated',
role: 'info',
values: ['zoom', 'pan', 'select', 'lasso', 'orbit', 'turntable'],
dflt: 'zoom',
description: [
'Determines the mode of drag interactions.',
'*select* and *lasso* apply only to scatter traces with',
'markers or text. *orbit* and *turntable* apply only to',
'3D scenes.'
].join(' ')
},
hovermode: {
valType: 'enumerated',
role: 'info',
values: ['x', 'y', 'closest', false],
description: 'Determines the mode of hover interactions.'
},
hoverlabel: {
bgcolor: {
valType: 'color',
role: 'style',
description: [
'Sets the background color of all hover labels on graph'
].join(' ')
},
bordercolor: {
valType: 'color',
role: 'style',
description: [
'Sets the border color of all hover labels on graph.'
].join(' ')
},
font: {
family: extendFlat({}, fontAttrs.family, {
dflt: constants.HOVERFONT
}),
size: extendFlat({}, fontAttrs.size, {
dflt: constants.HOVERFONTSIZE
}),
color: extendFlat({}, fontAttrs.color)
},
namelength: {
valType: 'integer',
min: -1,
dflt: 15,
role: 'style',
description: [
'Sets the default length (in number of characters) of the trace name in',
'the hover labels for all traces. -1 shows the whole name',
'regardless of length. 0-3 shows the first 0-3 characters, and',
'an integer >3 will show the whole name if it is less than that',
'many characters, but if it is longer, will truncate to',
'`namelength - 3` characters and add an ellipsis.'
].join(' ')
}
}
};