Skip to content

Commit 8ad77ba

Browse files
committed
refcto
1 parent 5100a34 commit 8ad77ba

File tree

1 file changed

+15
-19
lines changed

1 file changed

+15
-19
lines changed

app/pages/company/company.py

Lines changed: 15 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -33,56 +33,56 @@
3333

3434

3535

36-
def download_viz_1(state): download_el(state,viz1)
36+
def download_viz_1(state): download_el(state,viz_1)
3737
def update_viz_1(state):
38-
state.viz1['data'] = state.company_sector
39-
viz1 = {
38+
state.viz_1['data'] = state.company_sector
39+
viz_1 = {
4040
'data': company_sector,
4141
'title': "Sector",
4242
'sub_title': "",
4343
'on_action': download_viz_1
4444
}
4545

4646

47-
def download_viz_2(state): download_el(state,viz2)
48-
viz2 = {
47+
def download_viz_2(state): download_el(state,viz_2)
48+
viz_2 = {
4949
'data': company_upe_code,
5050
'title': "Headquarter",
5151
'sub_title': "",
5252
'on_action': download_viz_2
5353
}
5454
def update_viz_2(state):
55-
state.viz2['data'] = state.company_upe_code
55+
state.viz_2['data'] = state.company_upe_code
5656

57-
def download_viz_3(state): download_el(state,viz3)
58-
viz3 = {
57+
def download_viz_3(state): download_el(state,viz_3)
58+
viz_3 = {
5959
'data': number_of_tracked_reports_company,
6060
'title': "Reports",
6161
'sub_title': "CbC reports tracked",
6262
'on_action': download_viz_3
6363
}
6464
def update_viz_3(state):
65-
state.viz3['data'] = state.number_of_tracked_reports_company
65+
state.viz_3['data'] = state.number_of_tracked_reports_company
6666

67-
def download_viz_4(state): download_el(state,viz4)
68-
viz4 = {
67+
def download_viz_4(state): download_el(state,viz_4)
68+
viz_4 = {
6969
'data': number_of_tracked_reports_company,
7070
'title': "CbC Transparency Grade",
7171
'sub_title': "average over all reports",
7272
'on_action': download_viz_4
7373
}
7474
def update_viz_4(state):
75-
state.viz4['data'] = state.number_of_tracked_reports_company
75+
state.viz_4['data'] = state.number_of_tracked_reports_company
7676

77-
def download_viz_5(state): download_el(state,viz5)
78-
viz5 = {
77+
def download_viz_5(state): download_el(state,viz_5)
78+
viz_5 = {
7979
'data': number_of_tracked_reports_company,
8080
'title': "CbC Transparency Grade",
8181
'sub_title': "selected fiscal year",
8282
'on_action': download_viz_5
8383
}
8484
def update_viz_5(state):
85-
state.viz5['data'] = state.number_of_tracked_reports_company
85+
state.viz_5['data'] = state.number_of_tracked_reports_company
8686

8787
# Viz 26
8888
data_viz_26 = algo.compute_transparency_score(data, selected_company)
@@ -326,10 +326,6 @@ def on_change_company(state):
326326
state.viz4['data'] = state.number_of_tracked_reports_company
327327
state.viz5['data'] = state.number_of_tracked_reports_company
328328

329-
330-
331-
332-
333329
def on_change_year(state):
334330
print("Chosen year: ", state.selected_year)
335331
update_viz_13(state)

0 commit comments

Comments
 (0)