加个判断 recentEntryBarGog.on('dataZoom', function (event) { if (event.start !== undefined && event.end !== undefined) { // 仅在拖动结束后的事件中执行 console.log('[REZoom] section S2 dataZoom event start'); const temp = getXAxisRange(this); console.dir(temp); console.log('[REZoom] section S2 dataZoom event end'); } });