score:0
You can do that.
At first, Highcharts has callback function.
https://stackoverflow.com/a/16191017
And modified version Tipsy can show tooltip in SVG.
http://bl.ocks.org/ilyabo/1373263
*Use jquery.tipsy.js and tipsy.css on this page.
Then, start highcharts like this.
$('#your-chart').highcharts(your_chart_options,function(chart){
$('#your-chart').find('.highcharts-legend-item').each(function(){
// set title text example
var _text = $(this).text(),
_title = '';
switch(_text){
case "legend 1":
_title = 'legend 1 title';
break;
case "legend 2":
_title = 'legend 2 title';
break;
}
// add <title> tag to legend item
$(this).append($('<title></title>').text(_title));
});
$('#your-chart').find(".highcharts-legend-item").tipsy({
gravity: 's',
fade: true
})
});
score:5
There is another opportunity to get tooltips at hovering over the Highcharts legend. You just need to enable useHTML for the legend and redefine the labelFormatter function; this function should return the label text enclosed into the "span" tag. In this "span" tag one may include a class to apply jQuery-based tooltips (jQuery UI or Bootstrap for example). Also it is possible to transfer some data (for example, the index of a legend item) using the 'data-xxx' attribute:
labelFormatter: function () {
return '<span class="abc" data-index="' + this.index + '">' + this.name + '</span>';
}
Tooltips can be formatted as you wish; hyperlinks are also possible. The fiddle is here.
score:10
Highcharts doesn't have built-in tooltip for item legend, but still you can create your own tooltip for that. It's simple to add custom events to legendItem (mouseover and mouseout for example) and show that tooltip.
See example how to add events to elements in Highcharts: http://jsfiddle.net/rAsRP/129/
events: {
load: function () {
var chart = this,
legend = chart.legend;
for (var i = 0, len = legend.allItems.length; i < len; i++) {
(function(i) {
var item = legend.allItems[i].legendItem;
item.on('mouseover', function (e) {
//show custom tooltip here
console.log("mouseover" + i);
}).on('mouseout', function (e) {
//hide tooltip
console.log("mouseout" + i);
});
})(i);
}
}
}
Source: stackoverflow.com
Related Query
- Add tooltip to legend in highcharts when hovering
- Highcharts - only show tooltip when hovering directly on point
- Highcharts add line-through to legend text when hidden (itemHiddenStyle)
- Display tooltip on hovering over the legend using Highcharts and jQuery-ui tooltip plugin
- Highcharts add symbol on tooltip when over 100 or 1000
- Add text to generated quadrant area by x and y plot lines only when hovering , highcharts
- Add series total to legend in Highcharts
- Highcharts saying undefined is not a function when trying to add a new chart
- Highcharts - How to display legend symbol inside the tooltip
- Highcharts add legend on export
- Add additional data to Pie Tooltip on Highcharts
- How to enable or disable a Highcharts tooltip when a button is clicked?
- Increase different marker sizes when hovering series using highcharts
- Show HighCharts tooltip when chart loads
- Highcharts tooltip date format when using pointFormat
- Highcharts add tooltip that has a small arrow pointing toward the series
- Highcharts JS- add third variable to tooltip for two series
- highcharts legend items align to the left when width is set
- Is it possible to set Highcharts to hide tooltip when the mouse pointer is 30px away
- Highcharts stock chart - Technical Indicators - Stock price is missing in the tooltip when selecting the 'All' range
- How to color series legend in highcharts when colorbypoint is set to true
- How do i add mouse wheel code in Angular2 highcharts in typescript
- Add extra tooltip in Highcharts
- Add data dynamically to the top level in highcharts when drilling up
- highcharts legend position wrong when align ='left' or 'right'?
- Highcharts - Series tooltip doesn't work when plotting lines that zigzag on the x axis
- Highcharts - Incorrect tooltip position when zoomed in
- How to edit tooltip in Highcharts C# code
- Highcharts error when add and shift data to hidden series
- how to use highcharts tooltip formatter in python code
More Query from same tag
- highstock linked to spreadsheet data doesn't work anymore
- Highcharts combining a column and spline chart from an html data table
- parameters in this jsfiddle url
- Link inside of a Highcharts tooltip
- Highcharts polar spider with multiple y-axis scale
- Highcharts change symbol and hover text of individual points Line Chart
- Reading JSON each n second in Javascript
- R shiny Highcharts tooltip: adding average as extra variable
- Highcharts Javascript - Synchronize Chart and Table not working - Cant read property cell of undefined
- Update Highcharts tooltip with onchange
- Javascript heatmap ReferenceError h337.create
- Percentage in hctreemap2 of Highcharter using tooltip?
- Always display data labels above columns in HighCharts
- How to create js.Array inside js.Array in scalaJS for highcharts as specified in the documentation?
- Get palette of some color
- Highcharts show two line series with same values
- Make highcharts bar-chart threshold line visible & labels not to overlap on one another
- Creating Highcharts with Angular using Highcharts >= 5.0.0 and highcharts-ng >= 1.0.0 using a ChartFactory
- HighCharts JavaScript Error
- Highcharts Tooltip pointFormat conditional formatting
- How to tie tooltips to the currently hovered SERIES, not just the point?
- make highchart stacked column chart count zero value
- Always showing tooltip on all columns in Highcharts
- highstock crosshair width according to zoom
- Multiple series in drilldown
- using flask render_template to make a highchart on the front end
- Arrays in highcharts
- How do i color the highcharts legend square symbol when my chart has multiple color entries
- not working to update node of network graph
- Highcharts width flow out of parent div