答案 0 :(得分:0)
最后,我成功设置了默认选项:
plotOptions: {
column: {
grouping: grouping,
dataGrouping: {
forced: true,
units: [['month', [1, 3, 6]], ['year', [1, 5]]]
},
}
并在设置轴时更新它:
xAxis: {
events: {
afterSetExtremes: function (e) {
var chart = $('#redChart').highcharts();
chart.update({
plotOptions:{
column: {
dataGrouping: {
forced: dateFns.differenceInMonths(e.max, e.min) > 3,
}
}
}
})
}
},
},