Highcharts y轴plotlines标签隐藏了工具提示

时间:2014-11-24 14:49:58

标签: highcharts

检查小提琴 - http://jsfiddle.net/4R5HH/209/ - 这仅用于测试。

我在y轴上有一个目标标签,当鼠标悬停在它们上面时会隐藏系列工具提示。

任何解决方案。

$(function () {
$(document).ready(function() {
    var chart = new Highcharts.Chart({
        chart: {
            renderTo: 'container',
            type: 'line'
        },
        title: {
            text: 'Dummy Data by Region'
        },
        xAxis: {
            categories: ['Africa', 'America', 'Asia']
        },
        yAxis: {
            plotLines:[{
                value:75,
                color: '#ff0000',
                width:2,
                zIndex:4,
                label:{text:'goal'},
                dashStyle: 'line',
                label: {
                    useHTML: true,
                    text: '<div class="targetLabel"><span>Target</span><br/><span style="font-weight: bold; padding-top: 5px;">' + '75' + '</span></div>',
                    align: 'center',
                    rotation: 0
                },
            }]
        },
        series: [{
            name: 'Year 1800',
            data: [107, 31, 50]
        },
                {
            name: 'Goal',
                    type: 'scatter',
                    marker: {
                enabled: false
            },
            data: [450]
        }]
    });
});

});

1 个答案:

答案 0 :(得分:0)

从Highcharts论坛得到答案。 因此,添加链接以供参考 - http://forum.highcharts.com/highcharts-usage/highcharts-y-axis-plotlines-label-hides-the-tooltip-t31539/

相关问题