Plotly dash heatmap with Time on Y axis doesn't work

Hello,

I am not sure if this is intended but I was following the app from the examples provide for Plotly ‘Heatmap with Datetime Axis’ as seen here
Instead of X-axis with timestamps, I wanted to have the Y axis to have timestamps and hence I wrote the following in my callback function-

return {

	'data': [go.Heatmap(
		x = filteredDf.iloc[:,1:-4].columns,
		y = filteredDf.Datetime,
		z = filteredDf.iloc[:,1:-4].values.tolist(),
		showscale = True,
		colorbar={"title": "Levels in dBm"},
		colorscale ='Viridis')],
	'layout': {	'height': 700,
				'xaxis' : {'side':'top', 'dtick':'2', 'title':'Freq (MHz)'},
				'yaxis' : { 'title':'Time'},
				'margin': {'l':160, 't':75,'r':15}
				}
		}

If I pass the Datetime column as of type ‘object’ (i.e. string) the heatmap renders fine however if the datetime is passed as a datetime64[ns] object the heatmap doesnt render anything but just the canvas of the heatmap with time displayed on the Y axis and column names on the X axis.

Is there something I am missing? Please advice

Thanks

Hi,

I worked around this by setting the index of my dataframe as DatetimeIndex based on my Datetime column and this renders the dataframe just as I expected it…