docs/a.js
function(elements) {
			if (!elements.length) {
				return false;
			}

			var i, len;
			var x = 0;
			var y = 0;
			var count = 0;

			for (i = 0, len = elements.length; i < len; ++i) {
				var el = elements[i];
				if (el && el.hasValue()) {
					var pos = el.tooltipPosition();
					x += pos.x;
					y += pos.y;
					++count;
				}
			}

			return {
				x: Math.round(x / count),
				y: Math.round(y / count)
			};
		}
function(elements) {
			if (!elements.length) {
				return false;
			}

			var i, len;
			var x = 0;
			var y = 0;
			var count = 0;

			for (i = 0, len = elements.length; i < len; ++i) {
				var el = elements[i];
				if (el && el.hasValue()) {
					var pos = el.tooltipPosition();
					x += pos.x;
					y += pos.y;
					++count;
				}
			}

			return {
				x: Math.round(x / count),
				y: Math.round(y / count)
			};
		}
function ( elements ) { if ( ! elements . length ) { return false ; } var i , len ; var x = 0 ; var y = 0 ; var count = 0 ; for ( i = 0 , len = elements . length ; i < len ; ++ i ) { var el = elements [ i ] ; if ( el && el . hasValue ( ) ) { var pos = el . tooltipPosition ( ) ; x += pos . x ; y += pos . y ; ++ count ; } } return { x : Math . round ( x / count ) , y : Math . round ( y / count ) } ; }
Average mode places the tooltip at the average position of the elements shown
@function Chart.Tooltip.positioners.average
@param elements {ChartElement[]} the elements being displayed in the tooltip
@returns {Point} tooltip position
Average mode places the tooltip at the average position of the elements shown