in src/animator.ts [258:294]
public render(): void {
this.renderControls();
this.disableControls();
if (!this.chart.isAutoPlay) {
this.isAutoPlayed = true;
if (this.savedPosition) {
this.savedPosition = null;
}
}
if (this.chart.isAutoPlay && this.isAutoPlayed
&& this.animatorState === AnimatorStates.Play
&& !this.positionSaved
&& !isEqual(this.autoPlayPosition, this.savedPosition)) {
this.chart.stopAnimation();
this.isAutoPlayed = false;
this.positionSaved = true;
this.animatorState = AnimatorStates.Ready;
}
if (this.animatorState === AnimatorStates.Play) {
this.play();
} else if (this.chart.isAutoPlay && !this.isAutoPlayed && (this.animatorState === AnimatorStates.Ready)) {
this.autoPlayPosition = this.savedPosition;
this.isAutoPlayed = true;
if (this.savedPosition
&& this.savedPosition.series < this.chart.data.series.length
&& this.savedPosition.index < this.chart.data.series[this.savedPosition.series].data.length) {
this.position = this.savedPosition;
}
this.play(this.chart.autoplayPauseDuration);
} else {
this.chart.renderChart();
}
}