example/public/ueditor/third-party/highcharts/highcharts.src.js
function () {
		var chart = this,
			optionsChart = chart.options.chart,
			renderer = chart.renderer,
			chartWidth = chart.chartWidth,
			chartHeight = chart.chartHeight,
			chartBackground = chart.chartBackground,
			plotBackground = chart.plotBackground,
			plotBorder = chart.plotBorder,
			plotBGImage = chart.plotBGImage,
			chartBorderWidth = optionsChart.borderWidth || 0,
			chartBackgroundColor = optionsChart.backgroundColor,
			plotBackgroundColor = optionsChart.plotBackgroundColor,
			plotBackgroundImage = optionsChart.plotBackgroundImage,
			plotBorderWidth = optionsChart.plotBorderWidth || 0,
			mgn,
			bgAttr,
			plotLeft = chart.plotLeft,
			plotTop = chart.plotTop,
			plotWidth = chart.plotWidth,
			plotHeight = chart.plotHeight,
			plotBox = chart.plotBox,
			clipRect = chart.clipRect,
			clipBox = chart.clipBox;

		// Chart area
		mgn = chartBorderWidth + (optionsChart.shadow ? 8 : 0);

		if (chartBorderWidth || chartBackgroundColor) {
			if (!chartBackground) {
				
				bgAttr = {
					fill: chartBackgroundColor || NONE
				};
				if (chartBorderWidth) { // #980
					bgAttr.stroke = optionsChart.borderColor;
					bgAttr['stroke-width'] = chartBorderWidth;
				}
				chart.chartBackground = renderer.rect(mgn / 2, mgn / 2, chartWidth - mgn, chartHeight - mgn,
						optionsChart.borderRadius, chartBorderWidth)
					.attr(bgAttr)
					.add()
					.shadow(optionsChart.shadow);

			} else { // resize
				chartBackground.animate(
					chartBackground.crisp(null, null, null, chartWidth - mgn, chartHeight - mgn)
				);
			}
		}


		// Plot background
		if (plotBackgroundColor) {
			if (!plotBackground) {
				chart.plotBackground = renderer.rect(plotLeft, plotTop, plotWidth, plotHeight, 0)
					.attr({
						fill: plotBackgroundColor
					})
					.add()
					.shadow(optionsChart.plotShadow);
			} else {
				plotBackground.animate(plotBox);
			}
		}
		if (plotBackgroundImage) {
			if (!plotBGImage) {
				chart.plotBGImage = renderer.image(plotBackgroundImage, plotLeft, plotTop, plotWidth, plotHeight)
					.add();
			} else {
				plotBGImage.animate(plotBox);
			}
		}
		
		// Plot clip
		if (!clipRect) {
			chart.clipRect = renderer.clipRect(clipBox);
		} else {
			clipRect.animate({
				width: clipBox.width,
				height: clipBox.height
			});
		}

		// Plot area border
		if (plotBorderWidth) {
			if (!plotBorder) {
				chart.plotBorder = renderer.rect(plotLeft, plotTop, plotWidth, plotHeight, 0, -plotBorderWidth)
					.attr({
						stroke: optionsChart.plotBorderColor,
						'stroke-width': plotBorderWidth,
						zIndex: 1
					})
					.add();
			} else {
				plotBorder.animate(
					plotBorder.crisp(null, plotLeft, plotTop, plotWidth, plotHeight)
				);
			}
		}

		// reset
		chart.isDirtyBox = false;
	}
