堆叠柱形图的Highcharts工具提示错误

Highcharts tooltip bug with stacked column chart

本文关键字:工具提示 错误 Highcharts 柱形图      更新时间:2023-09-26

显示具有多个系列的堆叠图表似乎存在问题,因为这些系列的点数不相同。

JSFiddle:http://jsfiddle.net/k68pwbm7/1/

$(function () {
        $('#container').highcharts({
            chart: {
                type: 'column'
            },
            tooltip: {
                shared: true
            },
            plotOptions: {
                column: {
                    stacking: 'normal'
                }
            },
            series: [{
                name: 'John',
                data: [500, 30, 400, 70, 2,500, 30, 400, 70, 2]
            }, {
                name: 'Jane',
                data: [200, 2000, 30, 200, 1,200, 2000, 30, 200]
            }, {
                name: 'Joe',
                data: [3, 4, 4, 2, 5]
            }]
        });
    });
<script src="https://code.jquery.com/jquery-1.11.3.min.js"></script>
<script src="https://code.highcharts.com/highcharts.js"></script>
<script src="https://code.highcharts.com/modules/exporting.js"></script>
<div id="container" style="min-width: 310px; height: 400px; margin: 0 auto"></div>

如果您将鼠标悬停在Y<500时,会显示X=4的工具提示,这是"Joe"系列的最后一点。然后,如果将鼠标悬停在y>500的同一列上,则会显示正确的工具提示,其中仅显示该列的两个系列。

这是一个已知的问题吗?有办法解决这个问题吗?

升级到Highcharts 4.1.10为我解决了这个问题。

相关文章: