score:17
Accepted answer
When you want to display the individual data points for stacked graphs with a shared tooltip, you have to loop through the individual points and build up the tooltip markup.
tooltip: {
shared: true,
formatter: function () {
var points = this.points;
var pointsLength = points.length;
var tooltipMarkup = pointsLength ? '<span style="font-size: 10px">' + points[0].key + '</span><br/>' : '';
var index;
var y_value_kwh;
for(index = 0; index < pointsLength; index += 1) {
y_value_kwh = (points[index].y/1000).toFixed(2);
tooltipMarkup += '<span style="color:' + points[index].series.color + '">\u25CF</span> ' + points[index].series.name + ': <b>' + y_value_kwh + ' kWh</b><br/>';
}
return tooltipMarkup;
}
}
Here's a working example: http://jsbin.com/qatufetiva/1/edit?js,output
Source: stackoverflow.com
Related Query
- how to use highcharts tooltip formatter in python code
- Highcharts tooltip formatter
- Change Highcharts tooltip formatter from chart Object , after chart is rendered
- Highcharts: Shared tooltip formatter this.points[i]
- Highcharts shared tooltip requires different valueSuffix and varying decimals
- Highcharts shared tooltip for line series and scatter plot not working
- Highcharts : Shared Tooltip for non-matching x values
- Highcharts shared tooltip between charts with multiple series and shared tooltip
- How to get the highlighted point from shared tooltip formatter, Highcharts
- Highcharts changing tooltip datetime with formatter
- Highcharts Tooltip formatting for shared Tooltips
- How to edit tooltip in Highcharts C# code
- Highcharts - Aligning dateTime series for shared tooltip
- Why does this Highcharts graph only show tooltip for the first and last nodes?
- highcharts tooltip formatter only shows first 8 characters in this.point.name
- Highcharts shared tooltip positioning if single value only
- How to call Highcharts tooltip formatter function from outside the config object?
- How can i make my gnatt highcharts tooltip in this shape
- Highcharts tooltip formatter using jquery replace
- Format Highcharts chart tooltip pointFormat in formatter
- Set a different tooltip formatter for each sunburst levels - Highcharts
- Highcharts column chart returning incorrect series index on click when using shared tooltip
- Highcharts - Format overlapping scatter points in a shared tooltip
- Highcharts tooltip formatter function does not display values in table correct
- Highcharts skipping shared tooltip points for large data sets
- tooltip formatter Highcharts not work with Firefox ? - Bug?
- Shared tooltip positioner point.plotY is always 0 in Highcharts Stacked columns
- Highstock Shared Tooltip This Index
- Highlight tooltip shared item depending on hovered serie in Highcharts
- Highcharts shared tooltip making a percentage difference between series
More Query from same tag
- How do i enable scrollbar in highcharts in react
- How to push Json data to line chart function
- Individually colored data ranges in highcharts
- TypeScript insert record to multi dimension array ( Eg - Array< number | [number, number] | [string, number] )>
- AngularJS Directive Applying Wrong Data
- How to get the array format to function on x axis labels?
- How to pass a JSON through a variable to highchart heatmap data tag?
- highstock with json data
- How do you create a survey that will immediately display the results as a pie chart on a website?
- HighCharts : display label only on line combine chart
- set width of chart, highcharts
- Highcharts columnchart: How to separate overlapping columns
- Highcharts: Polar chart does not display series correctly in dinamically loaded data
- Highcharts: Dynamic drilldown (stacked chart) in Combo Dual Axes
- Highcharts & Mysql
- Highcharts in AngularJS with inline variables (using Pablojim's Highchart-ng)
- Highcharts : how to set yAxis max value inside angularjs controller
- Highcharts stacked area - update tooltip only after exact area mouse over
- How to create legend for Plotlines with Highstock of Highcharts?
- Highcharts with PHP var
- Highcharts :Uncaught TypeError: $(...).highcharts is not a function
- Highcharts, change line type if more than one series on the chart
- Navigator in Highcharts
- pointInterval not working with date range within line chart
- How to customize annotation's layout in HighCharts
- Highcharter: Add a string variable into a tooltip
- Highcharts Pie Slice Offset on Legend Click
- Passivate Highcharts Export Phantom JS Web Server?
- ReferenceError: Can't find variable: modules
- Highcharts: multiple heatmaps with shared color bar