src/plugins/plugin.streaming.js
function drawChart(chart) {
	var streaming = chart.streaming;
	var frameRate = chart.options.plugins.streaming.frameRate;
	var frameDuration = 1000 / (Math.max(frameRate, 0) || 30);
	var next = streaming.lastDrawn + frameDuration || 0;
	var now = Date.now();
	var lastMouseEvent = streaming.lastMouseEvent;

	if (next <= now) {
		// Draw only when animation is inactive
		if (!chart.animating && !chart.tooltip._start) {
			chart.draw();
		}
		if (lastMouseEvent) {
			chart.eventHandler(lastMouseEvent);
		}
		streaming.lastDrawn = (next + frameDuration > now) ? next : now;
	}
}
function drawChart(chart) {
	var streaming = chart.streaming;
	var frameRate = chart.options.plugins.streaming.frameRate;
	var frameDuration = 1000 / (Math.max(frameRate, 0) || 30);
	var next = streaming.lastDrawn + frameDuration || 0;
	var now = Date.now();
	var lastMouseEvent = streaming.lastMouseEvent;

	if (next <= now) {
		// Draw only when animation is inactive
		if (!chart.animating && !chart.tooltip._start) {
			chart.draw();
		}
		if (lastMouseEvent) {
			chart.eventHandler(lastMouseEvent);
		}
		streaming.lastDrawn = (next + frameDuration > now) ? next : now;
	}
}
function drawChart ( chart ) { var streaming = chart . streaming ; var frameRate = chart . options . plugins . streaming . frameRate ; var frameDuration = 1000 / ( Math . max ( frameRate , 0 ) || 30 ) ; var next = streaming . lastDrawn + frameDuration || 0 ; var now = Date . now ( ) ; var lastMouseEvent = streaming . lastMouseEvent ; if ( next <= now ) { // Draw only when animation is inactive if ( ! chart . animating && ! chart . tooltip . _start ) { chart . draw ( ) ; } if ( lastMouseEvent ) { chart . eventHandler ( lastMouseEvent ) ; } streaming . lastDrawn = ( next + frameDuration > now ) ? next : now ; } }
Draw chart at frameRate
Draw chart at frameRate