我试图通过悬停Highchart-Plotband来将光标设置为指针。这似乎是不可能的。可以通过将Plotband-Lable悬停在指针上来转动光标。但是没有用的是让Lable可点击。两种方式对我来说都没问题 - 可点击的标签或可点击的Plotband,以防可以设置光标的样式。有人可以帮忙吗?
plotBands : [{
color : '#ca3123',
from : 0,
to : 5.5,
id : 0,
events : {
mouseover : function() {
// this.css('cursor','pointer'); doesnt´t work
},
mouseout : function() {
},
click : function(e) {
alert(this.id);
}
},
label : {
text : 'Label-Text',
verticalAlign : 'Top',
textAlign : 'right',
rotation : 270,
zIndex : 1,
x : 5,
y : 15,
style : {
allowPointSelect : true,
cursor : 'pointer',
color : '#fff',
fontFamily : 'Arial,Helvetica,sans-serif',
fontWeight : 'bold',
fontSize : '14px'
}
}
}
答案 0 :(得分:1)
尝试:
mouseover: function () {
$("body").css('cursor','pointer');
},
mouseout:function () {
$("body").css('cursor','default');
},
<强>编辑:强>
后加载功能(想想你也可以为你的情节带添加一个id以便更好地访问)