bakyt92 commited on
Commit
8140f70
·
1 Parent(s): 842bd55

update dashboard.py

Browse files
Files changed (2) hide show
  1. app.py +5 -1
  2. dashboard.py +10 -10
app.py CHANGED
@@ -232,7 +232,11 @@ def create_interface():
232
  with gr.Blocks(
233
  title="Wildberries Analytics Dashboard",
234
  theme=gr.themes.Soft(),
235
- css="footer {visibility: hidden}"
 
 
 
 
236
  ) as demo:
237
 
238
  gr.Markdown("""
 
232
  with gr.Blocks(
233
  title="Wildberries Analytics Dashboard",
234
  theme=gr.themes.Soft(),
235
+ css="""
236
+ footer {visibility: hidden}
237
+ .plot-container {min-height: 950px !important}
238
+ .gradio-plot {min-height: 950px !important}
239
+ """
240
  ) as demo:
241
 
242
  gr.Markdown("""
dashboard.py CHANGED
@@ -39,8 +39,8 @@ def create_sales_dashboard(sales_data: pd.DataFrame, period: str = "week") -> go
39
  ],
40
  specs=[[{"secondary_y": True}, {"type": "bar"}],
41
  [{"type": "pie"}, {"type": "histogram"}]],
42
- vertical_spacing=0.12,
43
- horizontal_spacing=0.1
44
  )
45
 
46
  try:
@@ -131,10 +131,10 @@ def create_sales_dashboard(sales_data: pd.DataFrame, period: str = "week") -> go
131
  title=f"📊 Sales Analytics Dashboard - Last {period.title()}",
132
  title_x=0.5,
133
  showlegend=False,
134
- height=800,
135
- font=dict(size=12),
136
  template="plotly_white",
137
- margin=dict(t=80, b=40, l=40, r=40)
138
  )
139
 
140
  # Update axes labels
@@ -174,8 +174,8 @@ def create_inventory_dashboard(forecast_data: pd.DataFrame) -> go.Figure:
174
  ],
175
  specs=[[{"type": "pie"}, {"type": "bar"}],
176
  [{"type": "bar"}, {"type": "scatter"}]],
177
- vertical_spacing=0.12,
178
- horizontal_spacing=0.1
179
  )
180
 
181
  try:
@@ -294,10 +294,10 @@ def create_inventory_dashboard(forecast_data: pd.DataFrame) -> go.Figure:
294
  title="📦 Inventory Risk Analysis Dashboard",
295
  title_x=0.5,
296
  showlegend=True,
297
- height=800,
298
- font=dict(size=12),
299
  template="plotly_white",
300
- margin=dict(t=80, b=40, l=40, r=40)
301
  )
302
 
303
  # Update axes
 
39
  ],
40
  specs=[[{"secondary_y": True}, {"type": "bar"}],
41
  [{"type": "pie"}, {"type": "histogram"}]],
42
+ vertical_spacing=0.20,
43
+ horizontal_spacing=0.15
44
  )
45
 
46
  try:
 
131
  title=f"📊 Sales Analytics Dashboard - Last {period.title()}",
132
  title_x=0.5,
133
  showlegend=False,
134
+ height=900,
135
+ font=dict(size=11),
136
  template="plotly_white",
137
+ margin=dict(t=100, b=60, l=60, r=60)
138
  )
139
 
140
  # Update axes labels
 
174
  ],
175
  specs=[[{"type": "pie"}, {"type": "bar"}],
176
  [{"type": "bar"}, {"type": "scatter"}]],
177
+ vertical_spacing=0.20,
178
+ horizontal_spacing=0.15
179
  )
180
 
181
  try:
 
294
  title="📦 Inventory Risk Analysis Dashboard",
295
  title_x=0.5,
296
  showlegend=True,
297
+ height=900,
298
+ font=dict(size=11),
299
  template="plotly_white",
300
+ margin=dict(t=100, b=60, l=60, r=60)
301
  )
302
 
303
  # Update axes