Highcharts Bug: legend.reversed for pie chart
Setting the legend.reversed to true does not change the legend item direction
HTML
<div id="container" style="height: 400px"></div>
<p>Expected the legend to start with Firefox and end with Others</p>
<p>The issue appear to be in the renderLegend function. Javascript reverse() is used, which is reversing the series array, and not the series.data array</p>
<script type="text/javascript" src="https://github.com/highslide-software/highcharts.com/raw/master/js/highcharts.src.js"></script>
JavaScript
var chart = new Highcharts.Chart({
legend: {
layout: 'vertical',
// reversed set to true, but legend items are not reversed
reversed: true
},
chart: {
renderTo: 'container',
plotBackgroundColor: null,
plotBorderWidth: null,
plotShadow: false
},
title: {
text: 'Browser market shares at a specific website, 2010'
},
tooltip: {
formatter: function() {
return '<b>'+ this.point.name +'</b>: '+ this.y +' %';
}
},
plotOptions: {
pie: {
allowPointSelect: true,
cursor: 'pointer',
dataLabels: {
enabled: false
},
showInLegend: true
}
},
series: [{
type: 'pie',
name: 'Browser share',
data: [
['Others', 0.7],
['Opera', 6.2],
['Safari', 8.5],
{
name: 'Chrome',
y: 12.8,
sliced: true,
selected: true
},
['IE', 26.8],
['Firefox', 45.0]
]
}]
});