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