无法将鼠标悬停在 Highcharts 平行坐标图表中的每一行上

Not able to hover on each line in Highcharts's Parallel Coordinate chart

我已经使用 Highcharts link 实现了平行坐标图,但无法在每一行上悬停。相反,它悬停在其他点上。

此问题已在 Highcharts GitHub 上报告:https://github.com/highcharts/highcharts/issues/9054

要解决此问题,您可以禁用 Highcharts tooltipenableMouseTracking 选项并将您自己的事件添加到以下行:

    var lines = $('.highcharts-series path');

    lines.on('mouseover', function(e) {
        var series,
            result = '',
            i;

        for (i = 0; i < chart.series.length; i++) {
            if (chart.series[i].graph.d === this.getAttribute("d")) {
                series = chart.series[i];
                i = chart.series.length;
            }
        }

        Highcharts.each(series.points, function(p) {
            result += p.category + ' ' + p.y + '<br>'
        });

        $("#tooltip").html(result);
    });

现场演示:https://jsfiddle.net/BlackLabel/so52apLn/