Rohitha
Rohitha

Reputation: 145

In Highstock charts, Drill down not correctly showing when scrolled

Im using highstock chart API to create bar chart which has a horizontal bar chart. The problem I'm having is that, when I scroll and click on a bar, drilldown doesn't come. Here is a example. In there when I scrolled to the end and click on "Opera" this issue arise.

Here is the link : Fiddle

Please help me.

Thanks In Advance.

Upvotes: 0

Views: 990

Answers (1)

Paweł Fus
Paweł Fus

Reputation: 45079

It's problem with extremes on xAxis - after setting drilldown, you have less categories than before drilldown. Solution is to call setExtremes() after setting a chart, see: http://jsfiddle.net/zrj2E/2/

    function setChart(name, categories, data, color) {
        chart.xAxis[0].setCategories(categories, false);
        chart.xAxis[0].setExtremes(0, 1, false); //reset extremes
        chart.series[0].remove(false);
        chart.addSeries({
            name: name,
            data: data,
            color: color || 'white'
        }, false);
        chart.redraw();
    }

Upvotes: 1

Related Questions