Display legend items in two columns highcharts

By : hcharge
Source: Stackoverflow.com
Question!

In highcharts is it possible to display the legend in two columns, stacked vertically?

I'm trying to work out the best way of displaying the legend items, at the moment we have the legend items all stacked on top of each other.

There will be a maximum of 4 series on the chart.

I'm not really sure how to approach this, I see the option of useHTML but then I can't seem to find any examples of what to do with the HTML.

http://jsbin.com/oyicuc/9/edit

Any advice would be very helpful, thanks.

By : hcharge


Answers

Maybe you could use the "labelFormater" of the legend.

http://api.highcharts.com/highcharts#legend.labelFormatter

Then you could create a table and arrange the legend text as you wnat.

Have a look at the example on the documentation page.

By : Roland


This video can help you solving your question :)
By: admin