我有下面的图表,我想在图例项之间添加空格.我尝试将空格附加到传递给标签的字符串,但没有成功.有任何想法吗?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")}
}
);
});
Run Code Online (Sandbox Code Playgroud)
code
图例标签位于类的容器中legendLabel,因此您只需要为所需内容定义CSS.把它放在你的页面<head>标签中:
<style>
#chartLegend .legendLabel { padding-right:10px; }?
</style>
Run Code Online (Sandbox Code Playgroud)
这就是它的样子:http: //jsfiddle.net/ryleyb/SZUuV/1/