src/controllers/controller.bar.js
function(last) {
		var me = this;
		var chart = me.chart;
		var scale = me._getIndexScale();
		var stacked = scale.options.stacked;
		var ilen = last === undefined ? chart.data.datasets.length : last + 1;
		var stacks = [];
		var i, meta;

		for (i = 0; i < ilen; ++i) {
			meta = chart.getDatasetMeta(i);
			if (meta.bar && chart.isDatasetVisible(i) &&
				(stacked === false ||
				(stacked === true && stacks.indexOf(meta.stack) === -1) ||
				(stacked === undefined && (meta.stack === undefined || stacks.indexOf(meta.stack) === -1)))) {
				stacks.push(meta.stack);
			}
		}

		return stacks;
	}
function(last) {
		var me = this;
		var chart = me.chart;
		var scale = me._getIndexScale();
		var stacked = scale.options.stacked;
		var ilen = last === undefined ? chart.data.datasets.length : last + 1;
		var stacks = [];
		var i, meta;

		for (i = 0; i < ilen; ++i) {
			meta = chart.getDatasetMeta(i);
			if (meta.bar && chart.isDatasetVisible(i) &&
				(stacked === false ||
				(stacked === true && stacks.indexOf(meta.stack) === -1) ||
				(stacked === undefined && (meta.stack === undefined || stacks.indexOf(meta.stack) === -1)))) {
				stacks.push(meta.stack);
			}
		}

		return stacks;
	}
function ( last ) { var me = this ; var chart = me . chart ; var scale = me . _getIndexScale ( ) ; var stacked = scale . options . stacked ; var ilen = last === undefined ? chart . data . datasets . length : last + 1 ; var stacks = [ ] ; var i , meta ; for ( i = 0 ; i < ilen ; ++ i ) { meta = chart . getDatasetMeta ( i ) ; if ( meta . bar && chart . isDatasetVisible ( i ) && ( stacked === false || ( stacked === true && stacks . indexOf ( meta . stack ) === - 1 ) || ( stacked === undefined && ( meta . stack === undefined || stacks . indexOf ( meta . stack ) === - 1 ) ) ) ) { stacks . push ( meta . stack ) ; } } return stacks ; }
Returns the stacks based on groups and bar visibility.
@param {number} [last] - The dataset index
@returns {string[]} The list of stack IDs
@private
Returns the stacks based on groups and bar visibility .