Dash - Layout loading but not traces despite legend appearing

The title says everything. I am working with a Dash app, and using the dcc.Graph feature.

When I update my buttons, the graph layout appears, the range slider and so on and so for, but not the traces even though the traces appear on the legend. Anything in mind ?

My @appcallback code ends with:

return {‘data’: data_plot, ‘layout’: layout_plot}

To check if everything is ok, i’ve printed the data_plot and layout_plot variables, and all seems fine, meaning the dictionnary is as usual, i.e, x, y, name, etc for data_plot, and title, titlefont, etc for layout_plot.


nothing comes to mind. can you share a small, reproducible example?

I found the issue and I am very surprised.

When using plotly, I input my data as a np.array()

When using dcc.Graph on Dash, i need to input my data as a np.array().ravel()

Does it make any sense to you ?



Sorry for this, I just implemented everything in np.array().ravel(). It works when I use it in plotly naked. Thanks