-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcoronawidget.kv
77 lines (75 loc) · 2.26 KB
/
coronawidget.kv
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
#: include TwoPlotsWidget/twoplotssharedxwidget.kv
<CoronaTestLayout>:
orientation: 'vertical'
CoronaWidget:
id: wdgt1
<CoronaWidget>:
Spinner:
id: spn1
values: root.continents
size_hint: .25, .15
pos_hint: {'top':1, 'left':1}
on_text:
root.activeContinent = self.text
root.countries = root.continentsAndCountries[self.text]
Spinner:
id: spn2
values: root.countries
size_hint: .25, .15
pos_hint: {'top':1, 'x':.25}
on_text:
root.update_active_country_infection(self.text)
root.update_active_country_vaccination(self.text)
Label:
id: lbl1
text: 'Date'
font_size: 15
size_hint: .25, .05
pos_hint: {'top':1, 'x':.5}
Label:
id: lbl2
text: root.newInfectionsDate
font_size: 25
size_hint: .25, .1
pos_hint: {'top':.95, 'x':.5}
Label:
id: lbl3
text: 'Infections'
font_size: 15
size_hint: .25, .05
pos_hint: {'top':1, 'x':.75}
Label:
id: lbl4
text: root.newInfections
font_size: 25
size_hint: .25, .1
pos_hint: {'top':.95, 'x':.75}
ScrollView:
id: scroll1
size_hint: 1, .85
pos_hint: {'top': .85, 'left':1}
GridLayout:
id: grid1
size_hint: 1, None
height: self.minimum_height
cols: 1
row_force_default: True
row_default_height: root.height * 0.85
TwoPlotsSharedXWidget:
id: plt1
sourceX: root.datesOfCases
sourceY: [root.casesWeekly, root.cumulativeCases]
units : ['','']
titles : ['Cases / week','Cumulative Cases']
ax_colors : ['r','b']
formatter : '%b-%y'
TwoPlotsSharedXWidget:
id: plt2
size_hint:1,1
#pos_hint: {'top': .85, 'left':1}
sourceX: root.datesOfVaccination
sourceY: [root.vaccinationWeekly,[]]
units : ['']
titles : ['Vaccinations / week']
ax_colors : ['r']
formatter : '%b-%y'