Plotly barplot labels not rendering with st.plotly_chart()

When rendering a plotly barplot with, I get the plot exactly the way I developed it. But when I render it using streamlit’s st.plotly_chart(), it gets with another appearance (without the bar labels).

This is how it should be (the plot I get when using

And how it renders with st.plotly_chart() (it is in dark theme, but the problem also occurs in light theme):

My code:

import pandas as pd
import streamlit as st
import as px

df = pd.read_excel('file.xlsx', sheet_name='Current_Base')
fig = px.histogram(df,

My relevant settings:

- os: macOS Monterey 12.1
- libs:
   streamlit 1.3.1
   plotly 5.5.0

Could anyone help me with this issue?

(I also posted it in stack overflow)