Spaces:
Sleeping
Sleeping
Update dashboard.py
Browse files- dashboard.py +10 -4
dashboard.py
CHANGED
@@ -393,12 +393,18 @@ def legend_hook(plot, element):
|
|
393 |
if p.legend:
|
394 |
legend = p.legend[0]
|
395 |
legend.orientation = 'horizontal'
|
396 |
-
legend.location = '
|
397 |
-
legend.spacing = 10
|
398 |
-
legend.margin = 10
|
399 |
-
legend.label_text_font_size = '14pt'
|
400 |
legend.background_fill_color = 'white'
|
401 |
legend.border_line_color = 'black'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
402 |
|
403 |
def create_overlay_plots(df):
|
404 |
curves = []
|
|
|
393 |
if p.legend:
|
394 |
legend = p.legend[0]
|
395 |
legend.orientation = 'horizontal'
|
396 |
+
legend.location = 'center'
|
|
|
|
|
|
|
397 |
legend.background_fill_color = 'white'
|
398 |
legend.border_line_color = 'black'
|
399 |
+
legend.label_text_font_size = '12pt'
|
400 |
+
legend.label_text_color = 'black'
|
401 |
+
legend.spacing = 10
|
402 |
+
legend.margin = 10
|
403 |
+
legend.label_standoff = 5
|
404 |
+
# Distribute legend items in multiple columns
|
405 |
+
legend.columns = 8 # ⚠ This sets 8 columns for Bokeh >= 2.4
|
406 |
+
# Move legend below the plot
|
407 |
+
p.add_layout(legend, 'below')
|
408 |
|
409 |
def create_overlay_plots(df):
|
410 |
curves = []
|