score:1

Accepted answer

You need to enable useHTML.

    stackLabels: {
        style: {
            backgroundColor: 'rgba(252, 255, 197, 0.7)',    
            color: 'black',
            borderWidth: 1
        },
        enabled: true,
        useHTML: true
    }

score:1

With formatter and enable useHTML

`

     yAxis:{  stackLabels: {
            style: {
                color: 'black'
            },
            enabled: true,
            useHTML: true,
            formatter: function() {
                 return '<span style="background-color:red">' + this.total + '</span>';
            }
        }
    },`

Related Articles