example/public/ueditor/third-party/highcharts/highcharts.src.js
function () {
		if (!this.options.stacking || (this.visible !== true && this.chart.options.chart.ignoreHiddenSeries !== false)) {
			return;
		}

		var series = this,
			xData = series.processedXData,
			yData = series.processedYData,
			stackedYData = [],
			yDataLength = yData.length,
			seriesOptions = series.options,
			threshold = seriesOptions.threshold,
			stackOption = seriesOptions.stack,
			stacking = seriesOptions.stacking,
			stackKey = series.stackKey,
			negKey = '-' + stackKey,
			negStacks = series.negStacks,
			yAxis = series.yAxis,
			stacks = yAxis.stacks,
			oldStacks = yAxis.oldStacks,
			isNegative,
			stack,
			other,
			key,
			i,
			x,
			y;

		// loop over the non-null y values and read them into a local array
		for (i = 0; i < yDataLength; i++) {
			x = xData[i];
			y = yData[i];

			// Read stacked values into a stack based on the x value,
			// the sign of y and the stack key. Stacking is also handled for null values (#739)
			isNegative = negStacks && y < threshold;
			key = isNegative ? negKey : stackKey;

			// Create empty object for this stack if it doesn't exist yet
			if (!stacks[key]) {
				stacks[key] = {};
			}

			// Initialize StackItem for this x
			if (!stacks[key][x]) {
				if (oldStacks[key] && oldStacks[key][x]) {
					stacks[key][x] = oldStacks[key][x];
					stacks[key][x].total = null;
				} else {
					stacks[key][x] = new StackItem(yAxis, yAxis.options.stackLabels, isNegative, x, stackOption, stacking);
				}
			}

			// If the StackItem doesn't exist, create it first
			stack = stacks[key][x];
			stack.points[series.index] = [stack.cum || 0];

			// Add value to the stack total
			if (stacking === 'percent') {
				
				// Percent stacked column, totals are the same for the positive and negative stacks
				other = isNegative ? stackKey : negKey;
				if (negStacks && stacks[other] && stacks[other][x]) {
					other = stacks[other][x];
					stack.total = other.total = mathMax(other.total, stack.total) + mathAbs(y) || 0;

				// Percent stacked areas					
				} else {
					stack.total += mathAbs(y) || 0;
				}
			} else {
				stack.total += y || 0;
			}

			stack.cum = (stack.cum || 0) + (y || 0);

			stack.points[series.index].push(stack.cum);
			stackedYData[i] = stack.cum;

		}

		if (stacking === 'percent') {
			yAxis.usePercentage = true;
		}

		this.stackedYData = stackedYData; // To be used in getExtremes
		
		// Reset old stacks
		yAxis.oldStacks = {};
	}
function () {
		if (!this.options.stacking || (this.visible !== true && this.chart.options.chart.ignoreHiddenSeries !== false)) {
			return;
		}

		var series = this,
			xData = series.processedXData,
			yData = series.processedYData,
			stackedYData = [],
			yDataLength = yData.length,
			seriesOptions = series.options,
			threshold = seriesOptions.threshold,
			stackOption = seriesOptions.stack,
			stacking = seriesOptions.stacking,
			stackKey = series.stackKey,
			negKey = '-' + stackKey,
			negStacks = series.negStacks,
			yAxis = series.yAxis,
			stacks = yAxis.stacks,
			oldStacks = yAxis.oldStacks,
			isNegative,
			stack,
			other,
			key,
			i,
			x,
			y;

		// loop over the non-null y values and read them into a local array
		for (i = 0; i < yDataLength; i++) {
			x = xData[i];
			y = yData[i];

			// Read stacked values into a stack based on the x value,
			// the sign of y and the stack key. Stacking is also handled for null values (#739)
			isNegative = negStacks && y < threshold;
			key = isNegative ? negKey : stackKey;

			// Create empty object for this stack if it doesn't exist yet
			if (!stacks[key]) {
				stacks[key] = {};
			}

			// Initialize StackItem for this x
			if (!stacks[key][x]) {
				if (oldStacks[key] && oldStacks[key][x]) {
					stacks[key][x] = oldStacks[key][x];
					stacks[key][x].total = null;
				} else {
					stacks[key][x] = new StackItem(yAxis, yAxis.options.stackLabels, isNegative, x, stackOption, stacking);
				}
			}

			// If the StackItem doesn't exist, create it first
			stack = stacks[key][x];
			stack.points[series.index] = [stack.cum || 0];

			// Add value to the stack total
			if (stacking === 'percent') {
				
				// Percent stacked column, totals are the same for the positive and negative stacks
				other = isNegative ? stackKey : negKey;
				if (negStacks && stacks[other] && stacks[other][x]) {
					other = stacks[other][x];
					stack.total = other.total = mathMax(other.total, stack.total) + mathAbs(y) || 0;

				// Percent stacked areas					
				} else {
					stack.total += mathAbs(y) || 0;
				}
			} else {
				stack.total += y || 0;
			}

			stack.cum = (stack.cum || 0) + (y || 0);

			stack.points[series.index].push(stack.cum);
			stackedYData[i] = stack.cum;

		}

		if (stacking === 'percent') {
			yAxis.usePercentage = true;
		}

		this.stackedYData = stackedYData; // To be used in getExtremes
		
		// Reset old stacks
		yAxis.oldStacks = {};
	}
