Hello,
I'm new using highcharts and I'm struggling with the legend of a Pie chart...
The thing is that the legend is composed by 2 values, the name and the value itself (the numeric percentage) and I want that the numeric percentage appears aligned to the right.
I would like something like the attached image
This is a piece of my code where I'm trying to solve it
var legend = {
enabled: true,
useHTML: true,
borderWidth: 0,
x: 0,
y: 15,
verticalAlign: 'left',
layout: 'vertical',
align: 'left',
itemMarginBottom: 5,
floating: true,
width: 550,
itemStyle: { width: 340, fontSize: "11px", textOverflow: null },
labelFormatter: function () {
return '<div class="container-fluid"> ' +
'<div class="row"> ' +
'<div class="col">' + this.name + '</div>' +
'<div class="col">' + this.percentage.toFixed(2).toString() + "%" + '</div>' +
'</div>' +
'</div>';
}
};
And this is the result of the above code
Is there any way to do what I want?
Thanks in advance