I am using plotly js together with React (react-plotly.js), and try to overcome inconsistent behavior that causes a display bug.
I am using a monthly time series with a range slider. All dates in the chart are at a monthly interval.
When at a certain threshold of zoom level all is displayed fine - with tick interval of 1 month, inline with the data.
However, when zooming in past that threshold, suddenly the interval switches to 28 days, and causes misalignment and the wrong date being displayed.
Normal display
Wrong display
As you can see, in this case, the 1st of January appears as Dec 31 (28 days gap).
I could set dtick to ‘1M’ to force the intervals to stay at 1 month apart, but that would cause all labels to appear when zoomed out, cluttering the view, so I’d like to keep the auto behavior.