问题
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