score:1

Accepted answer

this is how you can make x-axis labels unlickable on drilldown. take a look at this demo: jsfiddle

code:

$(function () {    
    (function (h) {

        //for x-axis labels
        h.wrap(h.point.prototype, 'init', function (proceed, series, options, x) {
            var point = proceed.call(this, series, options, x),
                chart = series.chart,
                tick = series.xaxis && series.xaxis.ticks[x],
                ticklabel = tick && tick.label;
            //console.log("series");
            //console.log(series);

            if (point.drilldown) {

                if (ticklabel) {
                    if (!ticklabel._basicstyle) {
                        ticklabel._basicstyle = ticklabel.element.getattribute('style');
                    }
                    ticklabel.addclass('highcharts-drilldown-axis-label')          .css({
                        'text-decoration': 'none',
                        'font-weight': 'normal',
                        'cursor': 'auto'
                        }).on('click', function () {
                            if (point.dodrilldown) {
                                return false;
                            }
                        });//remove this "on" block to make axis labels clickable
                }
            } 
            else if (ticklabel && ticklabel._basicstyle) 
            {
            }

            return point;
        });
    })(highcharts);

    // create the chart
    $('#container').highcharts({
    .....
    .......

Related Query

More Query from same tag