我出于某些目的使用mousewheel事件,尽管该功能会出现错误“类型事件上不存在属性deltaY”,但该功能仍能正常工作。为此,我无法构建我的项目。任何帮助将不胜感激
H.addEvent(chart.container, 'mousewheel', function (event) {
console.log('whwel',e);
var xAxis = chart.xAxis[0];
var extremes = xAxis.getExtremes();
var step = 12 * 3600 * 1000;
var newMin = extremes.min;
var date = new Date(newMin);
if (event.deltaY < 0) {
date.getUTCDay() === 5 ? newMin += 3 * step : newMin += step;
} else {
date.getUTCDay() === 1 ? newMin -= 3 * step : newMin -= step;
}
xAxis.setExtremes(newMin, extremes.max, true);
});