example/public/ueditor/third-party/highcharts/modules/map.src.js
function (legend, item) {
			var spacing = legend.options.symbolPadding,
				padding = pick(legend.options.padding, 8),
				positionY,
				positionX,
				gradientSize = this.chart.renderer.fontMetrics(legend.options.itemStyle.fontSize).h,
				horizontal = legend.options.layout === 'horizontal',
				box1,
				box2,
				box3,
				rectangleLength = pick(legend.options.rectangleLength, 200);

			// Set local variables based on option.
			if (horizontal) {
				positionY = -(spacing / 2);
				positionX = 0;
			} else {
				positionY = -rectangleLength + legend.baseline - (spacing / 2);
				positionX = padding + gradientSize;
			}

			// Creates the from text.
			item.fromText = this.chart.renderer.text(
					item.fromLabel,	// Text.
					positionX,		// Lower left x.
					positionY		// Lower left y.
				).attr({
					zIndex: 2
				}).add(item.legendGroup);
			box1 = item.fromText.getBBox();

			// Creates legend symbol.
			// Ternary changes variables based on option.
			item.legendSymbol = this.chart.renderer.rect(
				horizontal ? box1.x + box1.width + spacing : box1.x - gradientSize - spacing,		// Upper left x.
				box1.y,																				// Upper left y.
				horizontal ? rectangleLength : gradientSize,											// Width.
				horizontal ? gradientSize : rectangleLength,										// Height.
				2																					// Corner radius.
			).attr({
				zIndex: 1
			}).add(item.legendGroup);
			box2 = item.legendSymbol.getBBox();

			// Creates the to text.
			// Vertical coordinate changed based on option.
			item.toText = this.chart.renderer.text(
					item.toLabel,
					box2.x + box2.width + spacing,
					horizontal ? positionY : box2.y + box2.height - spacing
				).attr({
					zIndex: 2
				}).add(item.legendGroup);
			box3 = item.toText.getBBox();

			// Changes legend box settings based on option.
			if (horizontal) {
				legend.offsetWidth = box1.width + box2.width + box3.width + (spacing * 2) + padding;
				legend.itemY = gradientSize + padding;
			} else {
				legend.offsetWidth = Math.max(box1.width, box3.width) + (spacing) + box2.width + padding;
				legend.itemY = box2.height + padding;
				legend.itemX = spacing;
			}
		}
function (legend, item) {
			var spacing = legend.options.symbolPadding,
				padding = pick(legend.options.padding, 8),
				positionY,
				positionX,
				gradientSize = this.chart.renderer.fontMetrics(legend.options.itemStyle.fontSize).h,
				horizontal = legend.options.layout === 'horizontal',
				box1,
				box2,
				box3,
				rectangleLength = pick(legend.options.rectangleLength, 200);

			// Set local variables based on option.
			if (horizontal) {
				positionY = -(spacing / 2);
				positionX = 0;
			} else {
				positionY = -rectangleLength + legend.baseline - (spacing / 2);
				positionX = padding + gradientSize;
			}

			// Creates the from text.
			item.fromText = this.chart.renderer.text(
					item.fromLabel,	// Text.
					positionX,		// Lower left x.
					positionY		// Lower left y.
				).attr({
					zIndex: 2
				}).add(item.legendGroup);
			box1 = item.fromText.getBBox();

			// Creates legend symbol.
			// Ternary changes variables based on option.
			item.legendSymbol = this.chart.renderer.rect(
				horizontal ? box1.x + box1.width + spacing : box1.x - gradientSize - spacing,		// Upper left x.
				box1.y,																				// Upper left y.
				horizontal ? rectangleLength : gradientSize,											// Width.
				horizontal ? gradientSize : rectangleLength,										// Height.
				2																					// Corner radius.
			).attr({
				zIndex: 1
			}).add(item.legendGroup);
			box2 = item.legendSymbol.getBBox();

			// Creates the to text.
			// Vertical coordinate changed based on option.
			item.toText = this.chart.renderer.text(
					item.toLabel,
					box2.x + box2.width + spacing,
					horizontal ? positionY : box2.y + box2.height - spacing
				).attr({
					zIndex: 2
				}).add(item.legendGroup);
			box3 = item.toText.getBBox();

			// Changes legend box settings based on option.
			if (horizontal) {
				legend.offsetWidth = box1.width + box2.width + box3.width + (spacing * 2) + padding;
				legend.itemY = gradientSize + padding;
			} else {
				legend.offsetWidth = Math.max(box1.width, box3.width) + (spacing) + box2.width + padding;
				legend.itemY = box2.height + padding;
				legend.itemX = spacing;
			}
		}
function ( legend , item ) { var spacing = legend . options . symbolPadding , padding = pick ( legend . options . padding , 8 ) , positionY , positionX , gradientSize = this . chart . renderer . fontMetrics ( legend . options . itemStyle . fontSize ) . h , horizontal = legend . options . layout === 'horizontal' , box1 , box2 , box3 , rectangleLength = pick ( legend . options . rectangleLength , 200 ) ; // Set local variables based on option. if ( horizontal ) { positionY = - ( spacing / 2 ) ; positionX = 0 ; } else { positionY = - rectangleLength + legend . baseline - ( spacing / 2 ) ; positionX = padding + gradientSize ; } // Creates the from text. item . fromText = this . chart . renderer . text ( item . fromLabel , // Text. positionX , // Lower left x. positionY // Lower left y. ) . attr ( { zIndex : 2 } ) . add ( item . legendGroup ) ; box1 = item . fromText . getBBox ( ) ; // Creates legend symbol. // Ternary changes variables based on option. item . legendSymbol = this . chart . renderer . rect ( horizontal ? box1 . x + box1 . width + spacing : box1 . x - gradientSize - spacing , // Upper left x. box1 . y , // Upper left y. horizontal ? rectangleLength : gradientSize , // Width. horizontal ? gradientSize : rectangleLength , // Height. 2 // Corner radius. ) . attr ( { zIndex : 1 } ) . add ( item . legendGroup ) ; box2 = item . legendSymbol . getBBox ( ) ; // Creates the to text. // Vertical coordinate changed based on option. item . toText = this . chart . renderer . text ( item . toLabel , box2 . x + box2 . width + spacing , horizontal ? positionY : box2 . y + box2 . height - spacing ) . attr ( { zIndex : 2 } ) . add ( item . legendGroup ) ; box3 = item . toText . getBBox ( ) ; // Changes legend box settings based on option. if ( horizontal ) { legend . offsetWidth = box1 . width + box2 . width + box3 . width + ( spacing * 2 ) + padding ; legend . itemY = gradientSize + padding ; } else { legend . offsetWidth = Math . max ( box1 . width , box3 . width ) + ( spacing ) + box2 . width + padding ; legend . itemY = box2 . height + padding ; legend . itemX = spacing ; } }
Gets the series' symbol in the legend and extended legend with more information.

@param {Object} legend The legend object
@param {Object} item The series (this) or point
Gets the series symbol in the legend and extended legend with more information .