score:29

Accepted answer

you can set usehtml and define your own tooltip via css:

http://jsfiddle.net/4scfh/4/

tooltip: {
    borderwidth: 0,
    backgroundcolor: "rgba(255,255,255,0)",
    borderradius: 0,
    shadow: false,
    usehtml: true,
    percentagedecimals: 2,
    formatter: function () {
        return '<div class="tooltip">' + this.point.name + '<br />' + '<b>' + highcharts.numberformat(this.y).replace(",", " ") + ' kč [' + highcharts.numberformat(this.percentage, 2) + '%]</b></div>';
    }
},

css

.label {
    z-index: 1 !important;
}

.highcharts-tooltip span {
    background-color: white;
    border:1 px solid green;
    opacity: 1;
    z-index: 9999 !important;
}

.tooltip {
    padding: 5px;
}

explanation: when you set usehtml to true, it displays the tooltip text as html on the html layer, but still draws an svg shape in the highcharts display svg for the box and arrow. you would end up with data labels looking like they were drawn on top of the tooltip, but the tooltip text itself on top of the data labels. the config options above effectively hide the svg tooltip shape and build and style the tooltip purely with html/css. the only down-side is that you lose the little "arrow" pointer.

score:0

i still had issues with some of the solutions around, setting z-index: 999 on .tooltip wasn't having any effect because of the various container divs. but, i've found setting this works nicely (when legend and tooltip are html). no need for setting other z-indexes either:

.highcharts-legend { z-index: -1; }

score:0

for highchart tooltips with html format

highchart config

tooltip: {
    borderwidth: 0,
    backgroundcolor: "rgba(255,255,255,0)",
    shadow: false,
    usehtml: true
    ........
},

css:

.highcharts-tooltip>span {
    background-color: #fff;
    border: 1px solid #172f8f;
    border-radius: 5px;
    opacity: 1;
    z-index: 9999!important;
    padding: .8em;
    left: 0!important;
    top: 0!important;
}

screenshot

score:1

and if you dont want to daddle in the problems there are in usehtml, here is the way to do it in the svg:

 highcharts.wrap(highcharts.chart.prototype, 'redraw', function(proceed, animation) {
  proceed.call(this, animation);
  try {
   if (this.legend.options.floating) {
    var z = this.legend.group.element, zzz = z.parentnode;
    zzz.removechild(z);
    zzz.appendchild(z); //zindex in svg is determined by element order
   }
  } catch(e) {

  } 
 });

score:2

i had same issue. my solution. tooltip - usehtml = true. tooltip - formatter = html code there with one div container. here margin in negative value is important in css.

tooltip: {
    backgroundcolor: "rgba(255,255,255,1)",
    usehtml: true,
    formatter: function() {
        var html = [];
        html.push('<b>correlation to ' + this.point.p + '</b><br>');
        if (null != this.point.associatedpoints 
                && typeof this.point.associatedpoints != 'undefined' 
                && this.point.associatedpoints.length > 0) {
            $.each(this.point.associatedpoints, function(i, associatedpoint) {
                html.push('responses: ' + associatedpoint.nformatted);
            });
        }
        return '<div class="tooltip-body">' + html.join('') + '</div>';
    }

css:

.highcharts-tooltip span {
    z-index: 9999 !important;
    top:2px !important;
    left:2px !important;
}
.highcharts-tooltip span .tooltip-body{
    background-color:white;
    padding:6px; 
    z-index:9999 !important;
    margin-bottom:-14px;
    margin-right:-14px;
}

score:4

i had the same problem. the labels were visible over the tooltip. removing usehtml=true for the labels worked for me.

score:6

if you set tooltip.backgroundcolor to "rgba(255,255,255,1)" you'll get tooltip with "no transparency"

you will have to remove usehtml: true in the pie settings.

fork of your jsfiddle: http://jsfiddle.net/kairs/z3uz8/1/

tooltip: {
  backgroundcolor: "rgba(255,255,255,1)"
}

documentation on highchart


Related Query

More Query from same tag