function () {
		var chart = this,
			optionsChart = chart.options.chart,
			renderer = chart.renderer,
			chartWidth = chart.chartWidth,
			chartHeight = chart.chartHeight,
			chartBackground = chart.chartBackground,
			plotBackground = chart.plotBackground,
			plotBorder = chart.plotBorder,
			plotBGImage = chart.plotBGImage,
			chartBorderWidth = optionsChart.borderWidth || 0,
			chartBackgroundColor = optionsChart.backgroundColor,
			plotBackgroundColor = optionsChart.plotBackgroundColor,
			plotBackgroundImage = optionsChart.plotBackgroundImage,
			plotBorderWidth = optionsChart.plotBorderWidth || 0,
			mgn,
			bgAttr,
			plotLeft = chart.plotLeft,
			plotTop = chart.plotTop,
			plotWidth = chart.plotWidth,
			plotHeight = chart.plotHeight,
			plotBox = chart.plotBox,
			clipRect = chart.clipRect,
			clipBox = chart.clipBox;

		// Chart area
		mgn = chartBorderWidth + (optionsChart.shadow ? 8 : 0);

		if (chartBorderWidth || chartBackgroundColor) {
			if (!chartBackground) {
				
				bgAttr = {
					fill: chartBackgroundColor || NONE
				};
				if (chartBorderWidth) { // #980
					bgAttr.stroke = optionsChart.borderColor;
					bgAttr['stroke-width'] = chartBorderWidth;
				}
				chart.chartBackground = renderer.rect(mgn / 2, mgn / 2, chartWidth - mgn, chartHeight - mgn,
						optionsChart.borderRadius, chartBorderWidth)
					.attr(bgAttr)
					.add()
					.shadow(optionsChart.shadow);

			} else { // resize
				chartBackground.animate(
					chartBackground.crisp(null, null, null, chartWidth - mgn, chartHeight - mgn)
				);
			}
		}


		// Plot background
		if (plotBackgroundColor) {
			if (!plotBackground) {
				chart.plotBackground = renderer.rect(plotLeft, plotTop, plotWidth, plotHeight, 0)
					.attr({
						fill: plotBackgroundColor
					})
					.add()
					.shadow(optionsChart.plotShadow);
			} else {
				plotBackground.animate(plotBox);
			}
		}
		if (plotBackgroundImage) {
			if (!plotBGImage) {
				chart.plotBGImage = renderer.image(plotBackgroundImage, plotLeft, plotTop, plotWidth, plotHeight)
					.add();
			} else {
				plotBGImage.animate(plotBox);
			}
		}
		
		// Plot clip
		if (!clipRect) {
			chart.clipRect = renderer.clipRect(clipBox);
		} else {
			clipRect.animate({
				width: clipBox.width,
				height: clipBox.height
			});
		}

		// Plot area border
		if (plotBorderWidth) {
			if (!plotBorder) {
				chart.plotBorder = renderer.rect(plotLeft, plotTop, plotWidth, plotHeight, 0, -plotBorderWidth)
					.attr({
						stroke: optionsChart.plotBorderColor,
						'stroke-width': plotBorderWidth,
						zIndex: 1
					})
					.add();
			} else {
				plotBorder.animate(
					plotBorder.crisp(null, plotLeft, plotTop, plotWidth, plotHeight)
				);
			}
		}

		// reset
		chart.isDirtyBox = false;
	}
function ( ) { var chart = this , optionsChart = chart . options . chart , renderer = chart . renderer , chartWidth = chart . chartWidth , chartHeight = chart . chartHeight , chartBackground = chart . chartBackground , plotBackground = chart . plotBackground , plotBorder = chart . plotBorder , plotBGImage = chart . plotBGImage , chartBorderWidth = optionsChart . borderWidth || 0 , chartBackgroundColor = optionsChart . backgroundColor , plotBackgroundColor = optionsChart . plotBackgroundColor , plotBackgroundImage = optionsChart . plotBackgroundImage , plotBorderWidth = optionsChart . plotBorderWidth || 0 , mgn , bgAttr , plotLeft = chart . plotLeft , plotTop = chart . plotTop , plotWidth = chart . plotWidth , plotHeight = chart . plotHeight , plotBox = chart . plotBox , clipRect = chart . clipRect , clipBox = chart . clipBox ; // Chart area mgn = chartBorderWidth + ( optionsChart . shadow ? 8 : 0 ) ; if ( chartBorderWidth || chartBackgroundColor ) { if ( ! chartBackground ) { bgAttr = { fill : chartBackgroundColor || NONE } ; if ( chartBorderWidth ) { // #980 bgAttr . stroke = optionsChart . borderColor ; bgAttr [ 'stroke-width' ] = chartBorderWidth ; } chart . chartBackground = renderer . rect ( mgn / 2 , mgn / 2 , chartWidth - mgn , chartHeight - mgn , optionsChart . borderRadius , chartBorderWidth ) . attr ( bgAttr ) . add ( ) . shadow ( optionsChart . shadow ) ; } else { // resize chartBackground . animate ( chartBackground . crisp ( null , null , null , chartWidth - mgn , chartHeight - mgn ) ) ; } } // Plot background if ( plotBackgroundColor ) { if ( ! plotBackground ) { chart . plotBackground = renderer . rect ( plotLeft , plotTop , plotWidth , plotHeight , 0 ) . attr ( { fill : plotBackgroundColor } ) . add ( ) . shadow ( optionsChart . plotShadow ) ; } else { plotBackground . animate ( plotBox ) ; } } if ( plotBackgroundImage ) { if ( ! plotBGImage ) { chart . plotBGImage = renderer . image ( plotBackgroundImage , plotLeft , plotTop , plotWidth , plotHeight ) . add ( ) ; } else { plotBGImage . animate ( plotBox ) ; } } // Plot clip if ( ! clipRect ) { chart . clipRect = renderer . clipRect ( clipBox ) ; } else { clipRect . animate ( { width : clipBox . width , height : clipBox . height } ) ; } // Plot area border if ( plotBorderWidth ) { if ( ! plotBorder ) { chart . plotBorder = renderer . rect ( plotLeft , plotTop , plotWidth , plotHeight , 0 , - plotBorderWidth ) . attr ( { stroke : optionsChart . plotBorderColor , 'stroke-width' : plotBorderWidth , zIndex : 1 } ) . add ( ) ; } else { plotBorder . animate ( plotBorder . crisp ( null , plotLeft , plotTop , plotWidth , plotHeight ) ) ; } } // reset chart . isDirtyBox = false ; }
Draw the borders and backgrounds for chart and plot area
Draw the borders and backgrounds for chart and plot area