有没有办法单独在 highcharts 图例文本中添加边框?

Is there any way to add border in highcharts legend text individually?

我需要添加带有图例文本(legend-item)的边框,例如

我正在尝试使用 borderWidth,但它为整个图例区域提供了边框,是否有任何可行的方法。

可以使用 legend.itemStyle 属性 和 legend.useHTML = true 来完成。

代码:

  legend: {
    useHTML: true,
    itemStyle: {
      'border-style': 'solid',
      display: 'block',
      padding: '2px',
        'border-width': '1px',
      borderColor: 'red'
    }
  }

演示:

API: