I want to reverse the legend order dynamically based on the legend's 'align' option but I'm a beginner in javascript, I have no idea how it would look like.
If the legend's align is set to 'left' or 'right' then I want to set the legend's 'reverse' option to 'true' else 'false'
Here's my jsfillde: https://jsfiddle.net/gh/get/library/pure/highcharts/highcharts/tree/master/samples/highcharts/legend/reversed/
In python I would do something like this:
if legend align == “left” or “right”:
legend reverse = true
else:
legend reverse = false