src/plugins/plugin.streaming.js
function update(config) {
	var me = this;
	var preservation = config && config.preservation;
	var tooltip, lastActive, tooltipLastActive, lastMouseEvent;

	if (preservation) {
		tooltip = me.tooltip;
		lastActive = me.lastActive;
		tooltipLastActive = tooltip._lastActive;
		me._bufferedRender = true;
	}

	Chart.prototype.update.apply(me, arguments);

	if (preservation) {
		me._bufferedRender = false;
		me._bufferedRequest = null;
		me.lastActive = lastActive;
		tooltip._lastActive = tooltipLastActive;

		if (me.animating) {
			// If the chart is animating, keep it until the duration is over
			Chart.animationService.animations.forEach(function(animation) {
				if (animation.chart === me) {
					me.render({
						duration: (animation.numSteps - animation.currentStep) * 16.66
					});
				}
			});
		} else {
			// If the chart is not animating, make sure that all elements are at the final positions
			me.data.datasets.forEach(function(dataset, datasetIndex) {
				me.getDatasetMeta(datasetIndex).controller.transition(1);
			});
		}

		if (tooltip._active) {
			tooltip.update(true);
		}

		lastMouseEvent = me.streaming.lastMouseEvent;
		if (lastMouseEvent) {
			me.eventHandler(lastMouseEvent);
		}
	}
}
function update(config) {
	var me = this;
	var preservation = config && config.preservation;
	var tooltip, lastActive, tooltipLastActive, lastMouseEvent;

	if (preservation) {
		tooltip = me.tooltip;
		lastActive = me.lastActive;
		tooltipLastActive = tooltip._lastActive;
		me._bufferedRender = true;
	}

	Chart.prototype.update.apply(me, arguments);

	if (preservation) {
		me._bufferedRender = false;
		me._bufferedRequest = null;
		me.lastActive = lastActive;
		tooltip._lastActive = tooltipLastActive;

		if (me.animating) {
			// If the chart is animating, keep it until the duration is over
			Chart.animationService.animations.forEach(function(animation) {
				if (animation.chart === me) {
					me.render({
						duration: (animation.numSteps - animation.currentStep) * 16.66
					});
				}
			});
		} else {
			// If the chart is not animating, make sure that all elements are at the final positions
			me.data.datasets.forEach(function(dataset, datasetIndex) {
				me.getDatasetMeta(datasetIndex).controller.transition(1);
			});
		}

		if (tooltip._active) {
			tooltip.update(true);
		}

		lastMouseEvent = me.streaming.lastMouseEvent;
		if (lastMouseEvent) {
			me.eventHandler(lastMouseEvent);
		}
	}
}
function update ( config ) { var me = this ; var preservation = config && config . preservation ; var tooltip , lastActive , tooltipLastActive , lastMouseEvent ; if ( preservation ) { tooltip = me . tooltip ; lastActive = me . lastActive ; tooltipLastActive = tooltip . _lastActive ; me . _bufferedRender = true ; } Chart . prototype . update . apply ( me , arguments ) ; if ( preservation ) { me . _bufferedRender = false ; me . _bufferedRequest = null ; me . lastActive = lastActive ; tooltip . _lastActive = tooltipLastActive ; if ( me . animating ) { // If the chart is animating, keep it until the duration is over Chart . animationService . animations . forEach ( function ( animation ) { if ( animation . chart === me ) { me . render ( { duration : ( animation . numSteps - animation . currentStep ) * 16.66 } ) ; } } ) ; } else { // If the chart is not animating, make sure that all elements are at the final positions me . data . datasets . forEach ( function ( dataset , datasetIndex ) { me . getDatasetMeta ( datasetIndex ) . controller . transition ( 1 ) ; } ) ; } if ( tooltip . _active ) { tooltip . update ( true ) ; } lastMouseEvent = me . streaming . lastMouseEvent ; if ( lastMouseEvent ) { me . eventHandler ( lastMouseEvent ) ; } } }
Update the chart keeping the current animation but suppressing a new one
@param {object} config - animation options
Update the chart keeping the current animation but suppressing a new one