I have the below graph and I want to add space between legend items. I have tried appending spaces to the string passed to the label with no success. Any ideas? TIA
code
$(document).ready(function() {
$.plot($("#NR"), NRLine, {
grid: {
backgroundColor: "#E5E5E5",
hoverable: true
},
xaxis: {
mode: "time",
timeformat: "%m/%d",
minTickSize: [7, "day"],
ticks: datearray
},
legend: {
noColumns: 4,
container: $("#chartLegend")}
}
);
});
code
The legend labels are in containers with the class legendLabel
, so you just have to define CSS for what you want. Put this in your page <head>
tag:
<style>
#chartLegend .legendLabel { padding-right:10px; }
</style>
This is what it would look like: http://jsfiddle.net/ryleyb/SZUuV/1/