With current code I get hover tooltips, however those are not visible on PNG export. I need to have static label on each polygon.
import plotly.express as px
df = px.data.election()
geojson = px.data.election_geojson()
fig = px.choropleth_mapbox(df, geojson=geojson, color="Bergeron",
locations="district", featureidkey="properties.district",
center={"lat": 45.5517, "lon": -73.7073},
mapbox_style="carto-positron", zoom=9)
fig.update_layout(margin={"r":0,"t":0,"l":0,"b":0})
fig.show()
Solutions which I found are not working, they work only for choropleth but not for choropleth_mapbox which I want to use. List of them:
https://community.plotly.com/t/labels-inside-counties-for-a-map/13953
https://community.plotly.com/t/annotations-on-plotly-choropleth/36219
https://community.plotly.com/t/how-can-i-change-the-hover-labels-into-static-labels/4690/2

