Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -209,23 +209,28 @@ if st.sidebar.button('Run Analysis'):
|
|
| 209 |
xaxis_title='Date',
|
| 210 |
yaxis_title=key,
|
| 211 |
xaxis=dict(
|
| 212 |
-
tickformat="%Y",
|
| 213 |
tickmode="linear",
|
| 214 |
-
dtick="M36",
|
| 215 |
showspikes=True,
|
| 216 |
spikemode='across',
|
| 217 |
spikesnap='cursor',
|
| 218 |
spikethickness=1
|
| 219 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 220 |
hovermode="x unified",
|
| 221 |
hoverlabel=dict(
|
| 222 |
bgcolor="white",
|
| 223 |
font_size=12,
|
| 224 |
font_family="Rockwell"
|
| 225 |
),
|
|
|
|
| 226 |
autosize=True,
|
| 227 |
margin=dict(l=50, r=50, t=50, b=50),
|
| 228 |
-
height=500, # Set a fixed height to ensure proportional scaling
|
| 229 |
)
|
| 230 |
fig.update_xaxes(
|
| 231 |
showgrid=True,
|
|
|
|
| 209 |
xaxis_title='Date',
|
| 210 |
yaxis_title=key,
|
| 211 |
xaxis=dict(
|
| 212 |
+
tickformat="%Y",
|
| 213 |
tickmode="linear",
|
| 214 |
+
dtick="M36",
|
| 215 |
showspikes=True,
|
| 216 |
spikemode='across',
|
| 217 |
spikesnap='cursor',
|
| 218 |
spikethickness=1
|
| 219 |
),
|
| 220 |
+
yaxis=dict(
|
| 221 |
+
# Add this line to maintain aspect ratio
|
| 222 |
+
scaleanchor="x",
|
| 223 |
+
scaleratio=0.5 # Adjust this value to change the aspect ratio
|
| 224 |
+
),
|
| 225 |
hovermode="x unified",
|
| 226 |
hoverlabel=dict(
|
| 227 |
bgcolor="white",
|
| 228 |
font_size=12,
|
| 229 |
font_family="Rockwell"
|
| 230 |
),
|
| 231 |
+
# Remove fixed height and allow autosize
|
| 232 |
autosize=True,
|
| 233 |
margin=dict(l=50, r=50, t=50, b=50),
|
|
|
|
| 234 |
)
|
| 235 |
fig.update_xaxes(
|
| 236 |
showgrid=True,
|