我有一个瀑布图,我需要删除图表上出现的系列 1。 我已经尝试过: 传奇: { 启用:假 }, 和 showInLegend:假,
但还是出现了。
chart: {
type: 'waterfall'
},
title: {
text: ''
},
exporting: {
enabled: false
},
credits: {
enabled: false
},
//colors: ['#DADBDF', '#ED4D5F','#ED4D5F','#ED4D5F','#ED4D5F','#ED4D5F','#D7EAFD','#D7EAFD','#D7EAFD' ],
xAxis: {
lineColor: '#FFFFFF',
lineWidth: 0,
gridLineColor: '#DADBDF',
categories: [],
},
yAxis: {
lineColor: '#FFFFFF',
lineWidth: 0,
gridLineColor: '#DADBDF',
plotBands: [{
color: '#000000', // Color value
from: 0, // Start of the plot band
to: 0 // End of the plot band
}],
title: {
text: ''
},
tickPositioner: function () { //set tick interval dynamically (scale)
var positions = [],
tick = Math.floor(this.dataMin),
increment = Math.ceil((this.dataMax - this.dataMin) / 6);
if (this.dataMax !== null && this.dataMin !== null) {
for (tick; tick - increment <= this.dataMax; tick += increment) {
positions.push(tick);
}
}
return positions;
}
},
legend: {
enabled: false
},
plotOptions: {
column: {
dataLabels: {
enabled: true,
color: '#000000'
},
colorByPoint: true,
pointWidth: 150
},
series: {
borderWidth: 0,
dataLabels: {
enabled: true,
format: '{point.y}'
},
turboThreshold: 0
}
},
series: [{
data: [],
showInLegend: false,
zones: [{
value: 0,
color: '#ED4D5F'
}, {
color: '#A9A9A9'
}, {
color: '#C48634'
}, {
color: '#696969'
},{
color: '#D7EAFD'
}],
}],
看来您启用了系列标签模块。通过将 series.label.enabled 设置为 false 在图表配置中禁用它,或从 HTML 文件中删除此模块导入。
plotOptions: {
series: {
label: {
enabled: false
}
}
}
API 参考: https://api.highcharts.com/highcharts/plotOptions.series.label