WPatrick81 commited on
Commit
2701397
·
verified ·
1 Parent(s): 9936b6d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +17 -7
app.py CHANGED
@@ -810,11 +810,12 @@ def make_movement_chart(filtered_df, pitcher_name, is_date_filtered=False, base_
810
  legend=dict(orientation="v", x=1.02, xanchor="left",
811
  y=0.5, yanchor="middle", font=dict(size=11)),
812
  xaxis=dict(range=[-80,80], mirror=True,
813
- title=dict(text="Horizontal Break", font=dict(size=11)),
814
- tickfont=dict(size=10)),
 
815
  yaxis=dict(range=[-80,80], mirror=True,
816
- title=dict(text="Vertical Break", font=dict(size=11)),
817
- tickfont=dict(size=10)),
818
  autosize=True, margin=dict(l=50,r=130,t=60,b=50))
819
  for x in range(-80,81,20):
820
  fig.add_vline(x=x, line_width=2 if x==0 else 0.7,
@@ -2821,10 +2822,19 @@ def render_tab(active_tab, filtered_key, base_key,
2821
  base_content = [
2822
  dbc.Row([
2823
  dbc.Col(dbc.Card(dbc.CardBody(
2824
- dcc.Graph(figure=base_mov_fig,
 
 
2825
  config={"displayModeBar": True},
2826
- style={"height": "700px"})),
2827
- style=dcard_style), md=6),
 
 
 
 
 
 
 
2828
  dbc.Col(dbc.Card(dbc.CardBody([
2829
  html.P("📡 구종별 트래킹 (전체기간)",
2830
  style={"fontWeight": "700", "marginBottom": "8px",
 
810
  legend=dict(orientation="v", x=1.02, xanchor="left",
811
  y=0.5, yanchor="middle", font=dict(size=11)),
812
  xaxis=dict(range=[-80,80], mirror=True,
813
+ title=dict(text="Horizontal Break", font=dict(size=11)),
814
+ tickfont=dict(size=10),
815
+ scaleanchor="y", scaleratio=1), # ← 추가
816
  yaxis=dict(range=[-80,80], mirror=True,
817
+ title=dict(text="Vertical Break", font=dict(size=11)),
818
+ tickfont=dict(size=10)),
819
  autosize=True, margin=dict(l=50,r=130,t=60,b=50))
820
  for x in range(-80,81,20):
821
  fig.add_vline(x=x, line_width=2 if x==0 else 0.7,
 
2822
  base_content = [
2823
  dbc.Row([
2824
  dbc.Col(dbc.Card(dbc.CardBody(
2825
+ html.Div(
2826
+ dcc.Graph(
2827
+ figure=mov_fig,
2828
  config={"displayModeBar": True},
2829
+ style={"width": "100%", "height": "100%"}),
2830
+ style={
2831
+ "position": "relative",
2832
+ "width": "100%",
2833
+ "paddingBottom": "100%", # 1:1 비율 유지
2834
+ },
2835
+ id="mov-chart-square-wrapper"
2836
+ )
2837
+ ), style=dcard_style), md=6),
2838
  dbc.Col(dbc.Card(dbc.CardBody([
2839
  html.P("📡 구종별 트래킹 (전체기간)",
2840
  style={"fontWeight": "700", "marginBottom": "8px",