js/highcharts-master/utils/benchmark/javascript-functions.js
/* Function that recieves options loaded by loadScript().
 * Loops through repetitions while destroying chart and starting new date every time.
 * total is not sent to displayresult before the last repetition.
**/
Function that recieves options loaded by loadScript().
Loops through repetitions while destroying chart and starting new date every time.
total is not sent to displayresult before the last repetition.
Function that recieves options loaded by loadScript () . Loops through repetitions while destroying chart and starting new date every time . total is not sent to displayresult before the last repetition .
function runChart(options, test) {
		var total = 0,
			start,
			series;
		for (var i = 1; i <= rep; i++) {
			if ($('#container').highcharts()) {
				$('#container').highcharts().destroy();
			}
			if (options._constructor === 'StockChart') {
				if (options.series)	{
					series = options.series;
				} else if (series) {
					options.series = series;
				}
			}
			start = new Date();
			new Highcharts[options._constructor || 'Chart'](options, function() { 
				total = total ? total + Math.round((new Date() - start)) : Math.round((new Date() - start));
				if (i == rep) {
					displayResult(Math.round((total / rep)), test);
				}
			});
		}
	}
function runChart ( options , test ) { var total = 0 , start , series ; for ( var i = 1 ; i <= rep ; i ++ ) { if ( $ ( '#container' ) . highcharts ( ) ) { $ ( '#container' ) . highcharts ( ) . destroy ( ) ; } if ( options . _constructor === 'StockChart' ) { if ( options . series ) { series = options . series ; } else if ( series ) { options . series = series ; } } start = new Date ( ) ; new Highcharts [ options . _constructor || 'Chart' ] ( options , function ( ) { total = total ? total + Math . round ( ( new Date ( ) - start ) ) : Math . round ( ( new Date ( ) - start ) ) ; if ( i == rep ) { displayResult ( Math . round ( ( total / rep ) ) , test ) ; } } ) ; } }
Function that recieves options loaded by loadScript().
Function that recieves options loaded by loadScript () .
// Highstock removes options.series on destruction, probably a bug, but we throw in a workaround // here so we can test against older versions.