Hi,
I am trying to display a horizontal bar chart and copied the following code from the plotly.com site but I am getting ‘plotly.graph_objects’ has no attribute ‘Figure’ error both on client and server sides.
I thought Anvil was on Plotly v3.10 hence the error but I believe it has now been upgraded to 4.
Any thoughts why I am getting this error?
Code Sample:
import plotly.graph_objects as go
fig = go.Figure(go.Bar(
x=[20, 14, 23],
y=['giraffes', 'orangutans', 'monkeys'],
orientation='h'))
fig.show()
Thanks,