Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Highcharts- Tooltip HTML max width

Tags:

highcharts

I am having some trouble getting the Tooltip for a series to not exceed a fixed width. I would like to tooltip for the Notes to not exceed a certain width, but I don't want it to be a fixed width.

Here is a jsfiddle example. http://jsfiddle.net/mnucci/hsBSV/

If you mouse over the second note at the top, it will be way too wide.

I am also having a problem getting the tooltip to honor the useHTML flag or the Formatter function.

I also tried using a style setting like

.highcharts-tooltip span {
    width:140px;
    overflow:auto;
    white-space:normal !important;
}

but this fixed the width to 140 even when there were only 10 chars and I don't want all tooltips to inherit this, only the note series.

like image 483
Dr Dogmar Avatar asked Nov 18 '25 15:11

Dr Dogmar


1 Answers

You need to set useHTML as true

http://jsfiddle.net/hsBSV/1/

like image 88
Sebastian Bochan Avatar answered Nov 21 '25 09:11

Sebastian Bochan



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!