-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathgetData.js
More file actions
77 lines (75 loc) · 1.9 KB
/
getData.js
File metadata and controls
77 lines (75 loc) · 1.9 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
const satisfactionValue = ({{textInput1.value}} != "" ? parseInt({{textInput1.value}}) : 260)
const profitValue = ({{textInput2.value}} != "" ? parseInt({{textInput2.value}}) : 40)
const revenueValue = ({{textInput3.value}} != "" ? parseInt({{textInput3.value}}) : 180)
var data = [
{
type: "indicator",
mode: "number+gauge+delta",
value: revenueValue,
delta: { reference: 200 },
domain: { x: [0.25, 1], y: [0.08, 0.25] },
title: { text: "Revenue" },
gauge: {
shape: "bullet",
axis: { range: [null, 300] },
threshold: {
line: { color: "black", width: 2 },
thickness: 0.75,
value: 170
},
steps: [
{ range: [0, 150], color: "gray" },
{
range: [150, 250],
color: "lightgray"
}
],
bar: { color: "black" }
}
},
{
type: "indicator",
mode: "number+gauge+delta",
value: profitValue,
delta: { reference: 200 },
domain: { x: [0.25, 1], y: [0.4, 0.6] },
title: { text: "Profit" },
gauge: {
shape: "bullet",
axis: { range: [null, 100] },
threshold: {
line: { color: "black", width: 2 },
thickness: 0.75,
value: 50
},
steps: [
{ range: [0, 25], color: "gray" },
{ range: [25, 75], color: "lightgray" }
],
bar: { color: "black" }
}
},
{
type: "indicator",
mode: "number+gauge+delta",
value: satisfactionValue,
delta: { reference: 200 },
domain: { x: [0.25, 1], y: [0.7, 0.9] },
title: { text: "Satisfaction" },
gauge: {
shape: "bullet",
axis: { range: [null, 300] },
threshold: {
line: { color: "black", width: 2 },
thickness: 0.75,
value: 210
},
steps: [
{ range: [0, 150], color: "gray" },
{ range: [150, 250], color: "lightgray" }
],
bar: { color: "black" }
}
}
];
return data