myChart.on('mouseover', function(params) { stopTimer(); }); myChart.on('mouseout', function(params) { startTimer(); }); var timer; function doing() { let option = myChart.getOption(); option.series[0].startAngle = option.series[0].startAngle - 1; myChart.setOption(option); } function startTimer() { timer = setInterval(doing, 5000); } function stopTimer() { clearInterval(timer); xzTimer = null; } setTimeout(startTimer, 500);
Done!