Placing HighCharts Legend

I am using HighCharts (horizontal) histogram. This chart is very long down my page, and it is, and I was hoping the legend would appear at the top and bottom of the chart. Is it possible? I can not find in the API how to do this.

Thanks for any advice.

+4
source share
3 answers

You can add extra legend with CSS / html styles.

http://jsfiddle.net/Ecrww/109/

$(chart.series).each(function(i, serie){ $('<li style="color: '+serie.color+'">'+serie.name+'</li>').click(function(){ serie.visible ? serie.hide() : serie.show(); }).appendTo('#legend') }) 
+4
source

Try removing the following code

 legend: { layout: 'vertical', align: 'right', verticalAlign: 'top' ...... ...... } 

making legend in default position

+1
source

I also received it and found how to solve it.

try adding this code to the options:

  chart: { marginTop:-10//for top position }, 

hope this helps you

0
source

All Articles