如何在highcharts中的load事件中添加额外标签

如何在highcharts中的load事件中添加额外标签,highcharts,Highcharts,代码如下 chart: { type: "funnel", marginBottom: 25, backgroundColor: "transparent", events: { load: function() { var chart = this; Highcharts.each(chart.series[0].data, function(p, i) { char

代码如下

chart: {
    type: "funnel",
    marginBottom: 25,
    backgroundColor: "transparent",
    events: {
        load: function() {
            var chart = this;
            Highcharts.each(chart.series[0].data, function(p, i) {
                chart.options.labels.items.push({
                    html: "less confident" + i,
                    style: { left: 550, top: 50 }
                });
                p.dataLabel.attr({
                    x: (chart.plotWidth - chart.plotLeft) / 2,
                    "text-anchor": "middle"
                });
            });
        }
    }
},

我看到您试图为每个点添加标签。Highcharts为这个名为的数据标签提供了内置功能:

另一种方法是使用
svgrender.label