Highcharts - Show tooltip on points click instead mouseover

前端 未结 5 1759
无人共我
无人共我 2020-12-03 16:20

Is it possible to have tool tip on clicking of points instead of mouse move.

I have tried with showing values in java script alert as below

plotOpti         


        
5条回答
  •  天命终不由人
    2020-12-03 17:02

    Here is the fix for "Cannot read category of undefined". I just take hovered points of chart and pass them to refresh.

    point: {
        events: {
            mouseOver: function(evt) {
                var hoveredPoints = a.hoverPoints;
                a.tooltip.refresh(hoveredPoints);   
            },
            mouseOut: function() {
                a.tooltip.hide();
            }                       
        }
    }
    

    Sample fiddle here: http://jsfiddle.net/2swEQ/153/

提交回复
热议问题