Spaces:
Running
Running
gauravlochab
commited on
Commit
·
f0c8c23
1
Parent(s):
f42d7bc
feat: adjust font sizes in combined time series graph for improved readability
Browse files
app.py
CHANGED
@@ -843,7 +843,7 @@ def create_combined_time_series_graph(df):
|
|
843 |
yref="y",
|
844 |
text="Percent drawdown (%)",
|
845 |
showarrow=False,
|
846 |
-
font=dict(size=
|
847 |
textangle=-90, # Rotate text to be vertical
|
848 |
align="center"
|
849 |
)
|
@@ -855,7 +855,7 @@ def create_combined_time_series_graph(df):
|
|
855 |
yref="y",
|
856 |
text="Agent APR (%)",
|
857 |
showarrow=False,
|
858 |
-
font=dict(size=
|
859 |
textangle=-90, # Rotate text to be vertical
|
860 |
align="center"
|
861 |
)
|
@@ -868,7 +868,7 @@ def create_combined_time_series_graph(df):
|
|
868 |
yref="paper",
|
869 |
text="Date",
|
870 |
showarrow=False,
|
871 |
-
font=dict(size=
|
872 |
align="center"
|
873 |
)
|
874 |
|
@@ -883,7 +883,7 @@ def create_combined_time_series_graph(df):
|
|
883 |
groupclick="toggleitem",
|
884 |
font=dict(
|
885 |
family="Arial, sans-serif",
|
886 |
-
size=
|
887 |
color="black",
|
888 |
weight="bold"
|
889 |
)
|
@@ -899,7 +899,7 @@ def create_combined_time_series_graph(df):
|
|
899 |
autorange=False, # Disable autoscaling
|
900 |
range=[-50, 100], # Set fixed range from -50 to +100
|
901 |
tickformat=".2f", # Format tick labels with 2 decimal places
|
902 |
-
tickfont=dict(size=
|
903 |
title=None # Remove the built-in axis title since we're using annotations
|
904 |
)
|
905 |
|
@@ -912,7 +912,7 @@ def create_combined_time_series_graph(df):
|
|
912 |
autorange=True, # Explicitly enable autoscaling
|
913 |
tickformat="%b %d", # Simplified date format without time
|
914 |
tickangle=-30, # Angle the labels for better readability
|
915 |
-
tickfont=dict(size=
|
916 |
title=None # Remove built-in title to use annotation instead
|
917 |
)
|
918 |
|
@@ -1088,7 +1088,7 @@ def create_combined_time_series_graph(df):
|
|
1088 |
yref="y",
|
1089 |
text="Percent drawdown (%)",
|
1090 |
showarrow=False,
|
1091 |
-
font=dict(size=
|
1092 |
textangle=-90, # Rotate text to be vertical
|
1093 |
align="center"
|
1094 |
)
|
@@ -1100,7 +1100,7 @@ def create_combined_time_series_graph(df):
|
|
1100 |
yref="y",
|
1101 |
text="Agent APR (%)",
|
1102 |
showarrow=False,
|
1103 |
-
font=dict(size=
|
1104 |
textangle=-90, # Rotate text to be vertical
|
1105 |
align="center"
|
1106 |
)
|
@@ -1113,7 +1113,7 @@ def create_combined_time_series_graph(df):
|
|
1113 |
yref="paper",
|
1114 |
text="Date",
|
1115 |
showarrow=False,
|
1116 |
-
font=dict(size=
|
1117 |
align="center"
|
1118 |
)
|
1119 |
|
@@ -1122,7 +1122,7 @@ def create_combined_time_series_graph(df):
|
|
1122 |
legend=dict(
|
1123 |
font=dict(
|
1124 |
family="Arial, sans-serif",
|
1125 |
-
size=
|
1126 |
color="black",
|
1127 |
weight="bold"
|
1128 |
)
|
@@ -1134,13 +1134,13 @@ def create_combined_time_series_graph(df):
|
|
1134 |
autorange=True, # Explicitly enable autoscaling
|
1135 |
tickformat="%b %d", # Simplified date format without time
|
1136 |
tickangle=-30,
|
1137 |
-
tickfont=dict(size=
|
1138 |
title=None # Remove built-in title to use annotation instead
|
1139 |
)
|
1140 |
|
1141 |
# Update y-axis tick font for fallback graph
|
1142 |
simple_fig.update_yaxes(
|
1143 |
-
tickfont=dict(size=
|
1144 |
)
|
1145 |
|
1146 |
# Add a note about hidden agents if there are more than MAX_VISIBLE_AGENTS
|
|
|
843 |
yref="y",
|
844 |
text="Percent drawdown (%)",
|
845 |
showarrow=False,
|
846 |
+
font=dict(size=16, family="Arial, sans-serif", color="black", weight="bold"), # Adjusted font size
|
847 |
textangle=-90, # Rotate text to be vertical
|
848 |
align="center"
|
849 |
)
|
|
|
855 |
yref="y",
|
856 |
text="Agent APR (%)",
|
857 |
showarrow=False,
|
858 |
+
font=dict(size=16, family="Arial, sans-serif", color="black", weight="bold"), # Adjusted font size
|
859 |
textangle=-90, # Rotate text to be vertical
|
860 |
align="center"
|
861 |
)
|
|
|
868 |
yref="paper",
|
869 |
text="Date",
|
870 |
showarrow=False,
|
871 |
+
font=dict(size=16, family="Arial, sans-serif", color="black", weight="bold"), # Adjusted font size
|
872 |
align="center"
|
873 |
)
|
874 |
|
|
|
883 |
groupclick="toggleitem",
|
884 |
font=dict(
|
885 |
family="Arial, sans-serif",
|
886 |
+
size=14, # Adjusted font size
|
887 |
color="black",
|
888 |
weight="bold"
|
889 |
)
|
|
|
899 |
autorange=False, # Disable autoscaling
|
900 |
range=[-50, 100], # Set fixed range from -50 to +100
|
901 |
tickformat=".2f", # Format tick labels with 2 decimal places
|
902 |
+
tickfont=dict(size=14, family="Arial, sans-serif", color="black", weight="bold"), # Adjusted font size
|
903 |
title=None # Remove the built-in axis title since we're using annotations
|
904 |
)
|
905 |
|
|
|
912 |
autorange=True, # Explicitly enable autoscaling
|
913 |
tickformat="%b %d", # Simplified date format without time
|
914 |
tickangle=-30, # Angle the labels for better readability
|
915 |
+
tickfont=dict(size=14, family="Arial, sans-serif", color="black", weight="bold"), # Adjusted font size
|
916 |
title=None # Remove built-in title to use annotation instead
|
917 |
)
|
918 |
|
|
|
1088 |
yref="y",
|
1089 |
text="Percent drawdown (%)",
|
1090 |
showarrow=False,
|
1091 |
+
font=dict(size=14, family="Arial, sans-serif", color="black", weight="bold"), # Adjusted font size
|
1092 |
textangle=-90, # Rotate text to be vertical
|
1093 |
align="center"
|
1094 |
)
|
|
|
1100 |
yref="y",
|
1101 |
text="Agent APR (%)",
|
1102 |
showarrow=False,
|
1103 |
+
font=dict(size=14, family="Arial, sans-serif", color="black", weight="bold"), # Adjusted font size
|
1104 |
textangle=-90, # Rotate text to be vertical
|
1105 |
align="center"
|
1106 |
)
|
|
|
1113 |
yref="paper",
|
1114 |
text="Date",
|
1115 |
showarrow=False,
|
1116 |
+
font=dict(size=14, family="Arial, sans-serif", color="black", weight="bold"), # Adjusted font size
|
1117 |
align="center"
|
1118 |
)
|
1119 |
|
|
|
1122 |
legend=dict(
|
1123 |
font=dict(
|
1124 |
family="Arial, sans-serif",
|
1125 |
+
size=14, # Adjusted font size
|
1126 |
color="black",
|
1127 |
weight="bold"
|
1128 |
)
|
|
|
1134 |
autorange=True, # Explicitly enable autoscaling
|
1135 |
tickformat="%b %d", # Simplified date format without time
|
1136 |
tickangle=-30,
|
1137 |
+
tickfont=dict(size=14, family="Arial, sans-serif", color="black", weight="bold"), # Adjusted font size
|
1138 |
title=None # Remove built-in title to use annotation instead
|
1139 |
)
|
1140 |
|
1141 |
# Update y-axis tick font for fallback graph
|
1142 |
simple_fig.update_yaxes(
|
1143 |
+
tickfont=dict(size=14, family="Arial, sans-serif", color="black", weight="bold") # Adjusted font size
|
1144 |
)
|
1145 |
|
1146 |
# Add a note about hidden agents if there are more than MAX_VISIBLE_AGENTS
|