UCS2014 commited on
Commit
6835768
·
verified ·
1 Parent(s): fb0b9f2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -8
app.py CHANGED
@@ -284,7 +284,7 @@ def track_plot(df, include_actual=True):
284
  showgrid=True, gridcolor="rgba(0,0,0,0.12)", automargin=True
285
  )
286
 
287
- fig.update_yaxes(
288
  title_text=f"<b>{ylab}</b>",
289
  title_font=dict(size=16),
290
  range=y_range,
@@ -294,16 +294,18 @@ def track_plot(df, include_actual=True):
294
  )
295
 
296
  # Add a border rectangle to enclose the full figure space
297
- fig.add_shape(
298
- type="rect",
299
- xref="paper", yref="paper",
300
- x0=-0.12, y0=-0.12, x1=1.12, y1=1.12, # expanded box to include axes titles
301
- line=dict(color="#000", width=1.5),
302
- layer="below"
303
- )
 
304
  return fig
305
 
306
 
 
307
  # ---------- Preview modal (matplotlib) ----------
308
  def preview_tracks(df: pd.DataFrame, cols: list[str]):
309
  cols = [c for c in cols if c in df.columns]
 
284
  showgrid=True, gridcolor="rgba(0,0,0,0.12)", automargin=True
285
  )
286
 
287
+ fig.update_yaxes(
288
  title_text=f"<b>{ylab}</b>",
289
  title_font=dict(size=16),
290
  range=y_range,
 
294
  )
295
 
296
  # Add a border rectangle to enclose the full figure space
297
+ fig.add_shape(
298
+ type="rect",
299
+ xref="paper", yref="paper",
300
+ x0=-0.12, y0=-0.12, x1=1.12, y1=1.12,
301
+ line=dict(color="#000", width=1.5),
302
+ layer="below"
303
+ )
304
+
305
  return fig
306
 
307
 
308
+
309
  # ---------- Preview modal (matplotlib) ----------
310
  def preview_tracks(df: pd.DataFrame, cols: list[str]):
311
  cols = [c for c in cols if c in df.columns]