Surajv commited on
Commit
d9ac8bf
·
1 Parent(s): 69c2b76
Files changed (3) hide show
  1. app.py +2 -2
  2. assets/style.css +2 -2
  3. src/ui/plots/utils.py +3 -3
app.py CHANGED
@@ -85,9 +85,9 @@ def main():
85
 
86
  # Set page layout based on current page
87
  if current_page == "overview":
88
- layout = "wide" # Wide layout for other pages (85% width via CSS)
89
  else:
90
- layout = "centered" # Full width for home page
91
 
92
  # Configure page with appropriate layout
93
  st.set_page_config(
 
85
 
86
  # Set page layout based on current page
87
  if current_page == "overview":
88
+ layout = "wide"
89
  else:
90
+ layout = "centered"
91
 
92
  # Configure page with appropriate layout
93
  st.set_page_config(
assets/style.css CHANGED
@@ -144,7 +144,7 @@ section[data-testid="stSidebar"] {
144
  } */
145
 
146
  /* Constrain wide layout to 85% for visualization pages */
147
- /* div[data-testid="stMainBlockContainer"] {
148
  max-width: 75% !important;
149
  margin: 0 auto !important;
150
- } */
 
144
  } */
145
 
146
  /* Constrain wide layout to 85% for visualization pages */
147
+ div[data-testid="stMainBlockContainer"] {
148
  max-width: 75% !important;
149
  margin: 0 auto !important;
150
+ }
src/ui/plots/utils.py CHANGED
@@ -71,7 +71,7 @@ def display_plot_with_download(fig, plot_name: str = "plot", help_text: str = No
71
  )
72
 
73
  # Display the plot
74
- st.pyplot(fig, use_container_width=True)
75
 
76
  def display_plotly_with_download(fig, plot_name: str = "plot", help_text: str = None):
77
  """
@@ -88,7 +88,7 @@ def display_plotly_with_download(fig, plot_name: str = "plot", help_text: str =
88
  # Use a unique key to prevent redraws and add config to disable animations for faster rendering
89
  st.plotly_chart(
90
  fig,
91
- use_container_width=True,
92
  key=f"plotly_{plot_name}_{id(fig)}",
93
  config={"displayModeBar": False, "responsive": True, "staticPlot": False}
94
  )
@@ -256,7 +256,7 @@ def display_interactive_spatial_plot(adata, color_key="domain", spot_size = 6, p
256
 
257
  plot_event = st.plotly_chart(
258
  fig,
259
- use_container_width=True,
260
  config={'scrollZoom': True},
261
  key=plot_name,
262
  on_select="rerun"
 
71
  )
72
 
73
  # Display the plot
74
+ st.pyplot(fig, use_container_width=False)
75
 
76
  def display_plotly_with_download(fig, plot_name: str = "plot", help_text: str = None):
77
  """
 
88
  # Use a unique key to prevent redraws and add config to disable animations for faster rendering
89
  st.plotly_chart(
90
  fig,
91
+ use_container_width=False,
92
  key=f"plotly_{plot_name}_{id(fig)}",
93
  config={"displayModeBar": False, "responsive": True, "staticPlot": False}
94
  )
 
256
 
257
  plot_event = st.plotly_chart(
258
  fig,
259
+ use_container_width=False,
260
  config={'scrollZoom': True},
261
  key=plot_name,
262
  on_select="rerun"