/
chart-styles.js
119 lines (106 loc) · 2.28 KB
/
chart-styles.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
$.elycharts.templates.upbeat = {
type : "line",
margins : [20, 20, 25, 20],
defaultSeries: {
plotProps: { "stroke-width" : 2 },
fill: true,
fillProps: { opacity: .1 },
dot: true,
dotProps : { stroke : "black", "stroke-width": 1 }
},
defaultAxis: {
anchors: true,
labels: true,
labelsDistance: 15
},
features: {
grid: {
draw: [true, true],
props: {
"stroke-dasharray" : "-",
}
},
legend : {
horizontal: false,
width: 200,
height: 100,
x: 100,
y: 150,
dotType: "circle",
dotProps: {
stroke: "white",
"stroke-width" : 1.5,
"stroke-opacity" : 0.5
},
borderProps : {
opacity : 0.3,
fill : "#c0c0c0",
"stroke-width" : 0,
"stroke-opacity" : 0.5
}
}
},
axis: {
r: {
labels: true,
labelsDistance: 2,
labelsAnchor: "start",
labelsMargin: 5
},
l: {
labelsDistance: 20,
labelsAnchor: "start",
labelsMargin: 5
}
}
};
$.elycharts.templates.sensor = {
template: 'upbeat',
series: {
fail: {
color: "red",
type: 'line',
plotProps: { "stroke-width": 0, opacity: 0.3 },
dotProps: { stroke: "red", "stroke-width": 2, opacity: 1 },
},
pass: {
type: 'line',
color: "green",
plotProps: { "stroke-width": 3, opacity: 0.5 }
},
timeout: {
type: 'line',
color: 'black',
dot: true,
fill: false,
plotProps: { "stroke-width": 0 },
dotProps: { "stroke": "black", "stroke-width": 1, opacity: 1 }
},
slow: {
type: 'line',
color: 'yellow',
dot: true,
plotProps: { "stroke-width": 2 },
dotProps: { "stroke": "red", "stroke-width": 1, opacity: 1 }
},
fast: {
type: 'line',
color: 'purple',
dot: true,
plotProps: { "stroke-width": 2 },
dotProps: { "stroke": "purple", "stroke-width": 1, opacity: 0.3 }
},
response: {
color: 'blue',
type: 'line',
axis: 'r',
fill: false,
plotProps: { 'stroke-width': 1 },
dotProps: { 'stroke-width': .5, stroke: "blue" }
}
}
};
$.elycharts.templates['upbeat-pie'] = {
template: 'upbeat',
type: "pie"
};