是否更改图表重绘事件上的Highcharts xAxis步长值?

是否更改图表重绘事件上的Highcharts xAxis步长值?,highcharts,Highcharts,我有一张海图。我想在图表重画时更改xAxis步长值。我在HighCharts中有以下代码 events: { redraw: function () { this.xAxis[0].update({ });

我有一张海图。我想在图表重画时更改xAxis步长值。我在HighCharts中有以下代码

                   events: {
                        redraw: function () {                            
                            this.xAxis[0].update({
                            });
                        }
                    }
如何更新值?

试试这个小提琴:

无论何时添加新系列,xAxis tickInterval都会得到更新

chart.yAxis[0].update({
     tickInterval: 3
})
将事件:重绘函数设置为

 chart: {    
        events: {
            redraw: function () {
                var label = this.renderer.label('The chart was just redrawn', 100, 120)
                    .attr({
                        fill: Highcharts.getOptions().colors[0],
                        padding: 10,
                        r: 5,
                        zIndex: 8
                    })
                    .css({
                        color: '#FFFFFF'
                    })
                    .add();

                setTimeout(function () {
                    label.fadeOut();
                }, 1000);

            }
        }
    },

所以,您希望在重画事件中更新轴。但是您知道update()将调用redraw()?我希望你明白我的意思-无限循环。