Based on this code directly from plotly's tut page:
https://plot.ly/python/dropdowns/
Now, what if I want to change not just the chart type but rather the data source and its chart type? Is it possible?
EDIT:
I've played with this settings:
data1 = go.Surface(z=df.values.tolist(), colorscale='Viridis')
data2 = go.Heatmap(z=df.values.tolist())
buttons=list([
dict(
args=[data1],
label='3D Surface',
method='restyle'
),
dict(
args=[data2],
label='Heatmap',
method='restyle'
)
])
However, the graphs are shown, but overlayed. And when I click any item in the dropdown menu, the graph is completely gone.
restylemethod described on that page give an example how to change the data withpy.iplot(dict(data=data, layout=layout), ...)? NB: you should include the code you have tried with embedded in your question. It is not enough to refer to an external site.