chart中我想在柱状图的上方显示对应的数值
我在label中设置了显示,但是图形上方还是没有数据,
itemStyle: {
normal: {
label: {
show: true, //开启显示
position: 'top', //在上方显示
textStyle: { //数值样式
color: '#fff',
fontSize: 16
后面我尝试加入上方的代码到下示代码后,依旧没有数值,这是咋回事
var M = $.plot($("#chongyapinfen"), [{
data: L
}], {
series: {
bars: {
show: true,
lineWidth: 20,
fill: false,
label: {
normal: {
show: true,
position: 'top',
textStyle: {
color: 'red'
}
}
},
},
points: {
show: true,
lineWidth: 3,
fill: true,
fillColor: "#fff"
},
shadowSize: 0
},
grid: {
hoverable: true,
clickable: true,
tickColor: "#aaa",
borderColor: false
},
colors: ["blue"],
xaxis: {
mode: "time",
tickFormatter: function (Q, P) {
return i[new Date(Q).getDay()];
},
color: "#222",
autoscaleMargin: 1e-18
},
yaxis: {
ticks: 4,
tickDecimals: 0,
color: "#222"
}
});