This repository was archived by the owner on Jul 29, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Expand file tree
/
Copy pathoptions.js
More file actions
137 lines (130 loc) · 4.26 KB
/
Copy pathoptions.js
File metadata and controls
137 lines (130 loc) · 4.26 KB
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
/**
* This object contains all possible options. It will check if the types are correct, if required if the option is one
* of the allowed values.
*
* __any__ means that the name of the property does not matter.
* __type__ is a required field for all objects and contains the allowed types of all objects
*/
let string = 'string';
let bool = 'boolean';
let number = 'number';
let object = 'object'; // should only be in a __type__ property
// Following not used here, but useful for reference
//let array = 'array';
//let dom = 'dom';
//let any = 'any';
let colorOptions = {
fill : { string },
stroke : { string },
strokeWidth: { number },
__type__ : { string, object, 'undefined': 'undefined' }
};
/**
* Order attempted to be alphabetical.
* - x/y/z-prefixes ignored in sorting
* - __type__ always at end
* - globals at end
*/
let allOptions = {
animationAutoStart: { boolean: bool, 'undefined': 'undefined' },
animationInterval : { number },
animationPreload : { boolean: bool },
axisColor : { string },
backgroundColor : colorOptions,
xBarWidth : { number, 'undefined': 'undefined' },
yBarWidth : { number, 'undefined': 'undefined' },
cameraPosition : {
distance : { number },
horizontal: { number },
vertical : { number },
__type__ : { object }
},
zoomable : { boolean: bool },
ctrlToZoom : { boolean: bool },
xCenter : { string },
yCenter : { string },
dataColor : colorOptions,
dotSizeMinFraction: { number },
dotSizeMaxFraction: { number },
dotSizeRatio : { number },
filterLabel : { string },
gridColor : { string },
onclick : { 'function': 'function' },
keepAspectRatio : { boolean: bool },
xLabel : { string },
yLabel : { string },
zLabel : { string },
legendLabel : { string },
xMin : { number, 'undefined': 'undefined' },
yMin : { number, 'undefined': 'undefined' },
zMin : { number, 'undefined': 'undefined' },
xMax : { number, 'undefined': 'undefined' },
yMax : { number, 'undefined': 'undefined' },
zMax : { number, 'undefined': 'undefined' },
showAnimationControls: { boolean: bool, 'undefined': 'undefined' },
showGrid : { boolean: bool },
showLegend : { boolean: bool, 'undefined': 'undefined' },
showPerspective : { boolean: bool },
showShadow : { boolean: bool },
showXAxis : { boolean: bool },
showYAxis : { boolean: bool },
showZAxis : { boolean: bool },
xStep : { number, 'undefined': 'undefined' },
yStep : { number, 'undefined': 'undefined' },
zStep : { number, 'undefined': 'undefined' },
style: {
number, // TODO: either Graph3d.DEFAULT has string, or number allowed in documentation
string: [
'bar',
'bar-color',
'bar-size',
'dot',
'dot-line',
'dot-color',
'dot-size',
'line',
'grid',
'surface'
]
},
tooltip : { boolean: bool, 'function': 'function' },
tooltipDelay : { number: number },
tooltipStyle : {
content: {
color : { string },
background : { string },
border : { string },
borderRadius: { string },
boxShadow : { string },
padding : { string },
__type__ : { object }
},
line: {
borderLeft : { string },
height : { string },
width : { string },
pointerEvents: { string },
__type__ : { object }
},
dot: {
border : { string },
borderRadius : { string },
height : { string },
width : { string },
pointerEvents: { string },
__type__ : { object}
},
__type__: { object}
},
xValueLabel : { 'function': 'function' },
yValueLabel : { 'function': 'function' },
zValueLabel : { 'function': 'function' },
valueMax : { number, 'undefined': 'undefined' },
valueMin : { number, 'undefined': 'undefined' },
verticalRatio : { number },
//globals :
height: { string },
width: { string },
__type__: { object }
};
export {allOptions};