@@ -94,7 +94,7 @@ def number_of_tracked_reports_over_time(
94
94
fig .update_layout (
95
95
autosize = True ,
96
96
height = 360 ,
97
- font_family = "Roboto" ,
97
+ font_family = "Roboto, sans-serif " ,
98
98
title = None ,
99
99
xaxis = dict (title = None , tickvals = data ["year" ].unique ()),
100
100
yaxis = dict (
@@ -176,20 +176,12 @@ def breakdown_of_reports_by_sector(df: pd.DataFrame) -> go.Figure:
176
176
y = "sector" ,
177
177
x = "percent" ,
178
178
orientation = "h" , # Horizontal orientation
179
- title = "Breakdown of Reports by Sector (All Years)" ,
180
179
labels = {"percent" : "Percentage of Companies (%)" , "sector" : "Sector" },
181
180
text = "percent" , # Show the percentage as text label
182
- hover_data = {"unique_company_count" : True , "percent" : ":.2f%" },
183
- # Add tooltip for count and rounded percentage
181
+ hover_data = {"unique_company_count" : True , "percent" : ":.2f%" }, # Add tooltip for count and rounded percentage
184
182
)
185
183
186
- # Update layout to display the title above the chart
187
- fig .update_layout (
188
- title = "Breakdown of Reports by Sector" ,
189
- title_x = 0.5 ,
190
- title_y = 0.9 , # Adjust position
191
- title_font_size = 20 ,
192
- ) # Adjust font size
184
+ fig .update_layout (title = None )
193
185
194
186
return go .Figure (fig )
195
187
@@ -230,20 +222,14 @@ def breakdown_of_reports_by_hq_country(df: pd.DataFrame) -> go.Figure:
230
222
y = "upe_name" ,
231
223
x = "percent" ,
232
224
orientation = "h" , # Horizontal orientation
233
- title = "Breakdown of Reports by HQ Country over Time" ,
234
225
labels = {"percent" : "Percentage of Companies (%)" , "upe_name" : "HQ Country" },
235
226
text = "percent" , # Show the percentage as text label
236
227
hover_data = {"unique_company_count" : True , "percent" : ":.2f%" },
237
228
# Add tooltip for count and rounded percentage
238
229
)
239
230
240
231
# Update layout to display the title above the chart
241
- fig .update_layout (
242
- title = "Breakdown of Reports by HQ Country over Time" ,
243
- title_x = 0.5 ,
244
- title_y = 0.95 , # Adjust position
245
- title_font_size = 20 ,
246
- ) # Adjust font size
232
+ fig .update_layout (title = None )
247
233
248
234
return go .Figure (fig )
249
235
@@ -278,14 +264,16 @@ def breakdown_of_reports_by_sector_over_time(df: pd.DataFrame) -> go.Figure:
278
264
x = "year" ,
279
265
y = "unique_company_count" ,
280
266
color = "Sectors" ,
281
- title = "Breakdown of Reports by Sector over Time" ,
282
267
labels = {"unique_company_count" : "Number of Companies Reporting" , "year" : "Year" },
283
268
barmode = "stack" ,
284
269
category_orders = {"Sectors" : chart_order },
285
270
)
286
271
287
272
# Reverse the order of legend items
288
- fig .update_layout (legend = dict (traceorder = "reversed" ))
273
+ fig .update_layout (
274
+ title = None ,
275
+ legend = dict (traceorder = "reversed" )
276
+ )
289
277
290
278
# Adjusting the legend order and formatting the legend labels
291
279
for i , trace in enumerate (fig .data ):
@@ -930,7 +918,7 @@ def tax_havens_use_evolution(df: pd.DataFrame, company: str) -> go.Figure:
930
918
931
919
# Update layout settings
932
920
fig .update_layout (
933
- title = "Tax havens use in profitables jurisdictions" ,
921
+ title = None ,
934
922
xaxis_title = None ,
935
923
yaxis_title = None ,
936
924
yaxis_tickformat = ".0%" ,
0 commit comments