'Plotly Bars aligned center to the grid

i wonder if there is way to align the bars in Plotly Bar to the center of the grid cell. I am using plotly express bar and the x axis displays date type values. As shown in the picture below.

enter image description here

I would like to have my tick label per day, but the bar should be centered in the day and not across the day tick. it's possible to reproduce the behavior with few lines of code:

fig = px.bar(
    x=[datetime.datetime(2022, 3, 1), datetime.datetime(2022, 3, 2), datetime.datetime(2022, 3, 3)],
    y=[2, 4, 5]
)
fig.update_xaxis(dtick=86400000,tickmode='linear',
        ticklabelmode="period")
fig.show()


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source