Disable segmentaion on bar chart

How can I disable the segmentaion of the bar charts? I want to get rid of the white lines on all of the bars. Dataframe has dates with day, month and year. I wanted to created bars gropued by month/year. I was able to achive that but the bars are segmented per day and it creates these white lines. How can I get rid of them?

fig = go.Figure()
fig.add_trace(go.Bar(
x=df_sales.Date,
y=df_sales.COL,
name=“Colo”,
marker_color=‘#ef553b’,
xperiod=“M1”,
))
fig.add_trace(go.Bar(
x=df_sales.Date,
y=df_sales.ML,
name=“Molo”,
marker_color=‘#00cc96’,
xperiod=“M1”,
))
fig.show()
Code_6PpLikjaVW

Hi @groot, welcome to the forums.

Extract of the bar charts documentation:

Aggregating into Single Colored Bars

As noted above px.bar() will result in one rectangle drawn per row of input. This can sometimes result in a striped look as in the examples above. To combine these rectangles into one per color per position, you can use px.histogram(), which has its own detailed documentation page.

EDIT: there is even an example for plotly.express. I assume it to be similar for plotly.graph_objects

import plotly.express as px
df = px.data.tips()
fig = px.bar(df, x="sex", y="total_bill",
             color='smoker', barmode='group',
             height=400)
fig.show()
import plotly.express as px
df = px.data.tips()
fig = px.histogram(df, x="sex", y="total_bill",
             color='smoker', barmode='group',
             height=400)
fig.show()