Search code examples
javascripttooltiphighcharts

Highstock with multiple series, tooltip follows points even i disabled


I have a chart with multiple series like this one: http://jsfiddle.net/nfs2uus3/

$(function() {
    var chart = new Highcharts.StockChart({

        chart: {
            renderTo: 'container'
        },

        navigator: {
            top:40,

        },
        yAxis:{
            top:100
        },
        xAxis:{
            top:100
        },
        rangeSelector: {
            selected: 1
        },

         series: [{
            data: [29.9, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6, 148.5, 216.4, 194.1, 95.6, 54.4]        
        }, {
            data: [194.1, 95.6, 54.4, 29.9, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6, 148.5, 216.4]        
        }],
    });
});

When I add more than one series the tooltip no longer locks to the points in the chart.

Here is a sample with one series: http://jsfiddle.net/rq7c12a6/

Notice the difference? Bug?

It should work like in this sample: http://jsfiddle.net/RjMJr/


Solution

  • In Highstock tooltip.shared is true by default. That is the reason why you have all of your series in your tooltip. You can simply disable it by setting tooltip.shared to false:

    tooltip: {
      shared: false
    },
    

    Here you can find an example how it can work: http://jsfiddle.net/nfs2uus3/1/