score:6
Highcharts doesn't have a solution for this yet. They have a feature to hide one series so other is visible, this is a good alternative. But if you need to get a shared tool-tip when the 2 series overlap it can be done as shown in the below fiddle.
$(function () {
var series1 = [29.9, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6, 148.5, 216.4, 194.1, 95.6, 54.4];
var series2 = [24.9, 50.5, 106.4, 90.2, 80.0, 150.0, 160.6, 170.5, 160.4, 180.1, 95.6, 54.4];
$('#container').highcharts({
xAxis: {
categories: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']
},
tooltip: {
formatter: function () {
var s1 = this.series.chart.series[0].processedYData[this.point.index];
var s2 = this.series.chart.series[1].processedYData[this.point.index];
if (s1 == s2) {
return '<b>' + this.series.chart.series[0].name + ' :' + s1 + '</b><br/><b>' + this.series.chart.series[1].name + ' :' + s2 + '</b><br/>in month : ' + this.x;
}
return '<b>' + this.series.name + ' :' + this.y + '</b><br/>in month : ' + this.x;
}
},
series: [{
data: series1
}, {
data: series2
}]
});
});
http://jsfiddle.net/Malinga/2jbdqe6x/7/
reference:http://www.malinga.me/highcharts-shared-tooltips-only-in-overlapping-points/#more-109
score:0
As user, I would be confused to see 50 series on a chart - is that readable? Good idea would be to use separate yAxis, or separate panes, but still 50 series..
However, you can do some workaround. Don't use shared tooltip, but in tooltip formatter, get actual x-index (for example var xIndex = series.xData.indexOf(this.x);
) then loop through all series, get values from series data (for example var yValue = series.yData[xIndex];
). Now compare with this.y
and if values are similar add more points to the returned tooltip.
score:1
Unless an elaborate work-around is concocted, highcharts does not support this yet. See this post (which has a comment from a user who claims to be a highcharts engineer):
I guess you will just have to rely on users using the legend for deselecting a series that is blocking another one.
Source: stackoverflow.com
Related Query
- HighCharts: Use shared tooltip only when series overlap
- Highcharts column chart returning incorrect series index on click when using shared tooltip
- Highcharts - only show tooltip when hovering directly on point
- Highcharts shared tooltip for line series and scatter plot not working
- Highcharts shared tooltip between charts with multiple series and shared tooltip
- Highcharts - Series tooltip doesn't work when plotting lines that zigzag on the x axis
- Highstock shared tooltip multiple series - show data for line when not on point
- Highcharts - Aligning dateTime series for shared tooltip
- how to use highcharts tooltip formatter in python code
- Series for tooltip only in highcharts
- Highcharts - Adding tooltip to ONLY certain dynamically added series
- Highcharts shared tooltip positioning if single value only
- How to hide Series Name in HighCharts Tooltip when using pointFormatter
- How to use highcharts to display data of only five point when the page is initialized?
- Highcharts shared tooltip making a percentage difference between series
- Add additional data to a Highcharts series for use in formatters
- Weird character in front of Highcharts tooltip series names
- Display tooltip for invisible series in Highcharts
- How To Use Epoch Time With Highcharts Series Data?
- Filtering legend of a Highcharts by only visible series
- Add tooltip to legend in highcharts when hovering
- Highcharts - How to hide series name and Y value in tooltip
- Highcharts shared tooltip requires different valueSuffix and varying decimals
- Use an array of objects for series data in Highcharts
- Highcharts how to use JavaScript variable as series data source?
- Highcharts use series labels as x-axis categories
- Highcharts: Tooltip on a single series only
- How to enable or disable a Highcharts tooltip when a button is clicked?
- Increase different marker sizes when hovering series using highcharts
- Using PhantomJS to create HighCharts grahps server side for use in PDF creation (PHP) - results in exit code 11 from PHPs exec();
More Query from same tag
- redraw method is not refreshing polar chart
- add hyperlinks to table entries
- Add a dropdown to Highcharts to change chart type with AngularJs
- Highchart background based on percentage
- Highcharts 3D Scatter Plot: Change Description shown when hovering points
- Column Chart Show datalabel for null values - Highcharts
- How to click in a serie area chart below another serie area chart in HighCharts?
- SyntaxError: JSON.parse: expected property name or '}' while using highcharts
- Highcharts Maps Drilldown Map From geojson
- Series Not Working in HighCharts
- Highcharts Point Value Disappearing
- How does 'min' 'max' works in Highcharts? I can't get the scrollbar to work
- highcharts / stock charts custom toolbar button text / title
- Calculating a min y axis value in highcharts
- How to display monthly data in Highcharts graph?
- How to make color fill area between 2 points at HighCharts
- Highcharts: Why text of dataLabels inside column bar are not getting justified and are overflowing
- highcharts transform json data with Date.UTC
- Highchart how can i give frame like this?
- Way to shorten / refactor multiple plugin values
- Erro in ReactJS - Module not found: Can't resolve 'highcharts'
- Highcharts not displaying tooltip title properly
- Drill Down (Highcharts) not working with dynamic data in Angular
- Highcharts hide legend item from Pie chart
- highcharts is not showing
- Highcharts Navigator with a table?
- HighCharts - Pie chart drilldown for multilevel (3 to 4 level)
- Highstock: custom x-Axis with multi time labels?
- Angular-chart.js graph highlight
- how to add dynamic y axis in highchart from specific point of x-axis