Reputation: 31
I am using the following to successfully place the legend outside my JQPlot line chart:
legend: {
show: true,
location: 'sw',
placement: 'outside'
},
However, this places the legend too close to the chart, in line with my yaxis labeling. I need to move it further to the left. Is there a way to do this?
Upvotes: 3
Views: 13872
Reputation: 1225
You have to use it like this. marginLeft : "300px"
legend: {
show: true,
location: 'sw',
placement: 'outside',
marginLeft: "300px"
}
Upvotes: 1
Reputation: 116
A bit late, sure, but I got it!
You should use
placement: 'outsideGrid'
instead of placement: 'outside'
as 'outsideGrid' will shrink the graph area for the legend not to be mixed with it.
Upvotes: 7