example/public/ueditor/third-party/highcharts/modules/canvas-tools.src.js
function (chart) {
			var renderer = this,
				options = chart.options.tooltip,
				borderWidth = options.borderWidth,
				tooltipDiv = renderer.ttDiv,
				tooltipDivStyle = options.style,
				tooltipLine = renderer.ttLine,
				padding = parseInt(tooltipDivStyle.padding, 10);

			// Add border styling from options to the style
			tooltipDivStyle = merge(tooltipDivStyle, {
				padding: padding + PX,
				'background-color': options.backgroundColor,
				'border-style': 'solid',
				'border-width': borderWidth + PX,
				'border-radius': options.borderRadius + PX
			});

			// Optionally add shadow
			if (options.shadow) {
				tooltipDivStyle = merge(tooltipDivStyle, {
					'box-shadow': '1px 1px 3px gray', // w3c
					'-webkit-box-shadow': '1px 1px 3px gray' // webkit
				});
			}
			css(tooltipDiv, tooltipDivStyle);

			// Set simple style on the line
			css(tooltipLine, {
				'border-left': '1px solid darkgray'
			});

			// This event is triggered when a new tooltip should be shown
			addEvent(chart, 'tooltipRefresh', function (args) {
				var chartContainer = chart.container,
					offsetLeft = chartContainer.offsetLeft,
					offsetTop = chartContainer.offsetTop,
					position;

				// Set the content of the tooltip
				tooltipDiv.innerHTML = args.text;

				// Compute the best position for the tooltip based on the divs size and container size.
				position = chart.tooltip.getPosition(tooltipDiv.offsetWidth, tooltipDiv.offsetHeight, {plotX: args.x, plotY: args.y});

				css(tooltipDiv, {
					visibility: VISIBLE,
					left: position.x + PX,
					top: position.y + PX,
					'border-color': args.borderColor
				});

				// Position the tooltip line
				css(tooltipLine, {
					visibility: VISIBLE,
					left: offsetLeft + args.x + PX,
					top: offsetTop + chart.plotTop + PX,
					height: chart.plotHeight  + PX
				});

				// This timeout hides the tooltip after 3 seconds
				// First clear any existing timer
				if (renderer.ttTimer !== UNDEFINED) {
					clearTimeout(renderer.ttTimer);
				}

				// Start a new timer that hides tooltip and line
				renderer.ttTimer = setTimeout(function () {
					css(tooltipDiv, { visibility: HIDDEN });
					css(tooltipLine, { visibility: HIDDEN });
				}, 3000);
			});
		}
function (chart) {
			var renderer = this,
				options = chart.options.tooltip,
				borderWidth = options.borderWidth,
				tooltipDiv = renderer.ttDiv,
				tooltipDivStyle = options.style,
				tooltipLine = renderer.ttLine,
				padding = parseInt(tooltipDivStyle.padding, 10);

			// Add border styling from options to the style
			tooltipDivStyle = merge(tooltipDivStyle, {
				padding: padding + PX,
				'background-color': options.backgroundColor,
				'border-style': 'solid',
				'border-width': borderWidth + PX,
				'border-radius': options.borderRadius + PX
			});

			// Optionally add shadow
			if (options.shadow) {
				tooltipDivStyle = merge(tooltipDivStyle, {
					'box-shadow': '1px 1px 3px gray', // w3c
					'-webkit-box-shadow': '1px 1px 3px gray' // webkit
				});
			}
			css(tooltipDiv, tooltipDivStyle);

			// Set simple style on the line
			css(tooltipLine, {
				'border-left': '1px solid darkgray'
			});

			// This event is triggered when a new tooltip should be shown
			addEvent(chart, 'tooltipRefresh', function (args) {
				var chartContainer = chart.container,
					offsetLeft = chartContainer.offsetLeft,
					offsetTop = chartContainer.offsetTop,
					position;

				// Set the content of the tooltip
				tooltipDiv.innerHTML = args.text;

				// Compute the best position for the tooltip based on the divs size and container size.
				position = chart.tooltip.getPosition(tooltipDiv.offsetWidth, tooltipDiv.offsetHeight, {plotX: args.x, plotY: args.y});

				css(tooltipDiv, {
					visibility: VISIBLE,
					left: position.x + PX,
					top: position.y + PX,
					'border-color': args.borderColor
				});

				// Position the tooltip line
				css(tooltipLine, {
					visibility: VISIBLE,
					left: offsetLeft + args.x + PX,
					top: offsetTop + chart.plotTop + PX,
					height: chart.plotHeight  + PX
				});

				// This timeout hides the tooltip after 3 seconds
				// First clear any existing timer
				if (renderer.ttTimer !== UNDEFINED) {
					clearTimeout(renderer.ttTimer);
				}

				// Start a new timer that hides tooltip and line
				renderer.ttTimer = setTimeout(function () {
					css(tooltipDiv, { visibility: HIDDEN });
					css(tooltipLine, { visibility: HIDDEN });
				}, 3000);
			});
		}
function ( chart ) { var renderer = this , options = chart . options . tooltip , borderWidth = options . borderWidth , tooltipDiv = renderer . ttDiv , tooltipDivStyle = options . style , tooltipLine = renderer . ttLine , padding = parseInt ( tooltipDivStyle . padding , 10 ) ; // Add border styling from options to the style tooltipDivStyle = merge ( tooltipDivStyle , { padding : padding + PX , 'background-color' : options . backgroundColor , 'border-style' : 'solid' , 'border-width' : borderWidth + PX , 'border-radius' : options . borderRadius + PX } ) ; // Optionally add shadow if ( options . shadow ) { tooltipDivStyle = merge ( tooltipDivStyle , { 'box-shadow' : '1px 1px 3px gray' , // w3c '-webkit-box-shadow' : '1px 1px 3px gray' // webkit } ) ; } css ( tooltipDiv , tooltipDivStyle ) ; // Set simple style on the line css ( tooltipLine , { 'border-left' : '1px solid darkgray' } ) ; // This event is triggered when a new tooltip should be shown addEvent ( chart , 'tooltipRefresh' , function ( args ) { var chartContainer = chart . container , offsetLeft = chartContainer . offsetLeft , offsetTop = chartContainer . offsetTop , position ; // Set the content of the tooltip tooltipDiv . innerHTML = args . text ; // Compute the best position for the tooltip based on the divs size and container size. position = chart . tooltip . getPosition ( tooltipDiv . offsetWidth , tooltipDiv . offsetHeight , { plotX : args . x , plotY : args . y } ) ; css ( tooltipDiv , { visibility : VISIBLE , left : position . x + PX , top : position . y + PX , 'border-color' : args . borderColor } ) ; // Position the tooltip line css ( tooltipLine , { visibility : VISIBLE , left : offsetLeft + args . x + PX , top : offsetTop + chart . plotTop + PX , height : chart . plotHeight + PX } ) ; // This timeout hides the tooltip after 3 seconds // First clear any existing timer if ( renderer . ttTimer !== UNDEFINED ) { clearTimeout ( renderer . ttTimer ) ; } // Start a new timer that hides tooltip and line renderer . ttTimer = setTimeout ( function ( ) { css ( tooltipDiv , { visibility : HIDDEN } ) ; css ( tooltipLine , { visibility : HIDDEN } ) ; } , 3000 ) ; } ) ; }
Configures the renderer with the chart. Attach a listener to the event tooltipRefresh.
Configures the renderer with the chart . Attach a listener to the event tooltipRefresh .