Highcharts - when disabled in legend, line label still appears

大兔子大兔子 提交于 2019-12-24 08:37:55

问题


I am using highcharts and made this simple line chart. When I turn off the view for a person on the legend the name still appears as a line label on the line chart. Any way I can turn that off? I attached a picture of the problem. I want only Wilson to show.

This is my code:

 Highcharts.chart('chart1', {
chart: {
    type: 'line'
},
title: {
    text: 'Hours vs Month (' + months[0] + "-" + months[5] + ")"
},

xAxis: {
    categories: months
},
yAxis: {
    title: {
        text: 'Hours'
    }
},
tooltip: {
    valueSuffix: ' hours'
},
credits: {
    enabled: false
},
plotOptions: {
    series: {
        marker: {
            enabled: true
        }
    },
    line: {
        dataLabels: {
            enabled: false
        },
        enableMouseTracking: true
    }
},
series :somedata
});

来源:https://stackoverflow.com/questions/50863509/highcharts-when-disabled-in-legend-line-label-still-appears

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!