flot - jQuery 图表插件(jquery.flot)lable使用方法
<scripttype="text/javascript">$(function(){varoptions={lines:{show:true,/*是否显示*/lineW...
<script type="text/javascript">
$(function() {
var options = {
lines: {
show: true, /*是否显示*/
lineWidth:1 /*线条大小*/
},
points: {
show: true,
radius: 4, /*点的大小*/
},
label: { show: true,},
grid: { hoverable: true, clickable: true, show:true, aboveData: true, color:"#006fb3" },
colors: ["#d92093"],
yaxis: {min: 0, max: 100 },
xaxis: {
show: true,
/*mode: "time",
timezone: "browser",
minTickSize: [1, "hour"],
timeformat: "%H:%M"*/
}
};
var data = [];
$.plot("#placeholder", [[['50', 50],[20, 50],[30, 50],[40, 50],[50, 50],[60, 50],[70, 50]]], options);
});
</script>
如上js代码所示。label应该怎样使用才能显示。求详细代码,不要概念语言。。。。 展开
$(function() {
var options = {
lines: {
show: true, /*是否显示*/
lineWidth:1 /*线条大小*/
},
points: {
show: true,
radius: 4, /*点的大小*/
},
label: { show: true,},
grid: { hoverable: true, clickable: true, show:true, aboveData: true, color:"#006fb3" },
colors: ["#d92093"],
yaxis: {min: 0, max: 100 },
xaxis: {
show: true,
/*mode: "time",
timezone: "browser",
minTickSize: [1, "hour"],
timeformat: "%H:%M"*/
}
};
var data = [];
$.plot("#placeholder", [[['50', 50],[20, 50],[30, 50],[40, 50],[50, 50],[60, 50],[70, 50]]], options);
});
</script>
如上js代码所示。label应该怎样使用才能显示。求详细代码,不要概念语言。。。。 展开
1个回答
展开全部
$(function () {
var options = {
lines: {
show: true,
/*是否显示*/
lineWidth: 1 /*线条大小*/
},
points: {
show: true,
radius: 4,
/*点的大小*/
},
label: {
show: true,
},
grid: {
hoverable: true,
clickable: true,
show: true,
aboveData: true,
color: "#006fb3"
},
colors: ["#d92093"],
yaxis: {
min: 0,
max: 100
},
xaxis: {
show: true,
/*mode: "time",
timezone: "browser",
minTickSize: [1, "hour"],
timeformat: "%H:%M"*/
}
};
var data = [];
$.plot("#placeholder", [
// 你是说这个吗?
{label: 'data1', data: [
['50', 50],
[20, 50],
[30, 50],
[40, 50],
[50, 50],
[60, 50],
[70, 50]
]}
], options);
});
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询