I want to control the legend order so data2 will be displayed first from the left and then data1, without changing the order of my series objects. is there a way to do it?
My legend section currently looks like that:
legend: {
enabled: true,
align: 'left'
},
You can order your series in the legend manually by using legendIndex
. For example (API):
series: [{
type: 'area',
name: 'A',
data: [1, 2, 3, 2, 4],
marker: false,
legendIndex: 2
}, {
type: 'area',
data: [2, 3, 2, 5, 4],
name: 'B',
marker: false,
legendIndex: 1
}]