Is it Possible to Control the Position of the Hoverlabel Box?

I thought that all the hover labels would automagically orient relative to the size of my Choropleth map but my east coast States are getting cut off. Any suggestions (other than resizing my map size)?


Hi @russmcb
does it help if you use hover trace align attribute?


Thanks @adamschroeder. That’s what I was hoping too, but, alas, it just aligns the text inside hover label box, and I’m looking to align the box itself.

I know you didn’t want to change the graph size, but maybe manually setting margin of the right side would fix the hover from cutting off.
Here’s a relevant conversation on margin

And here’s another conversation that might help.

Thanks @adamschroeder, automargin sort of works when I delete my margin= line (still slight cutoffs but much better). The bummer is that I’ve now got a bunch of blank space on the right side of the map and a much smaller map simply because now there’s enough space to orient all the Hovertext boxes to the right. I know they can “auto-adjust” to left or right since some of the ones further right (like Maine) will sometimes flip to a left side orientation.

If there was a way to programmatically control their orientation I wouldn’t mind creating a dictionary for all 50 states to control each one’s hover label box position… but I can’t seem to find any property anywhere to control the orientation.

Having the same issue on my bar chart hoverlabels:


1 Like

Hi! Did you get a way to control the hoverlabel position? Thanks. :grinning:

No. I never did, sorry.


I guess this is still not a possibility. I have the same problem, but in my case it’s a problem with the hoverlabel of an annotation that is cut at the bottom:

Annotation being cut

It’d be good to at least select yanchor/xanchor for the hoverlabel.

1 Like

iam facing the same issue…is it possible to show the hoverinfo according to our choice is there any customized way to do ?

hi @ranjith061
do you mean show what info is shown in the hoverbox or control the position of the hoverbox?