Highcharts Drilldown失败

时间:2017-07-25 20:09:19

标签: highcharts highmaps

我正在使用像JSFiddle这样的高图广告向下钻取 问题是当我钻取时,我改变了像这样的DataClasses

chart.update({
    colorAxis: {
        dataClasses: [{
            to: 5000
        }, {
            from: 5000,
            to: 6000
        }, {
            from: 6000
        }]
    }
});

它完美无缺,当我钻井时,我有这个

drillup: function () {
    this.setTitle(null, { text: 'General' });
    this.colorAxis[0].update({
        colorAxis: {
            dataClasses: [{
                to: 200000
            }, {
                from: 200000,
                to: 350000
            }, {
                from: 350000
            }]
        }
    });
}

一切都很完美,但是当我再次尝试钻孔时,它并不起作用。 有什么想法解决这个问题吗?或者如何以不同的方式更改数据类?

2 个答案:

答案 0 :(得分:1)

这是一个错误,在此报告:https://github.com/highcharts/highcharts/issues/6679。在修复之前,请使用v5.0.10

例:
http://jsfiddle.net/hqngy7jj/ - 使用Highmaps v5.0.10

答案 1 :(得分:0)

我只是通过添加" False"得到了理想的结果。到Highcharts的重绘选项,因为它默认设置为true

update(Object options, Boolean redraw)

我必须阅读文档。以下是docs中的答案。

我正在使用Highcharts JS v5.0.12 (2017-05-24)

这是代码

drillup: function() {
    this.update({
        colorAxis: {
            dataClasses: [{
                to: 200000
            }, {
                from: 200000,
                to: 350000
            }, {
                from: 350000
            }]
        }
    }, false);
}
相关问题