How can I move legend in Highcharts?

PSR picture PSR · Jul 6, 2013 · Viewed 46.8k times · Source

By default legend is displaying at the top-right side of the graph. I want to show it just above the graph. I've used the following code:

legend: {
    layout: 'vertical',
    align: 'left',
    x: 600,
    verticalAlign: 'top',
    y: 40,
    floating: true,
    backgroundColor: '#FFFFFF'
}

But it is not working for me. Am I doing anything wrong?

Answer

Sri-- picture Sri-- · Jul 7, 2013

Like this:

legend: {
            layout: 'vertical',
            align: 'right',
            verticalAlign: 'top',
            floating: true,
            backgroundColor: '#FFFFFF'
        },

http://api.highcharts.com/highcharts#legend.verticalAlign http://api.highcharts.com/highcharts#legend.align