How to safely change X Axis Ticklabels to monthly when the chart could be multiple ranges

Hey all,

I feel like I should be able to find this on Google, but I’m struggling to find a good answer.

I’ve got a chart on Dash that can be formatted on Week, Month, or Quarter. When it is set to Month, I have a DataFrame that has a date column like this:

Screen Shot 2022-11-04 at 10.03.29 AM

I would expect a chart that shows month by month, but instead I get:

I’m wondering what the best method is for this DataFrame to show just the tick labels of 09-01-2022, 10-01-2022, 11-01-2022 on the chart? I tried casting the dates to df[‘Date’], but that didn’t change anything. I know I could manually change the x axis ticks, but that seems unnecessary and likely to break in some scenarios, I assume there is some way that Plotly will show this correctly without a manual override?