score:1

Accepted answer

An attempt at an odd workaround is setting the tooltip formatter in the initial options, and then using setData with updatePoints set to false (4th parameter). This does seem to provide the desired functionality.

For example (JSFiddle demo):

let chart1 = Highcharts.chart('chart1', {
    series: [{
        data:[], 
        tooltip: {
            formatter: function() {
                return  this.y+'<br/> serie 1';
            }
        }
    },{ 
        data: [],
        tooltip: {
            formatter: function() {
                return  this.y+'<br/> serie2';
            }}
    }], 
    tooltip: {
        shared:true
    }
});


function firstData() {
    let series1 = [8, 4, null, null, null];
    let series2 = [2, 7, null, null, null];
    updateChart(series1, series2);
}

function secondData() {
    let series1 = [1,2,3,4,5];
    let series2 = [9,8,7,6,1];
    updateChart(series1, series2);
}

function updateChart(series1, series2) {
    // false last parameter here fixes it
    chart1.series[0].setData(series1, true, null, false);
    chart1.series[1].setData(series2, true, null, false);
}

Note that it is probably wiser to wait for the official fix in version 7.1.3.

score:2

Nice workaround is to use the formatter feature

tooltip: {
    shared: true,
    formatter: function() {
        return  this.y+'<br/> test';
}

check this demo: https://jsfiddle.net/mushigh/srq61um2/

Here is more information about formatter option


Related Query

More Query from same tag