✊🏿 Black Lives Matter. Please consider donating to Black Girls Code today.
⚡️ Concerned about the grid? Kyle Baranko teaches how to predicting peak loads using XGBoost. Register for the August webinar!

Is there a way to change the border colour of selected polygons in Choropleth maps?

I’m currently using plotly.go.Choropleth to create choropleth maps. I’ve currently implemented some basic selection functionality using the selectedpoints property.

However to style how the selected region with the selected property it seems as though you can only change the opacity as described here https://plotly.github.io/plotly.py-docs/generated/plotly.graph_objects.choropleth.html#plotly.graph_objects.choropleth.Selected.

Is there anyway to change the border colour instead of the opacity? It seems a bit strange that you can’t provide a plotly.graph_objects.choropleth.Marker instance to selected and instead have to provide a plotly.graph_objects.choropleth.selected.Marker instance which only has an opacity property.