Dashboard
4
50
250
#020202
30
Number 01
$
code
number
result = {"value": 10000,"previous": 12000}
Number 02
€
code
number
result = {"value": 12000,"previous": 10000}
Meter 01
€
code
meter
result = {"min": 0, "max": 100, "value": 90}
Meter 02
$
code
meter
result = {"min": 0, "max": 100, "value": 40}
Graph
code
graph
result = {"graphs": [
{
"values": [
{"x": i, "y": i * 1000}
for i in range(1, 12)
],
"title": "Current Year",
"key": "current",
"area": True,
"color": "ffffff",
},
{
"values": [
{"x": i, "y": 1000 * (12-i)}
for i in range(1, 12)
],
"title": "Previous Year",
"key": "previous",
"area": True,
"color": "000000",
},
]}
Integer counter
code
integer
result = {"value": self.env.context.get('counter', 990)}
Counter
code
counter
result = {"value": self.env.context.get('counter', 990)}
Dashboard title
1
1
4
#707070
#000000
Number 01
1
2
4
#47bbb3
#ffffff
Number 02
1
6
4
#ec663c
#ffffff
Meter 01
2
2
4
#9c4274
#ffffff
Meter 02
2
6
4
#12b0c5
#ffffff
+1 to Counter
3
10
1
2
#B41F1F
#EEBF77
{'counter': (context.counter or 990) + 1}
check_if(((context.counter or 990) + 1) % 2, '#ff0000', '#00ff00')
Counter
3
11
3
#4B0082
#ffffff
Integer
4
11
3
#ffffff
#4B0082
Graph
3
2
2
8
#ff9618
#ffffff