Highcharts 自定义highchart中的图例

Highcharts 自定义highchart中的图例,highcharts,Highcharts,我尝试在图例中编辑,以获得与下图相同的结果,但未成功 这是我的。 我还尝试用labelFormat编辑代码,但无法显示图表 labelFormat: '<div><div style="float: left; width: 80%;">{name}</div><div style="margin-left: 80%">({percentage:.2f}%)</div></div>' 任何人都可以给我解决方案,使结果

我尝试在图例中编辑,以获得与下图相同的结果,但未成功

这是我的。 我还尝试用labelFormat编辑代码,但无法显示图表

 labelFormat: '<div><div style="float: left; width: 80%;">{name}</div><div style="margin-left: 80%">({percentage:.2f}%)</div></div>' 
任何人都可以给我解决方案,使结果与图片相同。
谢谢

代码中的
图例将如下所示

图例:{
是的,
//labelFormat:“{name}({percentage:.1f}%”,
labelFormatter:function(){
返回“”+this.name+“”+this.percentage.toFixed(0)+'%';
},
布局:“垂直”,
对齐:“右”,
垂直排列:'中间',
符号半径:0,//用于更改为正方形
填充:3,
项目编号:5,
项目MarginBottom:5,
},
正如
useHTML:true
在代码中一样,您可以使用CSS和HTML尝试尽可能多的可能性

labelFormat: '{name} ({percentage:.1f}%)'
legend: {
    useHTML: true,
    //labelFormat: '{name} ({percentage:.1f}%)',
    labelFormatter: function() {
      return '<div style="width:30vh;"><span style="float:left;color:#ccc">' + this.name + '</span><span style="float:right">' + this.percentage.toFixed(0) + '%</span></div>';
    },
    layout: 'vertical',
    align: 'right',
    verticalAlign: 'middle',
    symbolRadius: 0, //for changing to square 
    padding: 3,
    itemMarginTop: 5,
    itemMarginBottom: 5,
  },