Legend not showing up in simple histogram plot

As I understand it, if the histogram in plotly.express has a single visualisation object, the legend is not displayed. An example for the case of two targets can be found in the reference. So, if you add the category name to the data frame and specify the element column as a colour in the graph code, the legend will be displayed.

import sys #Standard Python Module
import numpy as np
import pandas as pd
import plotly.graph_objects as go
import plotly.express as px

mu, sigma = 3, 1 
s = np.random.normal(mu, sigma, 100)

df=pd.DataFrame({'A': s, 'category': ['A']*len(s)})

fig = px.histogram(df, x="A", color='category')
fig.update_layout(showlegend=True)

fig.show()