We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
As of dash 2.7.0, px.scatter_mapbox traces do not update when the figure template is changed.
px.scatter_mapbox
It might have something to do with this change?
Feature release 2.16.0 adds clustering to scattermapbox traces and restricted bounds to mapbox plots.
For example, in dash dash 2.6.2 it works correctly:
In dash 2.7.0, the traces are not updated but the legend and the hover info is correct for each template.
from dash import Dash, dcc, html, Input, Output import plotly.express as px import dash_bootstrap_components as dbc app = Dash(__name__, external_stylesheets=[dbc.themes.BOOTSTRAP]) carshare = px.data.carshare() figure_templates = [ "plotly", "ggplot2", "seaborn", "simple_white", "plotly_white", "plotly_dark", "presentation", "xgridoff", "ygridoff", "gridon", "none", ] change_figure_template = html.Div( [ html.Div("Change Figure Template"), dcc.Dropdown(figure_templates, figure_templates[0], id="template"), ], className="pb-4", ) app.layout = dbc.Container( [ dbc.Row(dbc.Col(change_figure_template, lg=6)), dbc.Row(dbc.Col(html.Div(id="graphs"))), ], className="dbc p-4", fluid=True, ) @app.callback( Output("graphs", "children"), Input("template", "value"), ) def update_graph_theme(template): return dcc.Graph( figure=px.scatter_mapbox( carshare, lat="centroid_lat", lon="centroid_lon", color="peak_hour", size="car_hours", size_max=15, zoom=10, mapbox_style="carto-positron", title=f"Carshare <br> {template} figure template", template=template, ), className="border", ) if __name__ == "__main__": app.run_server(debug=True)
The text was updated successfully, but these errors were encountered:
scattermapbox
Thanks for the report. Regression confirmed: plotly/plotly.js#6382
Sorry, something went wrong.
I've found a simmilar issue with graph_objects.Scattermapbox using 2.7.0
graph_objects.Scattermapbox
This bug is addressed by https://github.com/plotly/plotly.js/releases/tag/v2.16.4. Until next dash release you could provide plotly.js bundle in the asset folder to have the fix.
plotly.js
@AnnMarieW can confirm that your example is now working with Dash 2.7.1, which includes the Plotly 2.16.4 🎉
No branches or pull requests
As of dash 2.7.0,
px.scatter_mapbox
traces do not update when the figure template is changed.It might have something to do with this change?
For example, in dash dash 2.6.2 it works correctly:

In dash 2.7.0, the traces are not updated but the legend and the hover info is correct for each template.
The text was updated successfully, but these errors were encountered: