Change mouseover point in highcharts

痞子三分冷 提交于 2019-12-11 19:43:05

问题


Can somebody help me with my problem.

I have this piecharts,

and i need to change point( segment ), when i mouseover on it

What the best way you can advise me?

Maybe something like this, change point, but i don't know how to do this

plotOptions: {
        series:{
            point:{
                events: {
                    mouseOver: function( e ){
                        console.log( this )
                    }
                }
            }
        }

    },

回答1:


Try to update only graphic using element.attr(), see: http://jsfiddle.net/rh5fz92q/

    plotOptions: {
        pie: {
            point: {
                events: {
                    mouseOver: function(e){
                        this.defaultR = this.graphic.r;
                        this.graphic.attr({
                            r: 200
                        });
                    },
                    mouseOut: function(e){
                        this.graphic.attr({
                            r: this.defaultR
                        });
                    }
                }
            }
        }
    }, 


来源:https://stackoverflow.com/questions/18874440/change-mouseover-point-in-highcharts

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!