Plotly Express -- Hide row info in tooltips

Hi! I am using plotly express and everything is great except that the tooltips include all the information about that row, when I only want the text.

Here is the code where I say hover_data = None (all I want is the text that I specified in df[β€œtext”])

fig = px.scatter_geo(df, lat="lat", lon="lon", color="count", hover_name="text", hover_data=None,
                     size="count", animation_frame="dec", projection="natural earth", size_max = 50)

fig.show()

But the hover text actually includes much more:

25%20AM

Is there a way to just include the text in bold?

You can edit the hovertemplate attribute to show just the bold text, yes. More info on this problem here: https://github.com/plotly/plotly_express/issues/120

1 Like