The layout for this page is inside html.Div(getHomepage())
where getHomepage() is:
def getHomepage():
elems = [
html.P("Here is the map"),
plot_country_map(),
]
return elems
I have a few different pages using dcc.Graph() to plot scatter and bar plots, with a similar layout organization. However, it seems like dcc.Graph() is not updating the figure field when I use go.Choropleth().
that’s weird. If you are using dcc.grpah() to plot scatter and bar plots, then it should plot go.choropleth(). Have you tried plotting go.choropleth on it’s own, without using Dash? Just plug the data into go.choropleth and try to plot it using only plotly with map_fig.show(). If that works, then you know the problem is not with plotly or your data, but with the connection between Dash and the graph.
I’m having a similar issue where when I run my callback, the go.Choroplethmap can be created on the first run, but is not updated on subsequent callbacks. However I have a go.Densitymap that is successfully updating every callback. Including Fig.show() is creating a figure that changes on each callback.
Do you have updates on how you got this working later?
The issue has resolved itself. I cannot replicate it on my original code nor with a modified version. Not sure what, if anything, has changed since then. The only thing I can think of is that clearing my browser’s cache may have fixed it.