forked from plotly/plotly.js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathattributes.js
105 lines (102 loc) · 3.39 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
/**
* Copyright 2012-2018, 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 colorAttributes = require('../color/attributes');
module.exports = {
bgcolor: {
valType: 'color',
dflt: colorAttributes.background,
role: 'style',
editType: 'calc',
description: 'Sets the background color of the range slider.'
},
bordercolor: {
valType: 'color',
dflt: colorAttributes.defaultLine,
role: 'style',
editType: 'calc',
description: 'Sets the border color of the range slider.'
},
borderwidth: {
valType: 'integer',
dflt: 0,
min: 0,
role: 'style',
editType: 'calc',
description: 'Sets the border color of the range slider.'
},
autorange: {
valType: 'boolean',
dflt: true,
role: 'style',
editType: 'calc',
impliedEdits: {'range[0]': undefined, 'range[1]': undefined},
description: [
'Determines whether or not the range slider range is',
'computed in relation to the input data.',
'If `range` is provided, then `autorange` is set to *false*.'
].join(' ')
},
range: {
valType: 'info_array',
role: 'info',
items: [
{valType: 'any', editType: 'calc', impliedEdits: {'^autorange': false}},
{valType: 'any', editType: 'calc', impliedEdits: {'^autorange': false}}
],
editType: 'calc',
impliedEdits: {'autorange': false},
description: [
'Sets the range of the range slider.',
'If not set, defaults to the full xaxis range.',
'If the axis `type` is *log*, then you must take the',
'log of your desired range.',
'If the axis `type` is *date*, it should be date strings,',
'like date data, though Date objects and unix milliseconds',
'will be accepted and converted to strings.',
'If the axis `type` is *category*, it should be numbers,',
'using the scale where each category is assigned a serial',
'number from zero in the order it appears.'
].join(' ')
},
thickness: {
valType: 'number',
dflt: 0.15,
min: 0,
max: 1,
role: 'style',
editType: 'calc',
description: [
'The height of the range slider as a fraction of the',
'total plot area height.'
].join(' ')
},
visible: {
valType: 'boolean',
dflt: true,
role: 'info',
editType: 'calc',
description: [
'Determines whether or not the range slider will be visible.',
'If visible, perpendicular axes will be set to `fixedrange`'
].join(' ')
},
fixedyrange: {
valType: 'boolean',
dflt: true,
role: 'style',
editType: 'calc',
description: [
'Determine whether the perpendicular axes in the rangeslider',
'use (or not) their initial range when they are zoomed in the plot',
'To allow zoom one (or more) perpendicular axe(s) while the rangeslider is visible',
'you must set the attributes `fixedrange` to *true* on said axe(s).'
].join(' ')
},
editType: 'calc'
};