function ( ) { if ( ! this . options . stacking || ( this . visible !== true && this . chart . options . chart . ignoreHiddenSeries !== false ) ) { return ; } var series = this , xData = series . processedXData , yData = series . processedYData , stackedYData = [ ] , yDataLength = yData . length , seriesOptions = series . options , threshold = seriesOptions . threshold , stackOption = seriesOptions . stack , stacking = seriesOptions . stacking , stackKey = series . stackKey , negKey = '-' + stackKey , negStacks = series . negStacks , yAxis = series . yAxis , stacks = yAxis . stacks , oldStacks = yAxis . oldStacks , isNegative , stack , other , key , i , x , y ; // loop over the non-null y values and read them into a local array for ( i = 0 ; i < yDataLength ; i ++ ) { x = xData [ i ] ; y = yData [ i ] ; // Read stacked values into a stack based on the x value, // the sign of y and the stack key. Stacking is also handled for null values (#739) isNegative = negStacks && y < threshold ; key = isNegative ? negKey : stackKey ; // Create empty object for this stack if it doesn't exist yet if ( ! stacks [ key ] ) { stacks [ key ] = { } ; } // Initialize StackItem for this x if ( ! stacks [ key ] [ x ] ) { if ( oldStacks [ key ] && oldStacks [ key ] [ x ] ) { stacks [ key ] [ x ] = oldStacks [ key ] [ x ] ; stacks [ key ] [ x ] . total = null ; } else { stacks [ key ] [ x ] = new StackItem ( yAxis , yAxis . options . stackLabels , isNegative , x , stackOption , stacking ) ; } } // If the StackItem doesn't exist, create it first stack = stacks [ key ] [ x ] ; stack . points [ series . index ] = [ stack . cum || 0 ] ; // Add value to the stack total if ( stacking === 'percent' ) { // Percent stacked column, totals are the same for the positive and negative stacks other = isNegative ? stackKey : negKey ; if ( negStacks && stacks [ other ] && stacks [ other ] [ x ] ) { other = stacks [ other ] [ x ] ; stack . total = other . total = mathMax ( other . total , stack . total ) + mathAbs ( y ) || 0 ; // Percent stacked areas					 } else { stack . total += mathAbs ( y ) || 0 ; } } else { stack . total += y || 0 ; } stack . cum = ( stack . cum || 0 ) + ( y || 0 ) ; stack . points [ series . index ] . push ( stack . cum ) ; stackedYData [ i ] = stack . cum ; } if ( stacking === 'percent' ) { yAxis . usePercentage = true ; } this . stackedYData = stackedYData ; // To be used in getExtremes // Reset old stacks yAxis . oldStacks = { } ; }
Adds series' points value to corresponding stack
Adds series points value to corresponding stack