Hello,
I’m attempting to get a scattermapbox rendered with on hover actions. I can render the scattermapbox correctly, but I can not seem to get text to show on hover. Here is the snippet of code that I am using to setup the map figure and layout.
app.layout = html.Div( [ dcc.Graph(
id = 'TxWCD-choropleth',
figure =
{
'data' :
[
go.Scattermapbox(
text = gdf[ 'DISTNAME' ],
hoverinfo = 'text'
)
],
'layout' : go.Layout(
height = 900,
autosize = True,
mapbox = dict(
layers = county_layers,
accesstoken = mapbox_access_token,
center = dict(
lat = 31.3,
lon = -99.2
),
zoom = 5.2,
style='light'
),
hovermode = 'closest'
)
}
)])
The layers themselves show up fine and render, but I’ve messed around with render mode
and hoverinfo
and changing either of these doesn’t seem to render anything on hover.
Any help would be greatly appreciated!
Thanks.