example/public/ueditor/third-party/highcharts/highcharts.src.js
function (points, mouseEvent) {
		var ret,
			chart = this.chart,
			inverted = chart.inverted,
			plotTop = chart.plotTop,
			plotX = 0,
			plotY = 0,
			yAxis;
		
		points = splat(points);
		
		// Pie uses a special tooltipPos
		ret = points[0].tooltipPos;
		
		// When tooltip follows mouse, relate the position to the mouse
		if (this.followPointer && mouseEvent) {
			if (mouseEvent.chartX === UNDEFINED) {
				mouseEvent = chart.pointer.normalize(mouseEvent);
			}
			ret = [
				mouseEvent.chartX - chart.plotLeft,
				mouseEvent.chartY - plotTop
			];
		}
		// When shared, use the average position
		if (!ret) {
			each(points, function (point) {
				yAxis = point.series.yAxis;
				plotX += point.plotX;
				plotY += (point.plotLow ? (point.plotLow + point.plotHigh) / 2 : point.plotY) +
					(!inverted && yAxis ? yAxis.top - plotTop : 0); // #1151
			});
			
			plotX /= points.length;
			plotY /= points.length;
			
			ret = [
				inverted ? chart.plotWidth - plotY : plotX,
				this.shared && !inverted && points.length > 1 && mouseEvent ? 
					mouseEvent.chartY - plotTop : // place shared tooltip next to the mouse (#424)
					inverted ? chart.plotHeight - plotX : plotY
			];
		}

		return map(ret, mathRound);
	}
function (points, mouseEvent) {
		var ret,
			chart = this.chart,
			inverted = chart.inverted,
			plotTop = chart.plotTop,
			plotX = 0,
			plotY = 0,
			yAxis;
		
		points = splat(points);
		
		// Pie uses a special tooltipPos
		ret = points[0].tooltipPos;
		
		// When tooltip follows mouse, relate the position to the mouse
		if (this.followPointer && mouseEvent) {
			if (mouseEvent.chartX === UNDEFINED) {
				mouseEvent = chart.pointer.normalize(mouseEvent);
			}
			ret = [
				mouseEvent.chartX - chart.plotLeft,
				mouseEvent.chartY - plotTop
			];
		}
		// When shared, use the average position
		if (!ret) {
			each(points, function (point) {
				yAxis = point.series.yAxis;
				plotX += point.plotX;
				plotY += (point.plotLow ? (point.plotLow + point.plotHigh) / 2 : point.plotY) +
					(!inverted && yAxis ? yAxis.top - plotTop : 0); // #1151
			});
			
			plotX /= points.length;
			plotY /= points.length;
			
			ret = [
				inverted ? chart.plotWidth - plotY : plotX,
				this.shared && !inverted && points.length > 1 && mouseEvent ? 
					mouseEvent.chartY - plotTop : // place shared tooltip next to the mouse (#424)
					inverted ? chart.plotHeight - plotX : plotY
			];
		}

		return map(ret, mathRound);
	}
function ( points , mouseEvent ) { var ret , chart = this . chart , inverted = chart . inverted , plotTop = chart . plotTop , plotX = 0 , plotY = 0 , yAxis ; points = splat ( points ) ; // Pie uses a special tooltipPos ret = points [ 0 ] . tooltipPos ; // When tooltip follows mouse, relate the position to the mouse if ( this . followPointer && mouseEvent ) { if ( mouseEvent . chartX === UNDEFINED ) { mouseEvent = chart . pointer . normalize ( mouseEvent ) ; } ret = [ mouseEvent . chartX - chart . plotLeft , mouseEvent . chartY - plotTop ] ; } // When shared, use the average position if ( ! ret ) { each ( points , function ( point ) { yAxis = point . series . yAxis ; plotX += point . plotX ; plotY += ( point . plotLow ? ( point . plotLow + point . plotHigh ) / 2 : point . plotY ) + ( ! inverted && yAxis ? yAxis . top - plotTop : 0 ) ; // #1151 } ) ; plotX /= points . length ; plotY /= points . length ; ret = [ inverted ? chart . plotWidth - plotY : plotX , this . shared && ! inverted && points . length > 1 && mouseEvent ? mouseEvent . chartY - plotTop : // place shared tooltip next to the mouse (#424) inverted ? chart . plotHeight - plotX : plotY ] ; } return map ( ret , mathRound ) ; }
Extendable method to get the anchor position of the tooltip
from a point or set of points
Extendable method to get the anchor position of the tooltip from a point or set of points