plot.ly Hover Box Size attribute

Viewed 3538

I'm using the plot.ly Python api and cannot figure out how to adjust the size of the plotly hover box size.

For example, in the visualization below the label for CollegeClass.... is truncated. I would like to adjust the length of the string in the hover box.

enter image description here

2 Answers

I might be a little late but I found a batter solution Adding hoverlabel: {namelength :-1} into my trace object did the trick.

From Here

You probably found an answer since but :

By setting 'text' and passing it to your hoverinfo. In your example if you set text='CollegeClass' and set your hoverinfo = 'text' you will get the result you expect. It seems that the name of the trace get truncated while the text or label that you pass isn't.

data = [
go.Scatter(
    x=[0, 1, 2],
    y=[1, 3, 2],
    mode='markers',
    text=['Text A', 'Text B', 'Text C']
    hoverinfo = 'text'
)]

Copied from https://plot.ly/python/text-and-annotations/#adding-hover-text-to-data-in-line-and-scatter-plots Not that in my case I had to set hoverinfo = 'text' while in the example it seems to work without.

Related