How to configure hover in order to show only the hover_title?


I have implemented a scatterplot in Django using Plotply express and I would like the hover to show only the title, not the coordinates.
Is it possible to do so? I have been playing around with it but with no success so far.

Hey @DeadBrain welcome to the forums.

There is actually an example in the documentation. You just have to define the hover_data dict and set to False whatever you would not like to be displayed.

An example:

import as px

df_2007 ="year==2007")

fig = px.scatter(
        "gdpPercap": False, 
        "lifeExp": False

Thanks a lot.
I had used that option from the documentation but it didn’t work.

I have just realized that the problem wasn’t in Plotply but in some variables I was passing to it from a Django form. Fixed that plotply is now doing the expected.

1 Like