Checklist
Summary
Bar Chart Throws 'Invalid min/max y-axis configuration' for Uniform Column Values Without y-axis Bounds, Unlike st.plotly_chart
Reproducible Code Example
import pandas as pd
import streamlit as st
import plotly.graph_objects as go
data_df = pd.DataFrame({
"values": [
[4, 4, 4, 4],
]
})
col1, col2 = st.columns(2)
with col1:
st.data_editor(
data_df,
column_config={
"values": st.column_config.BarChartColumn(
"Values",
width="medium"
),
},
hide_index=True,
)
with col2:
for idx, row in data_df.iterrows():
fig = go.Figure(data=[
go.Bar(x=list(range(len(row['values']))), y=row['values'])
])
fig.update_layout(
title=f"Row {idx}",
xaxis_title="Index",
yaxis_title="Values",
yaxis=dict(range=[0, 10]),
height=300
)
st.plotly_chart(fig, use_container_width=True)
Steps To Reproduce
No response
Expected Behavior
When all values in the column are identical and greater than or equal to 0, the bar chart should render the bars at a consistent fixed level on the y-axis, without requiring explicit y_min or y_max configuration.
Current Behavior
Is this a regression?
Debug info
- Streamlit version:1.52.2
- Python version:3.12.3
- Operating System:AlmaLinux release 8.10 (Cerulean Leopard)
- Browser:Google Chrome
Additional Information
No response
Checklist
Summary
Bar Chart Throws 'Invalid min/max y-axis configuration' for Uniform Column Values Without y-axis Bounds, Unlike st.plotly_chart
Reproducible Code Example
Steps To Reproduce
No response
Expected Behavior
When all values in the column are identical and greater than or equal to 0, the bar chart should render the bars at a consistent fixed level on the y-axis, without requiring explicit y_min or y_max configuration.
Current Behavior
Is this a regression?
Debug info
Additional Information
No response