score:29
You can set useHTML
and define your own tooltip via css:
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;
}
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)"
}
Source: stackoverflow.com
Related Query
- HighCharts: Labels visible over tooltip
- HighCharts: Labels visible over tooltip frame
- Make highcharts bar-chart threshold line visible & labels not to overlap on one another
- How to edit tooltip in Highcharts C# code
- Highcharts tooltip displayed over div
- how to use highcharts tooltip formatter in python code
- Highcharts gauge keep tooltip visible and centered
- Highcharts polar : series appear over others when toggle to visible
- Highcharts - StackLabels displayed over tooltip when useHTML=true
- Big Tooltip over points - Highcharts
- Highcharts legend position same as tooltip position or make tooltip still visible after hiden series
- how to add tooltip on hover over the stacked Labels in highcarts
- How to create tooltip in highcharts map on click over a country...?
- Highcharts stacked area - update tooltip only after exact area mouse over
- Highcharts in JQuery Tabs - Resizing hidden tab code stops resizing visible tab
- How to display tooltip data below x-axis category labels using Highcharts
- Display tooltip on hovering over the legend using Highcharts and jQuery-ui tooltip plugin
- How to make a rendered label in Highcharts always visible and still relative to the point clicked or hovered over
- X axis labels overlap tooltip in column chart in highcharts
- HighCharts : Shared Tooltip with shared Data LABELS (in Series)
- How to get points information when hovering over axis labels in highcharts using custom-events library?
- Highcharts add symbol on tooltip when over 100 or 1000
- How to add Tooltip Functionality to X-axis labels in highcharts
- highcharts stockchart tooltip on flags switches to data series tooltip while mouse is still over flag
- In Highcharts Make tooltip of a specific point always visible and dynamically i will change its point
- highcharts tooltip stop update when mouse over
- Disable highcharts tooltip on certain lines, leave it enabled on others?
- Customize tooltip and format the number to 2 decimal places of highcharts
- Highcharts tooltip overflow is hidden
- customize highcharts tooltip to show datetime
More Query from same tag
- how can I get the index of point hovering in Highcharts?
- Position next and previous buttons on far right and left side of the Highchart
- Custom field name in ECharts
- Highchart Pie Chart not working properly with series
- highcharts-export-clientside Unsupported export format
- How to set vertical bar chart in Hightcharts | I passed as component. How to send as props
- Highcharts - Dynamic + Multiple charts not rendering
- Dynamic High Chart no Displaying
- HighCharts unable to use data attribute
- How to set scrollbar for charts in highcharts.js ?
- Add tooltip in highchart custom button
- maxPadding on highstocks
- Dynamic Input to Highcharts via HTML input field?
- highcharts - render text with decimal 'x' and 'y'
- HighCharts color on each - columnrange bar
- Tags disappeared from tagcloud in highcharts while using deriveFontSize method
- Highcharts: show multiple days data on same chart making them overlpa each other to comparison
- Hight chart value are hidden , while clicking all legend
- Highcharts 'marker' line padding
- Highcharts multiple values for 1 date?
- SSRS 2008 Chart series formatting based on expression?
- Extend Highcharts options as plugin
- Catch panning event in Highcharts
- How to use highcharts bubble to display more than 3 columns data?
- Include additional highcharts source data in angular2 app
- Highcharts single row stacked horizontal bar: labels overlap --- bar segments too small to read "dataLabels" --- (change "distance" of "dataLabels"?)
- Issues in Highchart-treemap with drilldown data label color change
- How to remove axis labels without data points in Highcharts?
- Additional serires label in highcharts columnrange
- Building HighCharts-Export Server 2.1 Fails