Heatmap and Time series, x axis ticks are off

Hello everybody
I have been experimenting with the heatmap visual and so far it has been working perfectly except when I try to work with time series.

I have noticed that when I try to add time series in the X axis, the X axis ticks don’t really match the bars of the heatmap.

In the below screenhot, I would like to have the second bar displayed between the 4th of november and the 4th of december,

A live version of the code is available at this codepen link

Did I forget something ?

Thank you !

Hi @darklod06!

plotly is converting your discrete scale into an automatic continuous scale. What you see on your hover label is the middle of your data point, i.e. rectangle.
You could circumvent this by setting the X format to categories instead of datetime.

The heatmap works exactly as shown in the specs :wink:

Paragraph: Heatmap with Datetime Axis

Regards,
Martin

I will give it a try thank you @malewins ! Too bad we can’t tweak the continuous scale applled for each rectangle when using the “dates” type in the layout xaxis object.