cursor:Highcharts Plotband上的指针或可点击的Plotband Lable

时间:2016-04-19 10:54:31

标签: jquery highcharts

我试图通过悬停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'
                                    }

                                }

                            }

1 个答案:

答案 0 :(得分:1)

尝试:

mouseover: function () {
$("body").css('cursor','pointer');
},
mouseout:function () {
$("body").css('cursor','default');
},

<强>编辑: