code: function () {
  		var chart = this;
  
  		// reset stacks for each yAxis
  		each(chart.yAxis, function (axis) {
  			if (axis.stacks && axis.hasVisibleSeries) {
  				axis.oldStacks = axis.stacks;
  			}
  		});
  
  		each(chart.series, function (series) {
  			if (series.options.stacking && (series.visible === true || chart.options.chart.ignoreHiddenSeries === false)) {
  				series.stackKey = series.type + pick(series.options.stack, '');
  			}
  		});
  	}
docs: Generate stacks for each series and calculate stacks total values