Change font in name tag when hover over bar

The little tag that occurs when you hover on a bar in a plotly barchart, like here: https://plot.ly/create/?fid=jordanpeterson:380#/ the names read “Trace 0”, “Trace 1” etc…

It is controlled using the name = ______ tag.

I want to change the font color of these or change the font in general. Also, ideally I would like to control how many characters are allowed in there, because mine get cut off.

@Jchaykow

Update each trace with hoverlabel

hoverlabel=dict(bgcolor='set_your_preferred_background_color',
                font=dict(family='Balto',  #or other font family
                          size=11, #or other size
                          color='font_color')
                             )

See also: https://plot.ly/python/reference/#bar-hoverlabel.

1 Like