score:7

Accepted answer

set maxHeight property. this will fix the maximum height of legend and gives navigation to legend.

maxHeight: 100,

here is the fiddle http://jsfiddle.net/9vZ8F/2/

instead if you remove

layout:'vertical'

legend will not occupy much space here is a fiddle for it http://jsfiddle.net/9vZ8F/1/

Hope this is useful to you.

score:1

How about doing a calculation on the number of series you have and adjusting the chart height based on that?

var series = [{
        name: 'series 1',
        data: usdeur
    }, {
        name: 'series 2',
        data: usdeur
    }, {
        name: 'series 3',
        data: usdeur
    }, {
        name: 'series 4',
        data: usdeur
    }, {
        name: 'series 5',
        data: usdeur
    }    
    ],
        height = 400 + (series.length * 15);

    $('#container').highcharts('StockChart', {

        chart: {
            borderWidth: 2,
            height: height
        },

        legend: {
            enabled: true,
            layout: 'vertical'
        },
        navigator: {
            //top: 200
        },

        rangeSelector: {
            selected: 1
        },

        series: series
    });

http://jsfiddle.net/SSn4e/


Related Query

More Query from same tag