diff --git a/PHP/CodeCoverage/Report/HTML/Renderer/Dashboard.php b/PHP/CodeCoverage/Report/HTML/Renderer/Dashboard.php index 0c698c4db..dddc70500 100644 --- a/PHP/CodeCoverage/Report/HTML/Renderer/Dashboard.php +++ b/PHP/CodeCoverage/Report/HTML/Renderer/Dashboard.php @@ -102,7 +102,6 @@ protected function classComplexity(array $classes) $data[] = array( $class['coverage'], $class['ccn'], - 'blue', sprintf( '%s', $class['link'], diff --git a/PHP/CodeCoverage/Report/HTML/Renderer/Template/RGraph.bar.js b/PHP/CodeCoverage/Report/HTML/Renderer/Template/RGraph.bar.js deleted file mode 100644 index f0d8ae1ca..000000000 --- a/PHP/CodeCoverage/Report/HTML/Renderer/Template/RGraph.bar.js +++ /dev/null @@ -1,1922 +0,0 @@ - /** - * o------------------------------------------------------------------------------o - * | This file is part of the RGraph package - you can learn more at: | - * | | - * | http://www.rgraph.net | - * | | - * | This package is licensed under the RGraph license. For all kinds of business | - * | purposes there is a small one-time licensing fee to pay and for non | - * | commercial purposes it is free to use. You can read the full license here: | - * | | - * | http://www.rgraph.net/LICENSE.txt | - * o------------------------------------------------------------------------------o - */ - - if (typeof(RGraph) == 'undefined') RGraph = {}; - - /** - * The bar chart constructor - * - * @param object canvas The canvas object - * @param array data The chart data - */ - RGraph.Bar = function (id, data) - { - // Get the canvas and context objects - this.id = id; - this.canvas = document.getElementById(id); - this.context = this.canvas.getContext ? this.canvas.getContext("2d") : null; - this.canvas.__object__ = this; - this.type = 'bar'; - this.max = 0; - this.stackedOrGrouped = false; - this.isRGraph = true; - - /** - * Compatibility with older browsers - */ - RGraph.OldBrowserCompat(this.context); - - - // Various config type stuff - this.properties = { - 'chart.width': null, - 'chart.height': null, - 'chart.background.barcolor1': 'rgba(0,0,0,0)', - 'chart.background.barcolor2': 'rgba(0,0,0,0)', - 'chart.background.grid': true, - 'chart.background.grid.color': '#ddd', - 'chart.background.grid.width': 1, - 'chart.background.grid.hsize': 20, - 'chart.background.grid.vsize': 20, - 'chart.background.grid.vlines': true, - 'chart.background.grid.hlines': true, - 'chart.background.grid.border': true, - 'chart.background.grid.autofit':false, - 'chart.background.grid.autofit.numhlines': 7, - 'chart.background.grid.autofit.numvlines': 20, - 'chart.background.image': null, - 'chart.ytickgap': 20, - 'chart.smallyticks': 3, - 'chart.largeyticks': 5, - 'chart.numyticks': 10, - 'chart.hmargin': 5, - 'chart.strokecolor': '#666', - 'chart.axis.color': 'black', - 'chart.gutter.top': 25, - 'chart.gutter.bottom': 25, - 'chart.gutter.left': 25, - 'chart.gutter.right': 25, - 'chart.labels': null, - 'chart.labels.ingraph': null, - 'chart.labels.above': false, - 'chart.labels.above.decimals': 0, - 'chart.labels.above.size': null, - 'chart.labels.above.angle': null, - 'chart.ylabels': true, - 'chart.ylabels.count': 5, - 'chart.ylabels.inside': false, - 'chart.xlabels.offset': 0, - 'chart.xaxispos': 'bottom', - 'chart.yaxispos': 'left', - 'chart.text.color': 'black', - 'chart.text.size': 10, - 'chart.text.angle': 0, - 'chart.text.font': 'Verdana', - 'chart.ymax': null, - 'chart.title': '', - 'chart.title.background': null, - 'chart.title.hpos': null, - 'chart.title.vpos': null, - 'chart.title.xaxis': '', - 'chart.title.yaxis': '', - 'chart.title.xaxis.pos': 0.25, - 'chart.title.yaxis.pos': 0.25, - 'chart.colors': ['rgb(0,0,255)', '#0f0', '#00f', '#ff0', '#0ff', '#0f0'], - 'chart.colors.sequential': false, - 'chart.colors.reverse': false, - 'chart.grouping': 'grouped', - 'chart.variant': 'bar', - 'chart.shadow': false, - 'chart.shadow.color': '#666', - 'chart.shadow.offsetx': 3, - 'chart.shadow.offsety': 3, - 'chart.shadow.blur': 3, - 'chart.tooltips': null, - 'chart.tooltips.effect': 'fade', - 'chart.tooltips.css.class': 'RGraph_tooltip', - 'chart.tooltips.event': 'onclick', - 'chart.tooltips.highlight': true, - 'chart.highlight.stroke': 'black', - 'chart.highlight.fill': 'rgba(255,255,255,0.5)', - 'chart.background.hbars': null, - 'chart.key': [], - 'chart.key.background': 'white', - 'chart.key.position': 'graph', - 'chart.key.shadow': false, - 'chart.key.shadow.color': '#666', - 'chart.key.shadow.blur': 3, - 'chart.key.shadow.offsetx': 2, - 'chart.key.shadow.offsety': 2, - 'chart.key.position.gutter.boxed': true, - 'chart.key.position.x': null, - 'chart.key.position.y': null, - 'chart.key.halign': 'right', - 'chart.key.color.shape': 'square', - 'chart.key.rounded': true, - 'chart.key.text.size': 10, - 'chart.key.linewidth': 1, - 'chart.contextmenu': null, - 'chart.line': null, - 'chart.units.pre': '', - 'chart.units.post': '', - 'chart.scale.decimals': 0, - 'chart.scale.point': '.', - 'chart.scale.thousand': ',', - 'chart.crosshairs': false, - 'chart.crosshairs.color': '#333', - 'chart.linewidth': 1, - 'chart.annotatable': false, - 'chart.annotate.color': 'black', - 'chart.zoom.factor': 1.5, - 'chart.zoom.fade.in': true, - 'chart.zoom.fade.out': true, - 'chart.zoom.hdir': 'right', - 'chart.zoom.vdir': 'down', - 'chart.zoom.frames': 10, - 'chart.zoom.delay': 50, - 'chart.zoom.shadow': true, - 'chart.zoom.mode': 'canvas', - 'chart.zoom.thumbnail.width': 75, - 'chart.zoom.thumbnail.height': 75, - 'chart.zoom.background': true, - 'chart.resizable': false, - 'chart.resize.handle.adjust': [0,0], - 'chart.resize.handle.background': null, - 'chart.adjustable': false, - 'chart.noaxes': false, - 'chart.noxaxis': false, - 'chart.noyaxis': false - } - - // Check for support - if (!this.canvas) { - alert('[BAR] No canvas support'); - return; - } - - /** - * Determine whether the chart will contain stacked or grouped bars - */ - for (i=0; i 0) { - alert('[BAR] The data element with index ' + i + ' should be negative'); - } - } - } - } - - this.properties[name] = value; - } - - - /** - * A getter - * - * @param name string The name of the property to get - */ - RGraph.Bar.prototype.Get = function (name) - { - if (name == 'chart.labels.abovebar') { - name = 'chart.labels.above'; - } - - var value = this.properties[name]; - - return value; - } - - - /** - * The function you call to draw the bar chart - */ - RGraph.Bar.prototype.Draw = function () - { - // MUST be the first thing done! - if (typeof(this.Get('chart.background.image')) == 'string' && !this.__background_image__) { - RGraph.DrawBackgroundImage(this); - return; - } - - /** - * Fire the onbeforedraw event - */ - RGraph.FireCustomEvent(this, 'onbeforedraw'); - - /** - * Clear all of this canvases event handlers (the ones installed by RGraph) - */ - RGraph.ClearEventListeners(this.id); - - /** - * This is new in May 2011 and facilitates indiviual gutter settings, - * eg chart.gutter.left - */ - this.gutterLeft = this.Get('chart.gutter.left'); - this.gutterRight = this.Get('chart.gutter.right'); - this.gutterTop = this.Get('chart.gutter.top'); - this.gutterBottom = this.Get('chart.gutter.bottom'); - - /** - * Convert any null values to 0. Won't make any difference to the bar (as opposed to the line chart) - */ - for (var i=0; i 0) { - - alert('[BAR] (' + this.id + ') Sorry, tooltips are not supported with dot or pyramid charts'); - } - - /** - * Stop the coords array from growing uncontrollably - */ - this.coords = []; - - /** - * Work out a few things. They need to be here because they depend on things you can change before you - * call Draw() but after you instantiate the object - */ - this.max = 0; - this.grapharea = RGraph.GetHeight(this) - this.gutterTop - this.gutterBottom; - this.halfgrapharea = this.grapharea / 2; - this.halfTextHeight = this.Get('chart.text.size') / 2; - - // Progressively Draw the chart - RGraph.background.Draw(this); - - - //If it's a sketch chart variant, draw the axes first - if (this.Get('chart.variant') == 'sketch') { - this.DrawAxes(); - this.Drawbars(); - } else { - this.Drawbars(); - this.DrawAxes(); - } - - this.DrawLabels(); - - - // Draw the key if necessary - if (this.Get('chart.key').length) { - RGraph.DrawKey(this, this.Get('chart.key'), this.Get('chart.colors')); - } - - - /** - * Setup the context menu if required - */ - if (this.Get('chart.contextmenu')) { - RGraph.ShowContext(this); - } - - - /** - * Is a line is defined, draw it - */ - var line = this.Get('chart.line'); - - if (line) { - - line.__bar__ = this; - - // Check the X axis positions - if (this.Get('chart.xaxispos') != line.Get('chart.xaxispos')) { - alert("[BAR] Using different X axis positions when combining the Bar and Line is not advised"); - } - - line.Set('chart.gutter.left', this.Get('chart.gutter.left')); - line.Set('chart.gutter.right', this.Get('chart.gutter.right')); - line.Set('chart.gutter.top', this.Get('chart.gutter.top')); - line.Set('chart.gutter.bottom', this.Get('chart.gutter.bottom')); - - line.Set('chart.hmargin', (this.canvas.width - this.gutterLeft - this.gutterRight) / (line.original_data[0].length * 2)); - - // If a BAR custom yMax is set, use that - if (this.Get('chart.ymax') && !line.Get('chart.ymax')) { - line.Set('chart.ymax', this.Get('chart.ymax')); - - } else if (line.Get('chart.ymax')) { - line.Set('chart.ymax', line.Get('chart.ymax')); - } - - line.Draw(); - } - - - /** - * Draw "in graph" labels - */ - if (this.Get('chart.labels.ingraph')) { - RGraph.DrawInGraphLabels(this); - } - - /** - * Draw crosschairs - */ - if (this.Get('chart.crosshairs')) { - RGraph.DrawCrosshairs(this); - } - - /** - * If the canvas is annotatable, do install the event handlers - */ - if (this.Get('chart.annotatable')) { - RGraph.Annotate(this); - } - - /** - * This bit shows the mini zoom window if requested - */ - if (this.Get('chart.zoom.mode') == 'thumbnail' || this.Get('chart.zoom.mode') == 'area') { - RGraph.ShowZoomWindow(this); - } - - - /** - * This function enables resizing - */ - if (this.Get('chart.resizable')) { - RGraph.AllowResizing(this); - } - - - /** - * This function enables adjusting - */ - if (this.Get('chart.adjustable')) { - RGraph.AllowAdjusting(this); - } - - /** - * Fire the RGraph ondraw event - */ - RGraph.FireCustomEvent(this, 'ondraw'); - } - - - /** - * Draws the charts axes - */ - RGraph.Bar.prototype.DrawAxes = function () - { - if (this.Get('chart.noaxes')) { - return; - } - - var xaxispos = this.Get('chart.xaxispos'); - var yaxispos = this.Get('chart.yaxispos'); - - this.context.beginPath(); - this.context.strokeStyle = this.Get('chart.axis.color'); - this.context.lineWidth = 1; - - // Draw the Y axis - if (this.Get('chart.noyaxis') == false) { - if (yaxispos == 'right') { - this.context.moveTo(RGraph.GetWidth(this) - this.gutterRight, this.gutterTop); - this.context.lineTo(RGraph.GetWidth(this) - this.gutterRight, RGraph.GetHeight(this) - this.gutterBottom); - } else { - this.context.moveTo(this.gutterLeft, this.gutterTop); - this.context.lineTo(this.gutterLeft, RGraph.GetHeight(this) - this.gutterBottom); - } - } - - // Draw the X axis - if (this.Get('chart.noxaxis') == false) { - if (xaxispos == 'center') { - this.context.moveTo(this.gutterLeft, ((this.canvas.height - this.gutterTop - this.gutterBottom) / 2) + this.gutterTop); - this.context.lineTo(this.canvas.width - this.gutterRight, ((this.canvas.height - this.gutterTop - this.gutterBottom) / 2) + this.gutterTop); - } else if (xaxispos == 'top') { - this.context.moveTo(this.gutterLeft, this.gutterTop); - this.context.lineTo(this.canvas.width - this.gutterRight, this.gutterTop); - } else { - this.context.moveTo(this.gutterLeft, RGraph.GetHeight(this) - this.gutterBottom); - this.context.lineTo(RGraph.GetWidth(this) - this.gutterRight, RGraph.GetHeight(this) - this.gutterBottom); - } - } - - var numYTicks = this.Get('chart.numyticks'); - - // Draw the Y tickmarks - if (this.Get('chart.noyaxis') == false) { - var yTickGap = (RGraph.GetHeight(this) - this.gutterTop - this.gutterBottom) / numYTicks; - var xpos = yaxispos == 'left' ? this.gutterLeft : RGraph.GetWidth(this) - this.gutterRight; - - for (y=this.gutterTop; - xaxispos == 'center' ? y <= (RGraph.GetHeight(this) - this.gutterBottom) : y < (RGraph.GetHeight(this) - this.gutterBottom + (xaxispos == 'top' ? 1 : 0)); - y += yTickGap) { - - if (xaxispos == 'center' && y == (RGraph.GetHeight(this) / 2)) continue; - - // X axis at the top - if (xaxispos == 'top' && y == this.gutterTop) continue; - - this.context.moveTo(xpos, y); - this.context.lineTo(xpos + (yaxispos == 'left' ? -3 : 3), y); - } - - /** - * If the X axis is not being shown, draw an extra tick - */ - if (this.Get('chart.noxaxis')) { - if (xaxispos == 'center') { - this.context.moveTo(xpos + (yaxispos == 'left' ? -3 : 3), RGraph.GetHeight(this) / 2); - this.context.lineTo(xpos, RGraph.GetHeight(this) / 2); - } else if (xaxispos == 'top') { - this.context.moveTo(xpos + (yaxispos == 'left' ? -3 : 3), this.gutterTop); - this.context.lineTo(xpos, this.gutterTop); - } else { - this.context.moveTo(xpos + (yaxispos == 'left' ? -3 : 3), RGraph.GetHeight(this) - this.gutterBottom); - this.context.lineTo(xpos, RGraph.GetHeight(this) - this.gutterBottom); - } - } - } - - - // Draw the X tickmarks - if (this.Get('chart.noxaxis') == false) { - - xTickGap = (RGraph.GetWidth(this) - this.gutterLeft - this.gutterRight) / this.data.length; - - if (xaxispos == 'bottom') { - yStart = this.canvas.height - this.gutterBottom; - yEnd = (this.canvas.height - this.gutterBottom) + 3; - } else if (xaxispos == 'top') { - yStart = this.gutterTop - 3; - yEnd = this.gutterTop; - } else if (xaxispos == 'center') { - yStart = ((this.canvas.height - this.gutterTop - this.gutterBottom) / 2) + this.gutterTop + 3; - yEnd = ((this.canvas.height - this.gutterTop - this.gutterBottom) / 2) + this.gutterTop - 3; - } - - //////////////// X TICKS //////////////// - - var noEndXTick = this.Get('chart.noendxtick'); - - for (x=this.gutterLeft + (yaxispos == 'left' ? xTickGap : 0); x this.gutterLeft) { - this.context.moveTo(x, yStart); - this.context.lineTo(x, yEnd); - - } else if (yaxispos == 'left' && noEndXTick && x > this.gutterLeft && x < (this.canvas.width - this.gutterRight) ) { - this.context.moveTo(x, yStart); - this.context.lineTo(x, yEnd); - - } else if (yaxispos == 'right' && x < (this.canvas.width - this.gutterRight) && !noEndXTick) { - this.context.moveTo(x, yStart); - this.context.lineTo(x, yEnd); - - } else if (yaxispos == 'right' && x < (this.canvas.width - this.gutterRight) && x > (this.gutterLeft) && noEndXTick) { - this.context.moveTo(x, yStart); - this.context.lineTo(x, yEnd); - } - } - - if (this.Get('chart.noyaxis')) { - this.context.moveTo(this.gutterLeft, yStart); - this.context.lineTo(this.gutterLeft, yEnd); - } - - //////////////// X TICKS //////////////// - } - - /** - * If the Y axis is not being shown, draw an extra tick - */ - if (this.Get('chart.noyaxis') && this.Get('chart.noxaxis') == false) { - if (xaxispos == 'center') { - this.context.moveTo(this.gutterLeft, (RGraph.GetHeight(this) / 2) - 3); - this.context.lineTo(this.gutterLeft, (RGraph.GetHeight(this) / 2) + 3); - } else { - this.context.moveTo(this.gutterLeft, this.canvas.height - this.gutterBottom); - this.context.lineTo(this.gutterLeft, this.canvas.height - this.gutterBottom + 3); - } - } - - this.context.stroke(); - } - - - /** - * Draws the bars - */ - RGraph.Bar.prototype.Drawbars = function () - { - this.context.lineWidth = this.Get('chart.linewidth'); - this.context.strokeStyle = this.Get('chart.strokecolor'); - this.context.fillStyle = this.Get('chart.colors')[0]; - var prevX = 0; - var prevY = 0; - var decimals = this.Get('chart.scale.decimals'); - - /** - * Work out the max value - */ - if (this.Get('chart.ymax')) { - this.max = this.Get('chart.ymax'); - - this.scale = [ - (this.max * (1/5)).toFixed(decimals), - (this.max * (2/5)).toFixed(decimals), - (this.max * (3/5)).toFixed(decimals), - (this.max * (4/5)).toFixed(decimals), - this.max.toFixed(decimals) - ]; - } else { - for (i=0; i 0) { - RGraph.DrawBars(this); - } - - var variant = this.Get('chart.variant'); - - /** - * Draw the 3D axes is necessary - */ - if (variant == '3d') { - RGraph.Draw3DAxes(this); - } - - /** - * Get the variant once, and draw the bars, be they regular, stacked or grouped - */ - - // Get these variables outside of the loop - var xaxispos = this.Get('chart.xaxispos'); - var width = (RGraph.GetWidth(this) - this.gutterLeft - this.gutterRight ) / this.data.length; - var orig_height = height; - var hmargin = this.Get('chart.hmargin'); - var shadow = this.Get('chart.shadow'); - var shadowColor = this.Get('chart.shadow.color'); - var shadowBlur = this.Get('chart.shadow.blur'); - var shadowOffsetX = this.Get('chart.shadow.offsetx'); - var shadowOffsetY = this.Get('chart.shadow.offsety'); - var strokeStyle = this.Get('chart.strokecolor'); - var colors = this.Get('chart.colors'); - - for (i=0; i 0.4 ? -1 : 3) - (r * width),y - 1); - this.context.lineTo(x + hmargin + width - (r > 0.4 ? 1 : -1) - (r * width), y + height + (r == 0.2 ? 1 : -2)); - } - - this.context.stroke(); - - // Regular bar - } else if (variant == 'bar' || variant == '3d' || variant == 'glass' || variant == 'bevel') { - - if (RGraph.isIE8() && shadow) { - this.DrawIEShadow([x + hmargin, y, barWidth, height]); - } - - if (variant == 'glass') { - RGraph.filledCurvyRect(this.context, x + hmargin, y, barWidth, height, 3, this.data[i] > 0, this.data[i] > 0, this.data[i] < 0, this.data[i] < 0); - RGraph.strokedCurvyRect(this.context, x + hmargin, y, barWidth, height, 3, this.data[i] > 0, this.data[i] > 0, this.data[i] < 0, this.data[i] < 0); - } else { - this.context.strokeRect(x + hmargin, y, barWidth, height); - this.context.fillRect(x + hmargin, y, barWidth, height); - } - - - // This bit draws the text labels that appear above the bars if requested - if (this.Get('chart.labels.above')) { - - // Turn off any shadow - if (shadow) { - RGraph.NoShadow(this); - } - - var yPos = y - 3; - - // Account for negative bars - if (this.data[i] < 0) { - yPos += height + 6 + (this.Get('chart.text.size') - 4); - } - - // Account for chart.xaxispos=top - if (this.Get('chart.xaxispos') == 'top') { - yPos = this.gutterTop + height + 6 + (typeof(this.Get('chart.labels.above.size')) == 'number' ? this.Get('chart.labels.above.size') : this.Get('chart.text.size') - 4); - } - - this.context.fillStyle = this.Get('chart.text.color'); - - RGraph.Text(this.context, - this.Get('chart.text.font'), - typeof(this.Get('chart.labels.above.size')) == 'number' ? this.Get('chart.labels.above.size') : this.Get('chart.text.size') - 3, - x + hmargin + (barWidth / 2), - yPos, - RGraph.number_format(this, Number(this.data[i]).toFixed(this.Get('chart.labels.above.decimals')),this.Get('chart.units.pre'),this.Get('chart.units.post')), - this.Get('chart.labels.above.angle') ? 'bottom' : null, - this.Get('chart.labels.above.angle') ? (this.Get('chart.labels.above.angle') > 0 && (this.Get('chart.xaxispos') != 'top') ? 'right' : 'left') : 'center', - null, - this.Get('chart.labels.above.angle') - ); - } - - // 3D effect - if (variant == '3d') { - - var prevStrokeStyle = this.context.strokeStyle; - var prevFillStyle = this.context.fillStyle; - - // Draw the top - this.context.beginPath(); - this.context.moveTo(x + hmargin, y); - this.context.lineTo(x + hmargin + 10, y - 5); - this.context.lineTo(x + hmargin + 10 + barWidth, y - 5); - this.context.lineTo(x + hmargin + barWidth, y); - this.context.closePath(); - - this.context.stroke(); - this.context.fill(); - - // Draw the right hand side - this.context.beginPath(); - this.context.moveTo(x + hmargin + barWidth, y); - this.context.lineTo(x + hmargin + barWidth + 10, y - 5); - this.context.lineTo(x + hmargin + barWidth + 10, y + height - 5); - this.context.lineTo(x + hmargin + barWidth, y + height); - this.context.closePath(); - - this.context.stroke(); - this.context.fill(); - - // Draw the darker top section - this.context.beginPath(); - this.context.fillStyle = 'rgba(255,255,255,0.3)'; - this.context.moveTo(x + hmargin, y); - this.context.lineTo(x + hmargin + 10, y - 5); - this.context.lineTo(x + hmargin + 10 + barWidth, y - 5); - this.context.lineTo(x + hmargin + barWidth, y); - this.context.lineTo(x + hmargin, y); - this.context.closePath(); - - this.context.stroke(); - this.context.fill(); - - // Draw the darker right side section - this.context.beginPath(); - this.context.fillStyle = 'rgba(0,0,0,0.4)'; - this.context.moveTo(x + hmargin + barWidth, y); - this.context.lineTo(x + hmargin + barWidth + 10, y - 5); - this.context.lineTo(x + hmargin + barWidth + 10, y - 5 + height); - this.context.lineTo(x + hmargin + barWidth, y + height); - this.context.lineTo(x + hmargin + barWidth, y); - this.context.closePath(); - - this.context.stroke(); - this.context.fill(); - - this.context.strokeStyle = prevStrokeStyle; - this.context.fillStyle = prevFillStyle; - - // Glass variant - } else if (variant == 'glass') { - - var grad = this.context.createLinearGradient( - x + hmargin, - y, - x + hmargin + (barWidth / 2), - y - ); - grad.addColorStop(0, 'rgba(255,255,255,0.9)'); - grad.addColorStop(1, 'rgba(255,255,255,0.5)'); - - this.context.beginPath(); - this.context.fillStyle = grad; - this.context.fillRect(x + hmargin + 2,y + (this.data[i] > 0 ? 2 : 0),(barWidth / 2) - 2,height - 2); - this.context.fill(); - } - - // Dot chart - } else if (variant == 'dot') { - - this.context.beginPath(); - this.context.moveTo(x + (width / 2), y); - this.context.lineTo(x + (width / 2), y + height); - this.context.stroke(); - - this.context.beginPath(); - this.context.fillStyle = this.Get('chart.colors')[i]; - this.context.arc(x + (width / 2), y + (this.data[i] > 0 ? 0 : height), 2, 0, 6.28, 0); - - // Set the colour for the dots - this.context.fillStyle = this.Get('chart.colors')[0]; - - /** - * Sequential colors - */ - if (this.Get('chart.colors.sequential')) { - this.context.fillStyle = colors[i]; - } - - this.context.stroke(); - this.context.fill(); - - // Pyramid chart - } else if (variant == 'pyramid') { - - this.context.beginPath(); - var startY = (this.Get('chart.xaxispos') == 'center' ? (RGraph.GetHeight(this) / 2) : (RGraph.GetHeight(this) - this.gutterBottom)); - - this.context.moveTo(x + hmargin, startY); - this.context.lineTo( - x + hmargin + (barWidth / 2), - y + (this.Get('chart.xaxispos') == 'center' && (this.data[i] < 0) ? height : 0) - ); - this.context.lineTo(x + hmargin + barWidth, startY); - - this.context.closePath(); - - this.context.stroke(); - this.context.fill(); - - // Arrow chart - } else if (variant == 'arrow') { - - var startY = (this.Get('chart.xaxispos') == 'center' ? (RGraph.GetHeight(this) / 2) : (RGraph.GetHeight(this) - this.gutterBottom)); - - this.context.lineWidth = this.Get('chart.linewidth') ? this.Get('chart.linewidth') : 1; - this.context.lineCap = 'round'; - - this.context.beginPath(); - - this.context.moveTo(x + hmargin + (barWidth / 2), startY); - this.context.lineTo(x + hmargin + (barWidth / 2), y + (this.Get('chart.xaxispos') == 'center' && (this.data[i] < 0) ? height : 0)); - this.context.arc(x + hmargin + (barWidth / 2), - y + (this.Get('chart.xaxispos') == 'center' && (this.data[i] < 0) ? height : 0), - 5, - this.data[i] > 0 ? 0.78 : 5.6, - this.data[i] > 0 ? 0.79 : 5.48, - this.data[i] < 0); - - this.context.moveTo(x + hmargin + (barWidth / 2), y + (this.Get('chart.xaxispos') == 'center' && (this.data[i] < 0) ? height : 0)); - this.context.arc(x + hmargin + (barWidth / 2), - y + (this.Get('chart.xaxispos') == 'center' && (this.data[i] < 0) ? height : 0), - 5, - this.data[i] > 0 ? 2.355 : 4, - this.data[i] > 0 ? 2.4 : 3.925, - this.data[i] < 0); - - this.context.stroke(); - - this.context.lineWidth = 1; - - // Unknown variant type - } else { - alert('[BAR] Warning! Unknown chart.variant: ' + variant); - } - - this.coords.push([x + hmargin, y, width - (2 * hmargin), height]); - - - /** - * Stacked bar - */ - } else if (typeof(this.data[i]) == 'object' && this.Get('chart.grouping') == 'stacked') { - - var barWidth = width - (2 * hmargin); - var redrawCoords = [];// Necessary to draw if the shadow is enabled - var startY = 0; - - for (j=0; j 0 ? 'right' : 'left') : 'center',null,this.Get('chart.labels.above.angle')); - - // Turn any shadow back on - if (shadow) { - this.context.shadowColor = shadowColor; - this.context.shadowBlur = shadowBlur; - this.context.shadowOffsetX = shadowOffsetX; - this.context.shadowOffsetY = shadowOffsetY; - } - } - - - /** - * Redraw the bars if the shadow is enabled due to hem being drawn from the bottom up, and the - * shadow spilling over to higher up bars - */ - if (shadow) { - - RGraph.NoShadow(this); - - for (k=0; k 0 ? 'right' : 'left') : 'center', null, this.Get('chart.labels.above.angle')); - - // Turn any shadow back on - if (shadow) { - this.context.shadowColor = shadowColor; - this.context.shadowBlur = shadowBlur; - this.context.shadowOffsetX = shadowOffsetX; - this.context.shadowOffsetY = shadowOffsetY; - } - } - - /** - * Grouped 3D effect - */ - if (variant == '3d') { - var prevFillStyle = this.context.fillStyle; - var prevStrokeStyle = this.context.strokeStyle; - - // Draw the top side - this.context.beginPath(); - this.context.moveTo(startX, startY); - this.context.lineTo(startX + 10, startY - 5); - this.context.lineTo(startX + 10 + individualBarWidth, startY - 5); - this.context.lineTo(startX + individualBarWidth, startY); - this.context.closePath(); - - this.context.fill(); - this.context.stroke(); - - // Draw the side section - this.context.beginPath(); - this.context.moveTo(startX + individualBarWidth, startY); - this.context.lineTo(startX + individualBarWidth + 10, startY - 5); - this.context.lineTo(startX + individualBarWidth + 10, startY - 5 + height); - this.context.lineTo(startX + individualBarWidth , startY + height); - this.context.closePath(); - - this.context.fill(); - this.context.stroke(); - - - // Draw the darker top side - this.context.fillStyle = 'rgba(255,255,255,0.3)'; - this.context.beginPath(); - this.context.moveTo(startX, startY); - this.context.lineTo(startX + 10, startY - 5); - this.context.lineTo(startX + 10 + individualBarWidth, startY - 5); - this.context.lineTo(startX + individualBarWidth, startY); - this.context.closePath(); - - this.context.fill(); - this.context.stroke(); - - // Draw the darker side section - this.context.fillStyle = 'rgba(0,0,0,0.4)'; - this.context.beginPath(); - this.context.moveTo(startX + individualBarWidth, startY); - this.context.lineTo(startX + individualBarWidth + 10, startY - 5); - this.context.lineTo(startX + individualBarWidth + 10, startY - 5 + height); - this.context.lineTo(startX + individualBarWidth , startY + height); - this.context.closePath(); - - this.context.fill(); - this.context.stroke(); - - this.context.strokeStyle = prevStrokeStyle; - this.context.fillStyle = prevFillStyle; - } - - this.coords.push([startX, startY, individualBarWidth, height]); - - // Facilitate shadows going to the left - if (this.Get('chart.shadow')) { - redrawCoords.push([startX, startY, individualBarWidth, height]); - } - } - - /** - * Redraw the bar if shadows are going to the left - */ - if (redrawCoords.length) { - - RGraph.NoShadow(this); - - this.context.lineWidth = this.Get('chart.linewidth'); - - this.context.beginPath(); - for (var j=0; j 0) { - - /** - * Get the tooltip text - */ - if (typeof(obj.Get('chart.tooltips')) == 'function') { - var text = String(obj.Get('chart.tooltips')(barCoords[5])); - - } else if (typeof(obj.Get('chart.tooltips')) == 'object' && typeof(obj.Get('chart.tooltips')[barCoords[5]]) == 'function') { - var text = String(obj.Get('chart.tooltips')[barCoords[5]](barCoords[5])); - - } else if (typeof(obj.Get('chart.tooltips')) == 'object' && (typeof(obj.Get('chart.tooltips')[barCoords[5]]) == 'string' || typeof(obj.Get('chart.tooltips')[barCoords[5]]) == 'number')) { - var text = String(obj.Get('chart.tooltips')[barCoords[5]]); - - } else { - var text = null; - } - - if (text) { - canvas.style.cursor = 'pointer'; - } else { - canvas.style.cursor = 'default'; - } - - /** - * Hide the currently displayed tooltip if the index is the same - */ - if ( RGraph.Registry.Get('chart.tooltip') - && RGraph.Registry.Get('chart.tooltip').__canvas__.id != obj.id - && obj.Get('chart.tooltips.event') == 'onmousemove') { - - RGraph.Redraw(); - RGraph.HideTooltip(); - } - - /** - * This facilitates the tooltips using the onmousemove event - */ - - if ( obj.Get('chart.tooltips.event') == 'onmousemove' - && ( - (RGraph.Registry.Get('chart.tooltip') && RGraph.Registry.Get('chart.tooltip').__index__ != barCoords[5]) - || !RGraph.Registry.Get('chart.tooltip') - ) - && text) { - /** - * Show a tooltip if it's defined - */ - RGraph.Redraw(obj); - - if (obj.Get('chart.tooltips.highlight')) { - obj.context.beginPath(); - obj.context.strokeStyle = obj.Get('chart.highlight.stroke'); - obj.context.fillStyle = obj.Get('chart.highlight.fill'); - obj.context.strokeRect(barCoords[1], barCoords[2], barCoords[3], barCoords[4]); - obj.context.fillRect(barCoords[1], barCoords[2], barCoords[3], barCoords[4]); - - obj.context.stroke(); - obj.context.fill(); - } - - RGraph.Tooltip(canvas, text, e.pageX, e.pageY, barCoords[5]); - } - } else { - canvas.style.cursor = 'default'; - } - } - RGraph.AddEventListener(this.id, 'mousemove', canvas_onmousemove); - this.canvas.addEventListener('mousemove', canvas_onmousemove, false); - - - /** - * Install the onclick event handler for the tooltips - */ - if (this.Get('chart.tooltips.event') == 'onclick') { - - canvas_onclick = function (e) - { - var e = RGraph.FixEventObject(e); - - // If the button pressed isn't the left, we're not interested - if (e.button != 0) return; - - e = RGraph.FixEventObject(e); - - var canvas = document.getElementById(this.id); - var obj = canvas.__object__; - var barCoords = obj.getBar(e); - - /** - * Redraw the graph first, in effect resetting the graph to as it was when it was first drawn - * This "deselects" any already selected bar - */ - RGraph.Redraw(); - - /** - * Loop through the bars determining if the mouse is over a bar - */ - if (barCoords) { - - /** - * Get the tooltip text - */ - if (typeof(obj.Get('chart.tooltips')) == 'function') { - var text = String(obj.Get('chart.tooltips')(barCoords[5])); - - } else if (typeof(obj.Get('chart.tooltips')) == 'object' && typeof(obj.Get('chart.tooltips')[barCoords[5]]) == 'function') { - var text = String(obj.Get('chart.tooltips')[barCoords[5]](barCoords[5])); - - } else if (typeof(obj.Get('chart.tooltips')) == 'object') { - var text = String(obj.Get('chart.tooltips')[barCoords[5]]); - - } else { - var text = null; - } - - /** - * Show a tooltip if it's defined - */ - if (text && text != 'undefined') { - - if (obj.Get('chart.tooltips.highlight')) { - // [TODO] Allow customisation of the highlight colors - obj.context.beginPath(); - obj.context.strokeStyle = obj.Get('chart.highlight.stroke'); - obj.context.fillStyle = obj.Get('chart.highlight.fill'); - obj.context.strokeRect(barCoords[1], barCoords[2], barCoords[3], barCoords[4]); - obj.context.fillRect(barCoords[1], barCoords[2], barCoords[3], barCoords[4]); - - obj.context.stroke(); - obj.context.fill(); - } - - RGraph.Tooltip(canvas, text, e.pageX, e.pageY, barCoords[5]); - } - } - - /** - * Stop the event bubbling - */ - e.stopPropagation(); - } - RGraph.AddEventListener(this.id, 'click', canvas_onclick); - this.canvas.addEventListener('click', canvas_onclick, false); - } - - - // This resets the bar graph - // 8th August 2010 : Is this redundant - //if (typeof(obj) != 'undefined' && obj == RGraph.Registry.Get('chart.tooltip')) { - // obj.style.display = 'none'; - // RGraph.Registry.Set('chart.tooltip', null) - //} - } - } - - /** - * Draws the labels for the graph - */ - RGraph.Bar.prototype.DrawLabels = function () - { - var context = this.context; - var text_angle = this.Get('chart.text.angle'); - var text_size = this.Get('chart.text.size'); - var labels = this.Get('chart.labels'); - - - // Draw the Y axis labels: - if (this.Get('chart.ylabels')) { - this.Drawlabels_top(); - this.Drawlabels_center(); - this.Drawlabels_bottom(); - } - - /** - * The X axis labels - */ - if (typeof(labels) == 'object' && labels) { - - var yOffset = 13 + Number(this.Get('chart.xlabels.offset')); - - /** - * Text angle - */ - var angle = 0; - var halign = 'center'; - - if (text_angle > 0) { - angle = -1 * text_angle; - halign = 'right'; - yOffset -= 5; - - if (this.Get('chart.xaxispos') == 'top') { - halign = 'left'; - yOffset += 5; - } - } - - // Draw the X axis labels - context.fillStyle = this.Get('chart.text.color'); - - // How wide is each bar - var barWidth = (RGraph.GetWidth(this) - this.gutterRight - this.gutterLeft) / labels.length; - - // Reset the xTickGap - xTickGap = (RGraph.GetWidth(this) - this.gutterRight - this.gutterLeft) / labels.length - - // Draw the X tickmarks - var i=0; - var font = this.Get('chart.text.font'); - - for (x=this.gutterLeft + (xTickGap / 2); x<=RGraph.GetWidth(this) - this.gutterRight; x+=xTickGap) { - RGraph.Text(context, font, - text_size, - x + (this.Get('chart.text.angle') == 90 ? 0 : 0), - this.Get('chart.xaxispos') == 'top' ? this.gutterTop - yOffset + text_size - 1: (RGraph.GetHeight(this) - this.gutterBottom) + yOffset, - String(labels[i++]), - (this.Get('chart.text.angle') == 90 ? 'center' : null), - halign, - null, - angle); - } - } - } - - /** - * Draws the X axis at the top - */ - RGraph.Bar.prototype.Drawlabels_top = function () - { - this.context.beginPath(); - this.context.fillStyle = this.Get('chart.text.color'); - this.context.strokeStyle = 'black'; - - if (this.Get('chart.xaxispos') == 'top') { - - var context = this.context; - var interval = (this.grapharea * (1/5) ); - var text_size = this.Get('chart.text.size'); - var units_pre = this.Get('chart.units.pre'); - var units_post = this.Get('chart.units.post'); - var align = this.Get('chart.yaxispos') == 'left' ? 'right' : 'left'; - var font = this.Get('chart.text.font'); - var numYLabels = this.Get('chart.ylabels.count'); - - if (this.Get('chart.ylabels.inside') == true) { - var xpos = this.Get('chart.yaxispos') == 'left' ? this.gutterLeft + 5 : RGraph.GetWidth(this) - this.gutterRight - 5; - var align = this.Get('chart.yaxispos') == 'left' ? 'left' : 'right'; - var boxed = true; - } else { - var xpos = this.Get('chart.yaxispos') == 'left' ? this.gutterLeft - 5 : this.canvas.width - this.gutterRight + 5; - var boxed = false; - } - - /** - * Draw specific Y labels here so that the local variables can be reused - */ - if (typeof(this.Get('chart.ylabels.specific')) == 'object' && this.Get('chart.ylabels.specific')) { - - var labels = RGraph.array_reverse(this.Get('chart.ylabels.specific')); - var grapharea = RGraph.GetHeight(this) - this.gutterTop - this.gutterBottom; - - for (var i=0; i0; --i) { - RGraph.Text(context, font, text_size, xpos,this.gutterTop + ((this.grapharea / numYLabels) * i),'-' + RGraph.number_format(this,((this.scale[4] / numYLabels) * i).toFixed((this.Get('chart.scale.decimals'))), units_pre, units_post), 'center', align, boxed); - } - } - } - - this.context.fill(); - this.context.stroke(); - } - - /** - * Draws the X axis in the middle - */ - RGraph.Bar.prototype.Drawlabels_center = function () - { - var font = this.Get('chart.text.font'); - var numYLabels = this.Get('chart.ylabels.count'); - - this.context.fillStyle = this.Get('chart.text.color'); - - if (this.Get('chart.xaxispos') == 'center') { - - /** - * Draw the top labels - */ - var interval = (this.grapharea * (1/10) ); - var text_size = this.Get('chart.text.size'); - var units_pre = this.Get('chart.units.pre'); - var units_post = this.Get('chart.units.post'); - var context = this.context; - var align = ''; - var xpos = 0; - var boxed = false; - - this.context.fillStyle = this.Get('chart.text.color'); - this.context.strokeStyle = 'black'; - - if (this.Get('chart.ylabels.inside') == true) { - var xpos = this.Get('chart.yaxispos') == 'left' ? this.gutterLeft + 5 : RGraph.GetWidth(this) - this.gutterRight - 5; - var align = this.Get('chart.yaxispos') == 'left' ? 'left' : 'right'; - var boxed = true; - } else { - var xpos = this.Get('chart.yaxispos') == 'left' ? this.gutterLeft - 5 : RGraph.GetWidth(this) - this.gutterRight + 5; - var align = this.Get('chart.yaxispos') == 'left' ? 'right' : 'left'; - var boxed = false; - } - - - - - - - - - - - - - /** - * Draw specific Y labels here so that the local variables can be reused - */ - if (typeof(this.Get('chart.ylabels.specific')) == 'object' && this.Get('chart.ylabels.specific')) { - - var labels = this.Get('chart.ylabels.specific'); - var grapharea = this.canvas.height - this.gutterTop - this.gutterBottom; - - // Draw the top halves labels - for (var i=0; i=0; --i) { - var y = this.gutterTop + (grapharea * ( (i+1) / (labels.length * 2) )) + (grapharea / 2); - - RGraph.Text(context, font, text_size, xpos, y, labels[labels.length - i - 1], 'center', align, boxed); - } - - return; - } - - - - - - - - - - - - - if (numYLabels == 3 || numYLabels == 5) { - RGraph.Text(context, font, text_size, xpos, this.gutterTop + this.halfTextHeight, RGraph.number_format(this, this.scale[4], units_pre, units_post), null, align, boxed); - - if (numYLabels == 5) { - RGraph.Text(context, font, text_size, xpos, (1*interval) + this.gutterTop + this.halfTextHeight, RGraph.number_format(this, this.scale[3], units_pre, units_post), null, align, boxed); - RGraph.Text(context, font, text_size, xpos, (3*interval) + this.gutterTop + this.halfTextHeight, RGraph.number_format(this, this.scale[1], units_pre, units_post), null, align, boxed); - } - - if (numYLabels == 3 || numYLabels == 5) { - RGraph.Text(context, font, text_size, xpos, (4*interval) + this.gutterTop + this.halfTextHeight, RGraph.number_format(this, this.scale[0], units_pre, units_post), null, align, boxed); - RGraph.Text(context, font, text_size, xpos, (2*interval) + this.gutterTop + this.halfTextHeight, RGraph.number_format(this, this.scale[2], units_pre, units_post), null, align, boxed); - } - } else if (numYLabels == 10) { - // 10Y labels - interval = (this.grapharea / numYLabels) / 2; - - for (var i=0; i= left - && mouseX <= left + width - && mouseY >= top - && mouseY <= top + height) { - - return [obj, left, top, width, height, i]; - } - } - - return null; - } \ No newline at end of file diff --git a/PHP/CodeCoverage/Report/HTML/Renderer/Template/RGraph.common.core.js b/PHP/CodeCoverage/Report/HTML/Renderer/Template/RGraph.common.core.js deleted file mode 100644 index ddf92efdd..000000000 --- a/PHP/CodeCoverage/Report/HTML/Renderer/Template/RGraph.common.core.js +++ /dev/null @@ -1,2776 +0,0 @@ - /** - * o------------------------------------------------------------------------------o - * | This file is part of the RGraph package - you can learn more at: | - * | | - * | http://www.rgraph.net | - * | | - * | This package is licensed under the RGraph license. For all kinds of business | - * | purposes there is a small one-time licensing fee to pay and for non | - * | commercial purposes it is free to use. You can read the full license here: | - * | | - * | http://www.rgraph.net/LICENSE.txt | - * o------------------------------------------------------------------------------o - */ - - /** - * Initialise the various objects - */ - if (typeof(RGraph) == 'undefined') RGraph = {isRGraph:true,type:'common'}; - - - RGraph.Registry = {}; - RGraph.Registry.store = []; - RGraph.Registry.store['chart.event.handlers'] = []; - RGraph.background = {}; - RGraph.objects = []; - RGraph.Resizing = {}; - RGraph.events = []; - - - - /** - * Returns five values which are used as a nice scale - * - * @param max int The maximum value of the graph - * @param obj object The graph object - * @return array An appropriate scale - */ - RGraph.getScale = function (max, obj) - { - /** - * Special case for 0 - */ - if (max == 0) { - return ['0.2', '0.4', '0.6', '0.8', '1.0']; - } - - var original_max = max; - - /** - * Manually do decimals - */ - if (max <= 1) { - if (max > 0.5) { - return [0.2,0.4,0.6,0.8, Number(1).toFixed(1)]; - - } else if (max >= 0.1) { - return obj.Get('chart.scale.round') ? [0.2,0.4,0.6,0.8,1] : [0.1,0.2,0.3,0.4,0.5]; - - } else { - - var tmp = max; - var exp = 0; - - while (tmp < 1.01) { - exp += 1; - tmp *= 10; - } - - var ret = ['2e-' + exp, '4e-' + exp, '6e-' + exp, '8e-' + exp, '10e-' + exp]; - - - if (max <= ('5e-' + exp)) { - ret = ['1e-' + exp, '2e-' + exp, '3e-' + exp, '4e-' + exp, '5e-' + exp]; - } - - return ret; - } - } - - // Take off any decimals - if (String(max).indexOf('.') > 0) { - max = String(max).replace(/\.\d+$/, ''); - } - - var interval = Math.pow(10, Number(String(Number(max)).length - 1)); - var topValue = interval; - - while (topValue < max) { - topValue += (interval / 2); - } - - // Handles cases where the max is (for example) 50.5 - if (Number(original_max) > Number(topValue)) { - topValue += (interval / 2); - } - - // Custom if the max is greater than 5 and less than 10 - if (max < 10) { - topValue = (Number(original_max) <= 5 ? 5 : 10); - } - - /** - * Added 02/11/2010 to create "nicer" scales - */ - if (obj && typeof(obj.Get('chart.scale.round')) == 'boolean' && obj.Get('chart.scale.round')) { - topValue = 10 * interval; - } - - return [topValue * 0.2, topValue * 0.4, topValue * 0.6, topValue * 0.8, topValue]; - } - - - /** - * Returns the maximum numeric value which is in an array - * - * @param array arr The array (can also be a number, in which case it's returned as-is) - * @param int Whether to ignore signs (ie negative/positive) - * @return int The maximum value in the array - */ - RGraph.array_max = function (arr) - { - var max = null; - - if (typeof(arr) == 'number') { - return arr; - } - - for (var i=0; i ' + RGraph.pr(obj[i], true, indent + ' ') + '\n'; - } - - var str = str + indent + ')'; - break; - - case 'function': - str += obj; - break; - - case 'boolean': - str += 'Boolean: ' + (obj ? 'true' : 'false'); - break; - } - - /** - * Finished, now either return if we're in a recursed call, or alert() - * if we're not. - */ - if (arguments[1]) { - return str; - } else { - alert(str); - } - } - - - /** - * The RGraph registry Set() function - * - * @param string name The name of the key - * @param mixed value The value to set - * @return mixed Returns the same value as you pass it - */ - RGraph.Registry.Set = function (name, value) - { - // Store the setting - RGraph.Registry.store[name] = value; - - // Don't really need to do this, but ho-hum - return value; - } - - - /** - * The RGraph registry Get() function - * - * @param string name The name of the particular setting to fetch - * @return mixed The value if exists, null otherwise - */ - RGraph.Registry.Get = function (name) - { - //return RGraph.Registry.store[name] == null ? null : RGraph.Registry.store[name]; - return RGraph.Registry.store[name]; - } - - - /** - * This function draws the background for the bar chart, line chart and scatter chart. - * - * @param object obj The graph object - */ - RGraph.background.Draw = function (obj) - { - var canvas = obj.canvas; - var context = obj.context; - var height = 0; - var gutterLeft = obj.Get('chart.gutter.left'); - var gutterRight = obj.Get('chart.gutter.right'); - var gutterTop = obj.Get('chart.gutter.top'); - var gutterBottom = obj.Get('chart.gutter.bottom'); - var variant = obj.Get('chart.variant'); - - context.fillStyle = obj.Get('chart.text.color'); - - // If it's a bar and 3D variant, translate - if (variant == '3d') { - context.save(); - context.translate(10, -5); - } - - // X axis title - if (typeof(obj.Get('chart.title.xaxis')) == 'string' && obj.Get('chart.title.xaxis').length) { - - var size = obj.Get('chart.text.size'); - var font = obj.Get('chart.text.font'); - - context.beginPath(); - RGraph.Text(context, font, size + 2, RGraph.GetWidth(obj) / 2, RGraph.GetHeight(obj) - (gutterBottom * obj.Get('chart.title.xaxis.pos')), obj.Get('chart.title.xaxis'), 'center', 'center', false, false, false, true); - context.fill(); - } - - // Y axis title - if (typeof(obj.Get('chart.title.yaxis')) == 'string' && obj.Get('chart.title.yaxis').length) { - - var size = obj.Get('chart.text.size'); - var font = obj.Get('chart.text.font'); - var angle = 270; - var yaxis_title_pos = obj.Get('chart.title.yaxis.pos'); - - if (obj.Get('chart.title.yaxis.align') == 'right' || obj.Get('chart.title.yaxis.position') == 'right') { - angle = 90; - yaxis_title_pos = yaxis_title_pos * obj.Get('chart.gutter.right') + (obj.canvas.width - obj.Get('chart.gutter.right')); - } else { - yaxis_title_pos *= obj.Get('chart.gutter.left'); - } - - - context.beginPath(); - RGraph.Text(context, - font, - size + 2, - yaxis_title_pos, - RGraph.GetHeight(obj) / 2, - obj.Get('chart.title.yaxis'), - 'center', - 'center', - false, - angle, - false, - true); - context.fill(); - } - - obj.context.beginPath(); - - // Draw the horizontal bars - context.fillStyle = obj.Get('chart.background.barcolor1'); - height = (RGraph.GetHeight(obj) - gutterBottom); - - for (var i=gutterTop; i < height ; i+=80) { - obj.context.fillRect(gutterLeft, i, RGraph.GetWidth(obj) - gutterLeft - gutterRight, Math.min(40, RGraph.GetHeight(obj) - gutterBottom - i) ); - } - - context.fillStyle = obj.Get('chart.background.barcolor2'); - height = (RGraph.GetHeight(obj) - gutterBottom); - - for (var i= (40 + gutterTop); i < height; i+=80) { - obj.context.fillRect(gutterLeft, i, RGraph.GetWidth(obj) - gutterLeft - gutterRight, i + 40 > (RGraph.GetHeight(obj) - gutterBottom) ? RGraph.GetHeight(obj) - (gutterBottom + i) : 40); - } - - context.stroke(); - - - // Draw the background grid - if (obj.Get('chart.background.grid')) { - - // If autofit is specified, use the .numhlines and .numvlines along with the width to work - // out the hsize and vsize - if (obj.Get('chart.background.grid.autofit')) { - - /** - * Align the grid to the tickmarks - */ - if (obj.Get('chart.background.grid.autofit.align')) { - - // Align the horizontal lines - obj.Set('chart.background.grid.autofit.numhlines', obj.Get('chart.ylabels.count')); - - // Align the vertical lines for the line - if (obj.type == 'line') { - if (obj.Get('chart.labels') && obj.Get('chart.labels').length) { - obj.Set('chart.background.grid.autofit.numvlines', obj.Get('chart.labels').length - 1); - } else { - obj.Set('chart.background.grid.autofit.numvlines', obj.data[0].length - 1); - } - - // Align the vertical lines for the bar - } else if (obj.type == 'bar' && obj.Get('chart.labels') && obj.Get('chart.labels').length) { - obj.Set('chart.background.grid.autofit.numvlines', obj.Get('chart.labels').length); - } - } - - var vsize = ((RGraph.GetWidth(obj) - gutterLeft - gutterRight)) / obj.Get('chart.background.grid.autofit.numvlines'); - var hsize = (RGraph.GetHeight(obj) - gutterTop - gutterBottom) / obj.Get('chart.background.grid.autofit.numhlines'); - - obj.Set('chart.background.grid.vsize', vsize); - obj.Set('chart.background.grid.hsize', hsize); - } - - context.beginPath(); - context.lineWidth = obj.Get('chart.background.grid.width') ? obj.Get('chart.background.grid.width') : 1; - context.strokeStyle = obj.Get('chart.background.grid.color'); - - // Draw the horizontal lines - if (obj.Get('chart.background.grid.hlines')) { - height = (RGraph.GetHeight(obj) - gutterBottom) - for (y=gutterTop; y= 1) days += 31; - if (month >= 2) days += 28; - - // Leap years. Crude, but if this code is still being used - // when it stops working, then you have my permission to shoot - // me. Oh, you won't be able to - I'll be dead... - if (year >= 2008 && year % 4 == 0) days += 1; - - if (month >= 3) days += 31; - if (month >= 4) days += 30; - if (month >= 5) days += 31; - if (month >= 6) days += 30; - if (month >= 7) days += 31; - if (month >= 8) days += 31; - if (month >= 9) days += 30; - if (month >= 10) days += 31; - if (month >= 11) days += 30; - - return days; - } - - - - - - - - - - - - - - - - /** - * Draws the graph key (used by various graphs) - * - * @param object obj The graph object - * @param array key An array of the texts to be listed in the key - * @param colors An array of the colors to be used - */ - RGraph.DrawKey = function (obj, key, colors) - { - var canvas = obj.canvas; - var context = obj.context; - context.lineWidth = 1; - - context.beginPath(); - - /** - * Key positioned in the gutter - */ - var keypos = obj.Get('chart.key.position'); - var textsize = obj.Get('chart.text.size'); - - /** - * Change the older chart.key.vpos to chart.key.position.y - */ - if (typeof(obj.Get('chart.key.vpos')) == 'number') { - obj.Set('chart.key.position.y', obj.Get('chart.key.vpos') * this.Get('chart.gutter.top') ); - } - - /** - * Account for null values in the key - */ - var key_non_null = []; - var colors_non_null = []; - for (var i=0; i=0; i--) { - - var j = Number(i) + 1; - - // Draw the blob of color - if (obj.Get('chart.key.color.shape') == 'circle') { - context.beginPath(); - context.strokeStyle = 'rgba(0,0,0,0)'; - context.fillStyle = colors[i]; - context.arc(hpos + 5 + (blob_size / 2), vpos + (5 * j) + (text_size * j) - text_size + (blob_size / 2), blob_size / 2, 0, 6.26, 0); - context.fill(); - - } else if (obj.Get('chart.key.color.shape') == 'line') { - context.beginPath(); - context.strokeStyle = colors[i]; - context.moveTo(hpos + 5, vpos + (5 * j) + (text_size * j) - text_size + (blob_size / 2)); - context.lineTo(hpos + blob_size + 5, vpos + (5 * j) + (text_size * j) - text_size + (blob_size / 2)); - context.stroke(); - - } else { - context.fillStyle = colors[i]; - context.fillRect(hpos + 5, vpos + (5 * j) + (text_size * j) - text_size, text_size, text_size + 1); - } - - context.beginPath(); - - context.fillStyle = 'black'; - - RGraph.Text(context, - text_font, - text_size, - hpos + blob_size + 5 + 5, - vpos + (5 * j) + (text_size * j), - key[i]); - - if (obj.Get('chart.key.interactive')) { - - var px = hpos + 5; - var py = vpos + (5 * j) + (text_size * j) - text_size; - var pw = width - 5 - 5 - 5; - var ph = text_size; - - - obj.coordsKey.push([px, py, pw, ph]); - } - - } - context.fill(); - - /** - * Install the interactivity event handler - */ - if (obj.Get('chart.key.interactive')) { - - RGraph.Register(obj); - - var key_mousemove = function (e) - { - var obj = e.target.__object__; - var canvas = obj.canvas; - var context = obj.context; - var mouseCoords = RGraph.getMouseXY(e); - var mouseX = mouseCoords[0]; - var mouseY = mouseCoords[1]; - - for (var i=0; i px && mouseX < (px + pw) && mouseY > py && mouseY < (py + ph) ) { - - // Necessary? - //var index = obj.coordsKey.length - i - 1; - - canvas.style.cursor = 'pointer'; - - - - return; - } - - canvas.style.cursor = 'default'; - - if (typeof(obj.Get('chart.tooltips')) == 'object' && typeof(canvas_onmousemove_func) == 'function') { - canvas_onmousemove_func(e); - } - } - } - canvas.addEventListener('mousemove', key_mousemove, false); - RGraph.AddEventListener(canvas.id, 'mousemove', key_mousemove); - - - var key_click = function (e) - { - RGraph.Redraw(); - - var obj = e.target.__object__; - var canvas = obj.canvas; - var context = obj.context; - var mouseCoords = RGraph.getMouseXY(e); - var mouseX = mouseCoords[0]; - var mouseY = mouseCoords[1]; - - RGraph.DrawKey(obj, obj.Get('chart.key'), obj.Get('chart.colors')); - - for (var i=0; i px && mouseX < (px + pw) && mouseY > py && mouseY < (py + ph) ) { - - var index = obj.coordsKey.length - i - 1; - - // HIGHLIGHT THE LINE HERE - context.beginPath(); - context.fillStyle = 'rgba(255,255,255,0.9)'; - context.fillRect(obj.Get('chart.gutter.left'),obj.Get('chart.gutter.top'),canvas.width - obj.Get('chart.gutter.left') - obj.Get('chart.gutter.right'),canvas.height - obj.Get('chart.gutter.top') - obj.Get('chart.gutter.bottom')); - context.fill(); - - context.beginPath(); - context.strokeStyle = obj.Get('chart.colors')[index]; - context.lineWidth = obj.Get('chart.linewidth'); - for (var j=0; j=0; i--) { - newarr.push(arr[i]); - } - - return newarr; - } - - - /** - * Formats a number with thousand seperators so it's easier to read - * - * @param integer num The number to format - * @param string The (optional) string to prepend to the string - * @param string The (optional) string to ap - * pend to the string - * @return string The formatted number - */ - RGraph.number_format = function (obj, num) - { - var i; - var prepend = arguments[2] ? String(arguments[2]) : ''; - var append = arguments[3] ? String(arguments[3]) : ''; - var output = ''; - var decimal = ''; - var decimal_seperator = obj.Get('chart.scale.point') ? obj.Get('chart.scale.point') : '.'; - var thousand_seperator = obj.Get('chart.scale.thousand') ? obj.Get('chart.scale.thousand') : ','; - RegExp.$1 = ''; - var i,j; - -if (typeof(obj.Get('chart.scale.formatter')) == 'function') { - return obj.Get('chart.scale.formatter')(obj, num); -} - - // Ignore the preformatted version of "1e-2" - if (String(num).indexOf('e') > 0) { - return String(prepend + String(num) + append); - } - - // We need then number as a string - num = String(num); - - // Take off the decimal part - we re-append it later - if (num.indexOf('.') > 0) { - num = num.replace(/\.(.*)/, ''); - decimal = RegExp.$1; - } - - // Thousand seperator - //var seperator = arguments[1] ? String(arguments[1]) : ','; - var seperator = thousand_seperator; - - /** - * Work backwards adding the thousand seperators - */ - var foundPoint; - for (i=(num.length - 1),j=0; i>=0; j++,i--) { - var character = num.charAt(i); - - if ( j % 3 == 0 && j != 0) { - output += seperator; - } - - /** - * Build the output - */ - output += character; - } - - /** - * Now need to reverse the string - */ - var rev = output; - output = ''; - for (i=(rev.length - 1); i>=0; i--) { - output += rev.charAt(i); - } - - // Tidy up - output = output.replace(/^-,/, '-'); - - // Reappend the decimal - if (decimal.length) { - output = output + decimal_seperator + decimal; - decimal = ''; - RegExp.$1 = ''; - } - - // Minor bugette - if (output.charAt(0) == '-') { - output = output.replace(/-/, ''); - prepend = '-' + prepend; - } - - return prepend + output + append; - } - - - /** - * Draws horizontal coloured bars on something like the bar, line or scatter - */ - RGraph.DrawBars = function (obj) - { - var hbars = obj.Get('chart.background.hbars'); - - /** - * Draws a horizontal bar - */ - obj.context.beginPath(); - - for (i=0; i obj.max) { - hbars[i][1] = obj.max - hbars[i][0]; - } - - - // If height is negative, and the abs() value is greater than .max, use a negative max instead - if (Math.abs(hbars[i][1]) > obj.max) { - hbars[i][1] = -1 * obj.max; - } - - - // If start point is greater than max, change it to max - if (Math.abs(hbars[i][0]) > obj.max) { - hbars[i][0] = obj.max; - } - - // If start point plus height is less than negative max, use the negative max plus the start point - if (hbars[i][0] + hbars[i][1] < (-1 * obj.max) ) { - hbars[i][1] = -1 * (obj.max + hbars[i][0]); - } - - // If the X axis is at the bottom, and a negative max is given, warn the user - if (obj.Get('chart.xaxispos') == 'bottom' && (hbars[i][0] < 0 || (hbars[i][1] + hbars[i][1] < 0)) ) { - alert('[' + obj.type.toUpperCase() + ' (ID: ' + obj.id + ') BACKGROUND HBARS] You have a negative value in one of your background hbars values, whilst the X axis is in the center'); - } - - var ystart = (obj.grapharea - ((hbars[i][0] / obj.max) * obj.grapharea)); - var height = (Math.min(hbars[i][1], obj.max - hbars[i][0]) / obj.max) * obj.grapharea; - - // Account for the X axis being in the center - if (obj.Get('chart.xaxispos') == 'center') { - ystart /= 2; - height /= 2; - } - - ystart += obj.Get('chart.gutter.top') - - var x = obj.Get('chart.gutter.left'); - var y = ystart - height; - var w = obj.canvas.width - obj.Get('chart.gutter.left') - obj.Get('chart.gutter.right'); - var h = height; - - // Accommodate Opera :-/ - if (navigator.userAgent.indexOf('Opera') != -1 && obj.Get('chart.xaxispos') == 'center' && h < 0) { - h *= -1; - y = y - h; - } - - /** - * Account for X axis at the top - */ - if (obj.Get('chart.xaxispos') == 'top') { - y = obj.canvas.height - y; - h *= -1; - } - - obj.context.fillStyle = hbars[i][2]; - obj.context.fillRect(x, y, w, h); - } - - obj.context.fill(); - } - - - /** - * Draws in-graph labels. - * - * @param object obj The graph object - */ - RGraph.DrawInGraphLabels = function (obj) - { - var canvas = obj.canvas; - var context = obj.context; - var labels = obj.Get('chart.labels.ingraph'); - var labels_processed = []; - - // Defaults - var fgcolor = 'black'; - var bgcolor = 'white'; - var direction = 1; - - if (!labels) { - return; - } - - /** - * Preprocess the labels array. Numbers are expanded - */ - for (var i=0; i 0) { - - for (var i=0; i 0) { - var x = (obj.type == 'bar' ? coords[0] + (coords[2] / 2) : coords[0]); - var y = (obj.type == 'bar' ? coords[1] + (coords[3] / 2) : coords[1]); - var length = typeof(labels_processed[i][4]) == 'number' ? labels_processed[i][4] : 25; - - - context.beginPath(); - context.fillStyle = 'black'; - context.strokeStyle = 'black'; - - - if (obj.type == 'bar') { - - /** - * X axis at the top - */ - if (obj.Get('chart.xaxispos') == 'top') { - length *= -1; - } - - if (obj.Get('chart.variant') == 'dot') { - context.moveTo(x, obj.coords[i][1] - 5); - context.lineTo(x, obj.coords[i][1] - 5 - length); - - var text_x = x; - var text_y = obj.coords[i][1] - 5 - length; - - } else if (obj.Get('chart.variant') == 'arrow') { - context.moveTo(x, obj.coords[i][1] - 5); - context.lineTo(x, obj.coords[i][1] - 5 - length); - - var text_x = x; - var text_y = obj.coords[i][1] - 5 - length; - - } else { - - context.arc(x, y, 2.5, 0, 6.28, 0); - context.moveTo(x, y); - context.lineTo(x, y - length); - - var text_x = x; - var text_y = y - length; - } - - context.stroke(); - context.fill(); - - - } else if (obj.type == 'line') { - - if ( - typeof(labels_processed[i]) == 'object' && - typeof(labels_processed[i][3]) == 'number' && - labels_processed[i][3] == -1 - ) { - - context.moveTo(x, y + 5); - context.lineTo(x, y + 5 + length); - - context.stroke(); - context.beginPath(); - - // This draws the arrow - context.moveTo(x, y + 5); - context.lineTo(x - 3, y + 10); - context.lineTo(x + 3, y + 10); - context.closePath(); - - var text_x = x; - var text_y = y + 5 + length; - - } else { - - var text_x = x; - var text_y = y - 5 - length; - - context.moveTo(x, y - 5); - context.lineTo(x, y - 5 - length); - - context.stroke(); - context.beginPath(); - - // This draws the arrow - context.moveTo(x, y - 5); - context.lineTo(x - 3, y - 10); - context.lineTo(x + 3, y - 10); - context.closePath(); - } - - context.fill(); - } - - // Taken out on the 10th Nov 2010 - unnecessary - //var width = context.measureText(labels[i]).width; - - context.beginPath(); - - // Fore ground color - context.fillStyle = (typeof(labels_processed[i]) == 'object' && typeof(labels_processed[i][1]) == 'string') ? labels_processed[i][1] : 'black'; - - RGraph.Text(context, - obj.Get('chart.text.font'), - obj.Get('chart.text.size'), - text_x, - text_y, - (typeof(labels_processed[i]) == 'object' && typeof(labels_processed[i][0]) == 'string') ? labels_processed[i][0] : labels_processed[i], - 'bottom', - 'center', - true, - null, - (typeof(labels_processed[i]) == 'object' && typeof(labels_processed[i][2]) == 'string') ? labels_processed[i][2] : 'white'); - context.fill(); - } - } - } - } - } - - - /** - * This function "fills in" key missing properties that various implementations lack - * - * @param object e The event object - */ - RGraph.FixEventObject = function (e) - { - if (RGraph.isIE8()) { - - var e = event; - - e.pageX = (event.clientX + document.body.scrollLeft); - e.pageY = (event.clientY + document.body.scrollTop); - e.target = event.srcElement; - - if (!document.body.scrollTop && document.documentElement.scrollTop) { - e.pageX += parseInt(document.documentElement.scrollLeft); - e.pageY += parseInt(document.documentElement.scrollTop); - } - } - - // This is mainly for FF which doesn't provide offsetX - if (typeof(e.offsetX) == 'undefined' && typeof(e.offsetY) == 'undefined') { - var coords = RGraph.getMouseXY(e); - e.offsetX = coords[0]; - e.offsetY = coords[1]; - } - - // Any browser that doesn't implement stopPropagation() (MSIE) - if (!e.stopPropagation) { - e.stopPropagation = function () {window.event.cancelBubble = true;} - } - - return e; - } - - - /** - * Draw crosshairs if enabled - * - * @param object obj The graph object (from which we can get the context and canvas as required) - */ - RGraph.DrawCrosshairs = function (obj) - { - if (obj.Get('chart.crosshairs')) { - var canvas = obj.canvas; - var context = obj.context; - - // 5th November 2010 - removed now that tooltips are DOM2 based. - //if (obj.Get('chart.tooltips') && obj.Get('chart.tooltips').length > 0) { - //alert('[' + obj.type.toUpperCase() + '] Sorry - you cannot have crosshairs enabled with tooltips! Turning off crosshairs...'); - //obj.Set('chart.crosshairs', false); - //return; - //} - - canvas.onmousemove = function (e) - { - var e = RGraph.FixEventObject(e); - var canvas = obj.canvas; - var context = obj.context; - var width = canvas.width; - var height = canvas.height; - var adjustments = obj.Get('chart.tooltips.coords.adjust'); - - var gutterLeft = obj.Get('chart.gutter.left'); - var gutterRight = obj.Get('chart.gutter.right'); - var gutterTop = obj.Get('chart.gutter.top'); - var gutterBottom = obj.Get('chart.gutter.bottom'); - - var mouseCoords = RGraph.getMouseXY(e); - var x = mouseCoords[0]; - var y = mouseCoords[1]; - - if (typeof(adjustments) == 'object' && adjustments[0] && adjustments[1]) { - x = x - adjustments[0]; - y = y - adjustments[1]; - } - - RGraph.Clear(canvas); - obj.Draw(); - - if ( x >= gutterLeft - && y >= gutterTop - && x <= (width - gutterRight) - && y <= (height - gutterBottom) - ) { - - var linewidth = obj.Get('chart.crosshairs.linewidth'); - context.lineWidth = linewidth ? linewidth : 1; - - context.beginPath(); - context.strokeStyle = obj.Get('chart.crosshairs.color'); - - // Draw a top vertical line - context.moveTo(x, gutterTop); - context.lineTo(x, height - gutterBottom); - - // Draw a horizontal line - context.moveTo(gutterLeft, y); - context.lineTo(width - gutterRight, y); - - context.stroke(); - - /** - * Need to show the coords? - */ - if (obj.Get('chart.crosshairs.coords')) { - if (obj.type == 'scatter') { - - var xCoord = (((x - obj.Get('chart.gutter.left')) / (obj.canvas.width - gutterLeft - gutterRight)) * (obj.Get('chart.xmax') - obj.Get('chart.xmin'))) + obj.Get('chart.xmin'); - xCoord = xCoord.toFixed(obj.Get('chart.scale.decimals')); - var yCoord = obj.max - (((y - obj.Get('chart.gutter.top')) / (obj.canvas.height - gutterTop - gutterBottom)) * obj.max); - - if (obj.type == 'scatter' && obj.Get('chart.xaxispos') == 'center') { - yCoord = (yCoord - (obj.max / 2)) * 2; - } - - yCoord = yCoord.toFixed(obj.Get('chart.scale.decimals')); - var div = RGraph.Registry.Get('chart.coordinates.coords.div'); - var mouseCoords = RGraph.getMouseXY(e); - var canvasXY = RGraph.getCanvasXY(canvas); - - if (!div) { - - div = document.createElement('DIV'); - div.__object__ = obj; - div.style.position = 'absolute'; - div.style.backgroundColor = 'white'; - div.style.border = '1px solid black'; - div.style.fontFamily = 'Arial, Verdana, sans-serif'; - div.style.fontSize = '10pt' - div.style.padding = '2px'; - div.style.opacity = 1; - div.style.WebkitBorderRadius = '3px'; - div.style.borderRadius = '3px'; - div.style.MozBorderRadius = '3px'; - document.body.appendChild(div); - - RGraph.Registry.Set('chart.coordinates.coords.div', div); - } - - // Convert the X/Y pixel coords to correspond to the scale - - div.style.opacity = 1; - div.style.display = 'inline'; - - if (!obj.Get('chart.crosshairs.coords.fixed')) { - div.style.left = Math.max(2, (e.pageX - div.offsetWidth - 3)) + 'px'; - div.style.top = Math.max(2, (e.pageY - div.offsetHeight - 3)) + 'px'; - } else { - div.style.left = canvasXY[0] + gutterLeft + 3 + 'px'; - div.style.top = canvasXY[1] + gutterTop + 3 + 'px'; - } - - div.innerHTML = '' + obj.Get('chart.crosshairs.coords.labels.x') + ': ' + xCoord + '
' + obj.Get('chart.crosshairs.coords.labels.y') + ': ' + yCoord; - - canvas.addEventListener('mouseout', RGraph.HideCrosshairCoords, false); - - } else { - alert('[RGRAPH] Showing crosshair coordinates is only supported on the Scatter chart'); - } - } - } else { - RGraph.HideCrosshairCoords(); - } - } - } - } - - /** - * Thisz function hides the crosshairs coordinates - */ - RGraph.HideCrosshairCoords = function () - { - var div = RGraph.Registry.Get('chart.coordinates.coords.div'); - - if ( div - && div.style.opacity == 1 - && div.__object__.Get('chart.crosshairs.coords.fadeout') - ) { - setTimeout(function() {RGraph.Registry.Get('chart.coordinates.coords.div').style.opacity = 0.9;}, 50); - setTimeout(function() {RGraph.Registry.Get('chart.coordinates.coords.div').style.opacity = 0.8;}, 100); - setTimeout(function() {RGraph.Registry.Get('chart.coordinates.coords.div').style.opacity = 0.7;}, 150); - setTimeout(function() {RGraph.Registry.Get('chart.coordinates.coords.div').style.opacity = 0.6;}, 200); - setTimeout(function() {RGraph.Registry.Get('chart.coordinates.coords.div').style.opacity = 0.5;}, 250); - setTimeout(function() {RGraph.Registry.Get('chart.coordinates.coords.div').style.opacity = 0.4;}, 300); - setTimeout(function() {RGraph.Registry.Get('chart.coordinates.coords.div').style.opacity = 0.3;}, 350); - setTimeout(function() {RGraph.Registry.Get('chart.coordinates.coords.div').style.opacity = 0.2;}, 400); - setTimeout(function() {RGraph.Registry.Get('chart.coordinates.coords.div').style.opacity = 0.1;}, 450); - setTimeout(function() {RGraph.Registry.Get('chart.coordinates.coords.div').style.opacity = 0;}, 500); - setTimeout(function() {RGraph.Registry.Get('chart.coordinates.coords.div').style.display = 'none';}, 550); - } - } - - - /** - * Trims the right hand side of a string. Removes SPACE, TAB - * CR and LF. - * - * @param string str The string to trim - */ - RGraph.rtrim = function (str) - { - return str.replace(/( |\n|\r|\t)+$/, ''); - } - - - /** - * Draws the3D axes/background - */ - RGraph.Draw3DAxes = function (obj) - { - var gutterLeft = obj.Get('chart.gutter.left'); - var gutterRight = obj.Get('chart.gutter.right'); - var gutterTop = obj.Get('chart.gutter.top'); - var gutterBottom = obj.Get('chart.gutter.bottom'); - - var context = obj.context; - var canvas = obj.canvas; - - context.strokeStyle = '#aaa'; - context.fillStyle = '#ddd'; - - // Draw the vertical left side - context.beginPath(); - context.moveTo(gutterLeft, gutterTop); - context.lineTo(gutterLeft + 10, gutterTop - 5); - context.lineTo(gutterLeft + 10, canvas.height - gutterBottom - 5); - context.lineTo(gutterLeft, canvas.height - gutterBottom); - context.closePath(); - - context.stroke(); - context.fill(); - - // Draw the bottom floor - context.beginPath(); - context.moveTo(gutterLeft, canvas.height - gutterBottom); - context.lineTo(gutterLeft + 10, canvas.height - gutterBottom - 5); - context.lineTo(canvas.width - gutterRight + 10, canvas.height - gutterBottom - 5); - context.lineTo(canvas.width - gutterRight, canvas.height - gutterBottom); - context.closePath(); - - context.stroke(); - context.fill(); - } - - /** - * Turns off any shadow - * - * @param object obj The graph object - */ - RGraph.NoShadow = function (obj) - { - obj.context.shadowColor = 'rgba(0,0,0,0)'; - obj.context.shadowBlur = 0; - obj.context.shadowOffsetX = 0; - obj.context.shadowOffsetY = 0; - } - - - /** - * Sets the four shadow properties - a shortcut function - * - * @param object obj Your graph object - * @param string color The shadow color - * @param number offsetx The shadows X offset - * @param number offsety The shadows Y offset - * @param number blur The blurring effect applied to the shadow - */ - RGraph.SetShadow = function (obj, color, offsetx, offsety, blur) - { - obj.context.shadowColor = color; - obj.context.shadowOffsetX = offsetx; - obj.context.shadowOffsetY = offsety; - obj.context.shadowBlur = blur; - } - - - /** - * This function attempts to "fill in" missing functions from the canvas - * context object. Only two at the moment - measureText() nd fillText(). - * - * @param object context The canvas 2D context - */ - RGraph.OldBrowserCompat = function (context) - { - if (!context.measureText) { - - // This emulates the measureText() function - context.measureText = function (text) - { - var textObj = document.createElement('DIV'); - textObj.innerHTML = text; - textObj.style.backgroundColor = 'white'; - textObj.style.position = 'absolute'; - textObj.style.top = -100 - textObj.style.left = 0; - document.body.appendChild(textObj); - - var width = {width: textObj.offsetWidth}; - - textObj.style.display = 'none'; - - return width; - } - } - - if (!context.fillText) { - // This emulates the fillText() method - context.fillText = function (text, targetX, targetY) - { - return false; - } - } - - // If IE8, add addEventListener() - if (!context.canvas.addEventListener) { - window.addEventListener = function (ev, func, bubble) - { - return this.attachEvent('on' + ev, func); - } - - context.canvas.addEventListener = function (ev, func, bubble) - { - return this.attachEvent('on' + ev, func); - } - } - } - - - - /** - * This is a function that can be used to run code asynchronously, which can - * be used to speed up the loading of you pages. - * - * @param string func This is the code to run. It can also be a function pointer. - * The front page graphs show this function in action. Basically - * each graphs code is made in a function, and that function is - * passed to this function to run asychronously. - */ - RGraph.Async = function (func) - { - return setTimeout(func, arguments[1] ? arguments[1] : 1); - } - - - /** - * A custom random number function - * - * @param number min The minimum that the number should be - * @param number max The maximum that the number should be - * @param number How many decimal places there should be. Default for this is 0 - */ - RGraph.random = function (min, max) - { - var dp = arguments[2] ? arguments[2] : 0; - var r = Math.random(); - - return Number((((max - min) * r) + min).toFixed(dp)); - } - - - /** - * Draws a rectangle with curvy corners - * - * @param context object The context - * @param x number The X coordinate (top left of the square) - * @param y number The Y coordinate (top left of the square) - * @param w number The width of the rectangle - * @param h number The height of the rectangle - * @param number The radius of the curved corners - * @param boolean Whether the top left corner is curvy - * @param boolean Whether the top right corner is curvy - * @param boolean Whether the bottom right corner is curvy - * @param boolean Whether the bottom left corner is curvy - */ - RGraph.strokedCurvyRect = function (context, x, y, w, h) - { - // The corner radius - var r = arguments[5] ? arguments[5] : 3; - - // The corners - var corner_tl = (arguments[6] || arguments[6] == null) ? true : false; - var corner_tr = (arguments[7] || arguments[7] == null) ? true : false; - var corner_br = (arguments[8] || arguments[8] == null) ? true : false; - var corner_bl = (arguments[9] || arguments[9] == null) ? true : false; - - context.beginPath(); - - // Top left side - context.moveTo(x + (corner_tl ? r : 0), y); - context.lineTo(x + w - (corner_tr ? r : 0), y); - - // Top right corner - if (corner_tr) { - context.arc(x + w - r, y + r, r, Math.PI * 1.5, Math.PI * 2, false); - } - - // Top right side - context.lineTo(x + w, y + h - (corner_br ? r : 0) ); - - // Bottom right corner - if (corner_br) { - context.arc(x + w - r, y - r + h, r, Math.PI * 2, Math.PI * 0.5, false); - } - - // Bottom right side - context.lineTo(x + (corner_bl ? r : 0), y + h); - - // Bottom left corner - if (corner_bl) { - context.arc(x + r, y - r + h, r, Math.PI * 0.5, Math.PI, false); - } - - // Bottom left side - context.lineTo(x, y + (corner_tl ? r : 0) ); - - // Top left corner - if (corner_tl) { - context.arc(x + r, y + r, r, Math.PI, Math.PI * 1.5, false); - } - - context.stroke(); - } - - - /** - * Draws a filled rectangle with curvy corners - * - * @param context object The context - * @param x number The X coordinate (top left of the square) - * @param y number The Y coordinate (top left of the square) - * @param w number The width of the rectangle - * @param h number The height of the rectangle - * @param number The radius of the curved corners - * @param boolean Whether the top left corner is curvy - * @param boolean Whether the top right corner is curvy - * @param boolean Whether the bottom right corner is curvy - * @param boolean Whether the bottom left corner is curvy - */ - RGraph.filledCurvyRect = function (context, x, y, w, h) - { - // The corner radius - var r = arguments[5] ? arguments[5] : 3; - - // The corners - var corner_tl = (arguments[6] || arguments[6] == null) ? true : false; - var corner_tr = (arguments[7] || arguments[7] == null) ? true : false; - var corner_br = (arguments[8] || arguments[8] == null) ? true : false; - var corner_bl = (arguments[9] || arguments[9] == null) ? true : false; - - context.beginPath(); - - // First draw the corners - - // Top left corner - if (corner_tl) { - context.moveTo(x + r, y + r); - context.arc(x + r, y + r, r, Math.PI, 1.5 * Math.PI, false); - } else { - context.fillRect(x, y, r, r); - } - - // Top right corner - if (corner_tr) { - context.moveTo(x + w - r, y + r); - context.arc(x + w - r, y + r, r, 1.5 * Math.PI, 0, false); - } else { - context.moveTo(x + w - r, y); - context.fillRect(x + w - r, y, r, r); - } - - - // Bottom right corner - if (corner_br) { - context.moveTo(x + w - r, y + h - r); - context.arc(x + w - r, y - r + h, r, 0, Math.PI / 2, false); - } else { - context.moveTo(x + w - r, y + h - r); - context.fillRect(x + w - r, y + h - r, r, r); - } - - // Bottom left corner - if (corner_bl) { - context.moveTo(x + r, y + h - r); - context.arc(x + r, y - r + h, r, Math.PI / 2, Math.PI, false); - } else { - context.moveTo(x, y + h - r); - context.fillRect(x, y + h - r, r, r); - } - - // Now fill it in - context.fillRect(x + r, y, w - r - r, h); - context.fillRect(x, y + r, r + 1, h - r - r); - context.fillRect(x + w - r - 1, y + r, r + 1, h - r - r); - - context.fill(); - } - - - /** - * A crude timing function - * - * @param string label The label to use for the time - */ - RGraph.Timer = function (label) - { - var d = new Date(); - - // This uses the Firebug console - console.log(label + ': ' + d.getSeconds() + '.' + d.getMilliseconds()); - } - - - /** - * Hides the palette if it's visible - */ - RGraph.HidePalette = function () - { - var div = RGraph.Registry.Get('palette'); - - if (typeof(div) == 'object' && div) { - div.style.visibility = 'hidden'; - div.style.display = 'none'; - RGraph.Registry.Set('palette', null); - } - } - - - /** - * Hides the zoomed canvas - */ - RGraph.HideZoomedCanvas = function () - { - if (typeof(__zoomedimage__) == 'object') { - obj = __zoomedimage__.obj; - } else { - return; - } - - if (obj.Get('chart.zoom.fade.out')) { - for (var i=10,j=1; i>=0; --i, ++j) { - if (typeof(__zoomedimage__) == 'object') { - setTimeout("__zoomedimage__.style.opacity = " + String(i / 10), j * 30); - } - } - - if (typeof(__zoomedbackground__) == 'object') { - setTimeout("__zoomedbackground__.style.opacity = " + String(i / 10), j * 30); - } - } - - if (typeof(__zoomedimage__) == 'object') { - setTimeout("__zoomedimage__.style.display = 'none'", obj.Get('chart.zoom.fade.out') ? 310 : 0); - } - - if (typeof(__zoomedbackground__) == 'object') { - setTimeout("__zoomedbackground__.style.display = 'none'", obj.Get('chart.zoom.fade.out') ? 310 : 0); - } - } - - - /** - * Adds an event handler - * - * @param object obj The graph object - * @param string event The name of the event, eg ontooltip - * @param object func The callback function - */ - RGraph.AddCustomEventListener = function (obj, name, func) - { - if (typeof(RGraph.events[obj.id]) == 'undefined') { - RGraph.events[obj.id] = []; - } - - RGraph.events[obj.id].push([obj, name, func]); - - return RGraph.events[obj.id].length - 1; - } - - - /** - * Used to fire one of the RGraph custom events - * - * @param object obj The graph object that fires the event - * @param string event The name of the event to fire - */ - RGraph.FireCustomEvent = function (obj, name) - { - if (obj && obj.isRGraph) { - var id = obj.id; - - if ( typeof(id) == 'string' - && typeof(RGraph.events) == 'object' - && typeof(RGraph.events[id]) == 'object' - && RGraph.events[id].length > 0) { - - for(var j=0; j 0; - } - - - /** - * Checks the browser for traces of MSIE9 - */ - RGraph.isIE9 = function () - { - return navigator.userAgent.indexOf('MSIE 9') > 0; - } - - - /** - * Checks the browser for traces of MSIE9 - */ - RGraph.isIE9up = function () - { - navigator.userAgent.match(/MSIE (\d+)/); - - return Number(RegExp.$1) >= 9; - } - - - /** - * This clears a canvases event handlers. Used at the start of each graphs .Draw() method. - * - * @param string id The ID of the canvas whose event handlers will be cleared - */ - RGraph.ClearEventListeners = function (id) - { - for (var i=0; i str.length ? obj.Get('chart.labels')[i] : str); - } - } - - obj.context.font = obj.Get('chart.text.size') + 'pt ' + obj.Get('chart.text.font'); - - len = obj.context.measureText(str).width + 5; - - return (obj.type == 'hbar' ? len / 3 : len); - } - - - /** - * A basic Array shift gunction - * - * @param object The numerical array to work on - * @return The new array - */ - RGraph.array_shift = function (arr) - { - var ret = []; - - for (var i=1; i document.body.offsetWidth ? RGraph.Registry.Get('chart.tooltip').offsetWidth : 0); - var diffy = y - currenty - RGraph.Registry.Get('chart.tooltip').offsetHeight; - - // Position the tooltip - setTimeout('RGraph.Registry.Get("chart.tooltip").style.left = "' + (currentx + (diffx * 0.2)) + 'px"', 25); - setTimeout('RGraph.Registry.Get("chart.tooltip").style.left = "' + (currentx + (diffx * 0.4)) + 'px"', 50); - setTimeout('RGraph.Registry.Get("chart.tooltip").style.left = "' + (currentx + (diffx * 0.6)) + 'px"', 75); - setTimeout('RGraph.Registry.Get("chart.tooltip").style.left = "' + (currentx + (diffx * 0.8)) + 'px"', 100); - setTimeout('RGraph.Registry.Get("chart.tooltip").style.left = "' + (currentx + (diffx * 1.0)) + 'px"', 125); - - setTimeout('RGraph.Registry.Get("chart.tooltip").style.top = "' + (currenty + (diffy * 0.2)) + 'px"', 25); - setTimeout('RGraph.Registry.Get("chart.tooltip").style.top = "' + (currenty + (diffy * 0.4)) + 'px"', 50); - setTimeout('RGraph.Registry.Get("chart.tooltip").style.top = "' + (currenty + (diffy * 0.6)) + 'px"', 75); - setTimeout('RGraph.Registry.Get("chart.tooltip").style.top = "' + (currenty + (diffy * 0.8)) + 'px"', 100); - setTimeout('RGraph.Registry.Get("chart.tooltip").style.top = "' + (currenty + (diffy * 1.0)) + 'px"', 125); - - } else { - - alert('[TOOLTIPS] The "snap" effect is only supported on the Line, Rscatter, Scatter and Radar charts (tried to use it with type: ' + canvas.__object__.type); - } - - /** - * Fire the tooltip event - */ - RGraph.FireCustomEvent(canvas.__object__, 'ontooltip'); - - return; - } - - /** - * Hide any currently shown tooltip - */ - RGraph.HideTooltip(); - - - /** - * Show a tool tip - */ - var tooltipObj = document.createElement('DIV'); - tooltipObj.className = canvas.__object__.Get('chart.tooltips.css.class'); - tooltipObj.style.display = 'none'; - tooltipObj.style.position = 'absolute'; - tooltipObj.style.left = 0; - tooltipObj.style.top = 0; - tooltipObj.style.backgroundColor = 'rgba(255,255,239,0.9)'; - tooltipObj.style.color = 'black'; - if (!document.all) tooltipObj.style.border = ''; - tooltipObj.style.visibility = 'visible'; - tooltipObj.style.paddingLeft = RGraph.tooltips.padding; - tooltipObj.style.paddingRight = RGraph.tooltips.padding; - tooltipObj.style.fontFamily = RGraph.tooltips.font_face; - tooltipObj.style.fontSize = RGraph.tooltips.font_size; - tooltipObj.style.zIndex = 3; - tooltipObj.style.borderRadius = '5px'; - tooltipObj.style.MozBorderRadius = '5px'; - tooltipObj.style.WebkitBorderRadius = '5px'; - tooltipObj.style.WebkitBoxShadow = 'rgba(96,96,96,0.5) 0 0 15px'; - tooltipObj.style.MozBoxShadow = 'rgba(96,96,96,0.5) 0 0 15px'; - tooltipObj.style.boxShadow = 'rgba(96,96,96,0.5) 0 0 15px'; - tooltipObj.style.filter = 'progid:DXImageTransform.Microsoft.Shadow(color=#666666,direction=135)'; - tooltipObj.style.opacity = 0; - tooltipObj.style.overflow = 'hidden'; - tooltipObj.innerHTML = text; - tooltipObj.__text__ = text; // This is set because the innerHTML can change when it's set - tooltipObj.__canvas__ = canvas; - tooltipObj.style.display = 'inline'; - - if (typeof(idx) == 'number') { - tooltipObj.__index__ = idx; - - /** - * Just for the line chart - */ - if (canvas.__object__.type == 'line') { - var index2 = idx; - - while (index2 >= canvas.__object__.data[0].length) { - index2 -= canvas.__object__.data[0].length; - } - - tooltipObj.__index2__ = index2; - } - } - - document.body.appendChild(tooltipObj); - - var width = tooltipObj.offsetWidth; - var height = tooltipObj.offsetHeight; - - if ((y - height - 2) > 0) { - y = y - height - 2; - } else { - y = y + 2; - } - - /** - * Set the width on the tooltip so it doesn't resize if the window is resized - */ - tooltipObj.style.width = width + 'px'; - //tooltipObj.style.height = 0; // Initially set the tooltip height to nothing - - /** - * If the mouse is towards the right of the browser window and the tooltip would go outside of the window, - * move it left - */ - if ( (x + width) > document.body.offsetWidth ) { - x = x - width - 7; - var placementLeft = true; - - if (canvas.__object__.Get('chart.tooltips.effect') == 'none') { - x = x - 3; - } - - tooltipObj.style.left = x + 'px'; - tooltipObj.style.top = y + 'px'; - - } else { - x += 5; - - tooltipObj.style.left = x + 'px'; - tooltipObj.style.top = y + 'px'; - } - - - if (effect == 'expand') { - - tooltipObj.style.left = (x + (width / 2)) + 'px'; - tooltipObj.style.top = (y + (height / 2)) + 'px'; - leftDelta = (width / 2) / 10; - topDelta = (height / 2) / 10; - - tooltipObj.style.width = 0; - tooltipObj.style.height = 0; - //tooltipObj.style.boxShadow = ''; - //tooltipObj.style.MozBoxShadow = ''; - //tooltipObj.style.WebkitBoxShadow = ''; - //tooltipObj.style.borderRadius = 0; - //tooltipObj.style.MozBorderRadius = 0; - //tooltipObj.style.WebkitBorderRadius = 0; - tooltipObj.style.opacity = 1; - - // Progressively move the tooltip to where it should be (the x position) - RGraph.Registry.Get('chart.tooltip.timers').push(setTimeout("if (RGraph.Registry.Get('chart.tooltip')) { RGraph.Registry.Get('chart.tooltip').style.left = (parseInt(RGraph.Registry.Get('chart.tooltip').style.left) - leftDelta) + 'px' }", 25)); - RGraph.Registry.Get('chart.tooltip.timers').push(setTimeout("if (RGraph.Registry.Get('chart.tooltip')) { RGraph.Registry.Get('chart.tooltip').style.left = (parseInt(RGraph.Registry.Get('chart.tooltip').style.left) - leftDelta) + 'px' }", 50)); - RGraph.Registry.Get('chart.tooltip.timers').push(setTimeout("if (RGraph.Registry.Get('chart.tooltip')) { RGraph.Registry.Get('chart.tooltip').style.left = (parseInt(RGraph.Registry.Get('chart.tooltip').style.left) - leftDelta) + 'px' }", 75)); - RGraph.Registry.Get('chart.tooltip.timers').push(setTimeout("if (RGraph.Registry.Get('chart.tooltip')) { RGraph.Registry.Get('chart.tooltip').style.left = (parseInt(RGraph.Registry.Get('chart.tooltip').style.left) - leftDelta) + 'px' }", 100)); - RGraph.Registry.Get('chart.tooltip.timers').push(setTimeout("if (RGraph.Registry.Get('chart.tooltip')) { RGraph.Registry.Get('chart.tooltip').style.left = (parseInt(RGraph.Registry.Get('chart.tooltip').style.left) - leftDelta) + 'px' }", 125)); - RGraph.Registry.Get('chart.tooltip.timers').push(setTimeout("if (RGraph.Registry.Get('chart.tooltip')) { RGraph.Registry.Get('chart.tooltip').style.left = (parseInt(RGraph.Registry.Get('chart.tooltip').style.left) - leftDelta) + 'px' }", 150)); - RGraph.Registry.Get('chart.tooltip.timers').push(setTimeout("if (RGraph.Registry.Get('chart.tooltip')) { RGraph.Registry.Get('chart.tooltip').style.left = (parseInt(RGraph.Registry.Get('chart.tooltip').style.left) - leftDelta) + 'px' }", 175)); - RGraph.Registry.Get('chart.tooltip.timers').push(setTimeout("if (RGraph.Registry.Get('chart.tooltip')) { RGraph.Registry.Get('chart.tooltip').style.left = (parseInt(RGraph.Registry.Get('chart.tooltip').style.left) - leftDelta) + 'px' }", 200)); - RGraph.Registry.Get('chart.tooltip.timers').push(setTimeout("if (RGraph.Registry.Get('chart.tooltip')) { RGraph.Registry.Get('chart.tooltip').style.left = (parseInt(RGraph.Registry.Get('chart.tooltip').style.left) - leftDelta) + 'px' }", 225)); - RGraph.Registry.Get('chart.tooltip.timers').push(setTimeout("if (RGraph.Registry.Get('chart.tooltip')) { RGraph.Registry.Get('chart.tooltip').style.left = (parseInt(RGraph.Registry.Get('chart.tooltip').style.left) - leftDelta) + 'px' }", 250)); - - // Progressively move the tooltip to where it should be (the Y position) - RGraph.Registry.Get('chart.tooltip.timers').push(setTimeout("if (RGraph.Registry.Get('chart.tooltip')) { RGraph.Registry.Get('chart.tooltip').style.top = (parseInt(RGraph.Registry.Get('chart.tooltip').style.top) - topDelta) + 'px' }", 25)); - RGraph.Registry.Get('chart.tooltip.timers').push(setTimeout("if (RGraph.Registry.Get('chart.tooltip')) { RGraph.Registry.Get('chart.tooltip').style.top = (parseInt(RGraph.Registry.Get('chart.tooltip').style.top) - topDelta) + 'px' }", 50)); - RGraph.Registry.Get('chart.tooltip.timers').push(setTimeout("if (RGraph.Registry.Get('chart.tooltip')) { RGraph.Registry.Get('chart.tooltip').style.top = (parseInt(RGraph.Registry.Get('chart.tooltip').style.top) - topDelta) + 'px' }", 75)); - RGraph.Registry.Get('chart.tooltip.timers').push(setTimeout("if (RGraph.Registry.Get('chart.tooltip')) { RGraph.Registry.Get('chart.tooltip').style.top = (parseInt(RGraph.Registry.Get('chart.tooltip').style.top) - topDelta) + 'px' }", 100)); - RGraph.Registry.Get('chart.tooltip.timers').push(setTimeout("if (RGraph.Registry.Get('chart.tooltip')) { RGraph.Registry.Get('chart.tooltip').style.top = (parseInt(RGraph.Registry.Get('chart.tooltip').style.top) - topDelta) + 'px' }", 125)); - RGraph.Registry.Get('chart.tooltip.timers').push(setTimeout("if (RGraph.Registry.Get('chart.tooltip')) { RGraph.Registry.Get('chart.tooltip').style.top = (parseInt(RGraph.Registry.Get('chart.tooltip').style.top) - topDelta) + 'px' }", 150)); - RGraph.Registry.Get('chart.tooltip.timers').push(setTimeout("if (RGraph.Registry.Get('chart.tooltip')) { RGraph.Registry.Get('chart.tooltip').style.top = (parseInt(RGraph.Registry.Get('chart.tooltip').style.top) - topDelta) + 'px' }", 175)); - RGraph.Registry.Get('chart.tooltip.timers').push(setTimeout("if (RGraph.Registry.Get('chart.tooltip')) { RGraph.Registry.Get('chart.tooltip').style.top = (parseInt(RGraph.Registry.Get('chart.tooltip').style.top) - topDelta) + 'px' }", 200)); - RGraph.Registry.Get('chart.tooltip.timers').push(setTimeout("if (RGraph.Registry.Get('chart.tooltip')) { RGraph.Registry.Get('chart.tooltip').style.top = (parseInt(RGraph.Registry.Get('chart.tooltip').style.top) - topDelta) + 'px' }", 225)); - RGraph.Registry.Get('chart.tooltip.timers').push(setTimeout("if (RGraph.Registry.Get('chart.tooltip')) { RGraph.Registry.Get('chart.tooltip').style.top = (parseInt(RGraph.Registry.Get('chart.tooltip').style.top) - topDelta) + 'px' }", 250)); - - // Progressively grow the tooltip width - RGraph.Registry.Get('chart.tooltip.timers').push(setTimeout("if (RGraph.Registry.Get('chart.tooltip')) { RGraph.Registry.Get('chart.tooltip').style.width = '" + (width * 0.1) + "px'; }", 25)); - RGraph.Registry.Get('chart.tooltip.timers').push(setTimeout("if (RGraph.Registry.Get('chart.tooltip')) { RGraph.Registry.Get('chart.tooltip').style.width = '" + (width * 0.2) + "px'; }", 50)); - RGraph.Registry.Get('chart.tooltip.timers').push(setTimeout("if (RGraph.Registry.Get('chart.tooltip')) { RGraph.Registry.Get('chart.tooltip').style.width = '" + (width * 0.3) + "px'; }", 75)); - RGraph.Registry.Get('chart.tooltip.timers').push(setTimeout("if (RGraph.Registry.Get('chart.tooltip')) { RGraph.Registry.Get('chart.tooltip').style.width = '" + (width * 0.4) + "px'; }", 100)); - RGraph.Registry.Get('chart.tooltip.timers').push(setTimeout("if (RGraph.Registry.Get('chart.tooltip')) { RGraph.Registry.Get('chart.tooltip').style.width = '" + (width * 0.5) + "px'; }", 125)); - RGraph.Registry.Get('chart.tooltip.timers').push(setTimeout("if (RGraph.Registry.Get('chart.tooltip')) { RGraph.Registry.Get('chart.tooltip').style.width = '" + (width * 0.6) + "px'; }", 150)); - RGraph.Registry.Get('chart.tooltip.timers').push(setTimeout("if (RGraph.Registry.Get('chart.tooltip')) { RGraph.Registry.Get('chart.tooltip').style.width = '" + (width * 0.7) + "px'; }", 175)); - RGraph.Registry.Get('chart.tooltip.timers').push(setTimeout("if (RGraph.Registry.Get('chart.tooltip')) { RGraph.Registry.Get('chart.tooltip').style.width = '" + (width * 0.8) + "px'; }", 200)); - RGraph.Registry.Get('chart.tooltip.timers').push(setTimeout("if (RGraph.Registry.Get('chart.tooltip')) { RGraph.Registry.Get('chart.tooltip').style.width = '" + (width * 0.9) + "px'; }", 225)); - RGraph.Registry.Get('chart.tooltip.timers').push(setTimeout("if (RGraph.Registry.Get('chart.tooltip')) { RGraph.Registry.Get('chart.tooltip').style.width = '" + width + "px'; }", 250)); - - // Progressively grow the tooltip height - RGraph.Registry.Get('chart.tooltip.timers').push(setTimeout("if (RGraph.Registry.Get('chart.tooltip')) { RGraph.Registry.Get('chart.tooltip').style.height = '" + (height * 0.1) + "px'; }", 25)); - RGraph.Registry.Get('chart.tooltip.timers').push(setTimeout("if (RGraph.Registry.Get('chart.tooltip')) { RGraph.Registry.Get('chart.tooltip').style.height = '" + (height * 0.2) + "px'; }", 50)); - RGraph.Registry.Get('chart.tooltip.timers').push(setTimeout("if (RGraph.Registry.Get('chart.tooltip')) { RGraph.Registry.Get('chart.tooltip').style.height = '" + (height * 0.3) + "px'; }", 75)); - RGraph.Registry.Get('chart.tooltip.timers').push(setTimeout("if (RGraph.Registry.Get('chart.tooltip')) { RGraph.Registry.Get('chart.tooltip').style.height = '" + (height * 0.4) + "px'; }", 100)); - RGraph.Registry.Get('chart.tooltip.timers').push(setTimeout("if (RGraph.Registry.Get('chart.tooltip')) { RGraph.Registry.Get('chart.tooltip').style.height = '" + (height * 0.5) + "px'; }", 125)); - RGraph.Registry.Get('chart.tooltip.timers').push(setTimeout("if (RGraph.Registry.Get('chart.tooltip')) { RGraph.Registry.Get('chart.tooltip').style.height = '" + (height * 0.6) + "px'; }", 150)); - RGraph.Registry.Get('chart.tooltip.timers').push(setTimeout("if (RGraph.Registry.Get('chart.tooltip')) { RGraph.Registry.Get('chart.tooltip').style.height = '" + (height * 0.7) + "px'; }", 175)); - RGraph.Registry.Get('chart.tooltip.timers').push(setTimeout("if (RGraph.Registry.Get('chart.tooltip')) { RGraph.Registry.Get('chart.tooltip').style.height = '" + (height * 0.8) + "px'; }", 200)); - RGraph.Registry.Get('chart.tooltip.timers').push(setTimeout("if (RGraph.Registry.Get('chart.tooltip')) { RGraph.Registry.Get('chart.tooltip').style.height = '" + (height * 0.9) + "px'; }", 225)); - RGraph.Registry.Get('chart.tooltip.timers').push(setTimeout("if (RGraph.Registry.Get('chart.tooltip')) { RGraph.Registry.Get('chart.tooltip').style.height = '" + height + "px'; }", 250)); - - // When the animation is finished, set the tooltip HTML - RGraph.Registry.Get('chart.tooltip.timers').push(setTimeout("if (RGraph.Registry.Get('chart.tooltip')) { RGraph.Registry.Get('chart.tooltip').innerHTML = RGraph.Registry.Get('chart.tooltip').__text__; }", 250)); - - } else if (effect == 'contract') { - - tooltipObj.style.left = (x - width) + 'px'; - tooltipObj.style.top = (y - (height * 2)) + 'px'; - tooltipObj.style.cursor = 'pointer'; - - leftDelta = width / 10; - topDelta = height / 10; - - tooltipObj.style.width = (width * 5) + 'px'; - tooltipObj.style.height = (height * 5) + 'px'; - - tooltipObj.style.opacity = 0.2; - - // Progressively move the tooltip to where it should be (the x position) - RGraph.Registry.Get('chart.tooltip.timers').push(setTimeout("if (RGraph.Registry.Get('chart.tooltip')) { RGraph.Registry.Get('chart.tooltip').style.left = (parseInt(RGraph.Registry.Get('chart.tooltip').style.left) + leftDelta) + 'px' }", 25)); - RGraph.Registry.Get('chart.tooltip.timers').push(setTimeout("if (RGraph.Registry.Get('chart.tooltip')) { RGraph.Registry.Get('chart.tooltip').style.left = (parseInt(RGraph.Registry.Get('chart.tooltip').style.left) + leftDelta) + 'px' }", 50)); - RGraph.Registry.Get('chart.tooltip.timers').push(setTimeout("if (RGraph.Registry.Get('chart.tooltip')) { RGraph.Registry.Get('chart.tooltip').style.left = (parseInt(RGraph.Registry.Get('chart.tooltip').style.left) + leftDelta) + 'px' }", 75)); - RGraph.Registry.Get('chart.tooltip.timers').push(setTimeout("if (RGraph.Registry.Get('chart.tooltip')) { RGraph.Registry.Get('chart.tooltip').style.left = (parseInt(RGraph.Registry.Get('chart.tooltip').style.left) + leftDelta) + 'px' }", 100)); - RGraph.Registry.Get('chart.tooltip.timers').push(setTimeout("if (RGraph.Registry.Get('chart.tooltip')) { RGraph.Registry.Get('chart.tooltip').style.left = (parseInt(RGraph.Registry.Get('chart.tooltip').style.left) + leftDelta) + 'px' }", 125)); - RGraph.Registry.Get('chart.tooltip.timers').push(setTimeout("if (RGraph.Registry.Get('chart.tooltip')) { RGraph.Registry.Get('chart.tooltip').style.left = (parseInt(RGraph.Registry.Get('chart.tooltip').style.left) + leftDelta) + 'px' }", 150)); - RGraph.Registry.Get('chart.tooltip.timers').push(setTimeout("if (RGraph.Registry.Get('chart.tooltip')) { RGraph.Registry.Get('chart.tooltip').style.left = (parseInt(RGraph.Registry.Get('chart.tooltip').style.left) + leftDelta) + 'px' }", 175)); - RGraph.Registry.Get('chart.tooltip.timers').push(setTimeout("if (RGraph.Registry.Get('chart.tooltip')) { RGraph.Registry.Get('chart.tooltip').style.left = (parseInt(RGraph.Registry.Get('chart.tooltip').style.left) + leftDelta) + 'px' }", 200)); - RGraph.Registry.Get('chart.tooltip.timers').push(setTimeout("if (RGraph.Registry.Get('chart.tooltip')) { RGraph.Registry.Get('chart.tooltip').style.left = (parseInt(RGraph.Registry.Get('chart.tooltip').style.left) + leftDelta) + 'px' }", 225)); - RGraph.Registry.Get('chart.tooltip.timers').push(setTimeout("if (RGraph.Registry.Get('chart.tooltip')) { RGraph.Registry.Get('chart.tooltip').style.left = (parseInt(RGraph.Registry.Get('chart.tooltip').style.left) + leftDelta) + 'px' }", 250)); - - // Progressively move the tooltip to where it should be (the Y position) - RGraph.Registry.Get('chart.tooltip.timers').push(setTimeout("if (RGraph.Registry.Get('chart.tooltip')) { RGraph.Registry.Get('chart.tooltip').style.top = (parseInt(RGraph.Registry.Get('chart.tooltip').style.top) + (topDelta*2)) + 'px' }", 25)); - RGraph.Registry.Get('chart.tooltip.timers').push(setTimeout("if (RGraph.Registry.Get('chart.tooltip')) { RGraph.Registry.Get('chart.tooltip').style.top = (parseInt(RGraph.Registry.Get('chart.tooltip').style.top) + (topDelta*2)) + 'px' }", 50)); - RGraph.Registry.Get('chart.tooltip.timers').push(setTimeout("if (RGraph.Registry.Get('chart.tooltip')) { RGraph.Registry.Get('chart.tooltip').style.top = (parseInt(RGraph.Registry.Get('chart.tooltip').style.top) + (topDelta*2)) + 'px' }", 75)); - RGraph.Registry.Get('chart.tooltip.timers').push(setTimeout("if (RGraph.Registry.Get('chart.tooltip')) { RGraph.Registry.Get('chart.tooltip').style.top = (parseInt(RGraph.Registry.Get('chart.tooltip').style.top) + (topDelta*2)) + 'px' }", 100)); - RGraph.Registry.Get('chart.tooltip.timers').push(setTimeout("if (RGraph.Registry.Get('chart.tooltip')) { RGraph.Registry.Get('chart.tooltip').style.top = (parseInt(RGraph.Registry.Get('chart.tooltip').style.top) + (topDelta*2)) + 'px' }", 125)); - RGraph.Registry.Get('chart.tooltip.timers').push(setTimeout("if (RGraph.Registry.Get('chart.tooltip')) { RGraph.Registry.Get('chart.tooltip').style.top = (parseInt(RGraph.Registry.Get('chart.tooltip').style.top) + (topDelta*2)) + 'px' }", 150)); - RGraph.Registry.Get('chart.tooltip.timers').push(setTimeout("if (RGraph.Registry.Get('chart.tooltip')) { RGraph.Registry.Get('chart.tooltip').style.top = (parseInt(RGraph.Registry.Get('chart.tooltip').style.top) + (topDelta*2)) + 'px' }", 175)); - RGraph.Registry.Get('chart.tooltip.timers').push(setTimeout("if (RGraph.Registry.Get('chart.tooltip')) { RGraph.Registry.Get('chart.tooltip').style.top = (parseInt(RGraph.Registry.Get('chart.tooltip').style.top) + (topDelta*2)) + 'px' }", 200)); - RGraph.Registry.Get('chart.tooltip.timers').push(setTimeout("if (RGraph.Registry.Get('chart.tooltip')) { RGraph.Registry.Get('chart.tooltip').style.top = (parseInt(RGraph.Registry.Get('chart.tooltip').style.top) + (topDelta*2)) + 'px' }", 225)); - RGraph.Registry.Get('chart.tooltip.timers').push(setTimeout("if (RGraph.Registry.Get('chart.tooltip')) { RGraph.Registry.Get('chart.tooltip').style.top = (parseInt(RGraph.Registry.Get('chart.tooltip').style.top) + (topDelta*2)) + 'px' }", 250)); - - // Progressively shrink the tooltip width - RGraph.Registry.Get('chart.tooltip.timers').push(setTimeout("if (RGraph.Registry.Get('chart.tooltip')) { RGraph.Registry.Get('chart.tooltip').style.width = '" + (width * 5.5) + "px'; }", 25)); - RGraph.Registry.Get('chart.tooltip.timers').push(setTimeout("if (RGraph.Registry.Get('chart.tooltip')) { RGraph.Registry.Get('chart.tooltip').style.width = '" + (width * 5.0) + "px'; }", 50)); - RGraph.Registry.Get('chart.tooltip.timers').push(setTimeout("if (RGraph.Registry.Get('chart.tooltip')) { RGraph.Registry.Get('chart.tooltip').style.width = '" + (width * 4.5) + "px'; }", 75)); - RGraph.Registry.Get('chart.tooltip.timers').push(setTimeout("if (RGraph.Registry.Get('chart.tooltip')) { RGraph.Registry.Get('chart.tooltip').style.width = '" + (width * 4.0) + "px'; }", 100)); - RGraph.Registry.Get('chart.tooltip.timers').push(setTimeout("if (RGraph.Registry.Get('chart.tooltip')) { RGraph.Registry.Get('chart.tooltip').style.width = '" + (width * 3.5) + "px'; }", 125)); - RGraph.Registry.Get('chart.tooltip.timers').push(setTimeout("if (RGraph.Registry.Get('chart.tooltip')) { RGraph.Registry.Get('chart.tooltip').style.width = '" + (width * 3.0) + "px'; }", 150)); - RGraph.Registry.Get('chart.tooltip.timers').push(setTimeout("if (RGraph.Registry.Get('chart.tooltip')) { RGraph.Registry.Get('chart.tooltip').style.width = '" + (width * 2.5) + "px'; }", 175)); - RGraph.Registry.Get('chart.tooltip.timers').push(setTimeout("if (RGraph.Registry.Get('chart.tooltip')) { RGraph.Registry.Get('chart.tooltip').style.width = '" + (width * 2.0) + "px'; }", 200)); - RGraph.Registry.Get('chart.tooltip.timers').push(setTimeout("if (RGraph.Registry.Get('chart.tooltip')) { RGraph.Registry.Get('chart.tooltip').style.width = '" + (width * 1.5) + "px'; }", 225)); - RGraph.Registry.Get('chart.tooltip.timers').push(setTimeout("if (RGraph.Registry.Get('chart.tooltip')) { RGraph.Registry.Get('chart.tooltip').style.width = '" + width + "px'; }", 250)); - - // Progressively shrink the tooltip height - RGraph.Registry.Get('chart.tooltip.timers').push(setTimeout("if (RGraph.Registry.Get('chart.tooltip')) { RGraph.Registry.Get('chart.tooltip').style.height = '" + (height * 5.5) + "px'; }", 25)); - RGraph.Registry.Get('chart.tooltip.timers').push(setTimeout("if (RGraph.Registry.Get('chart.tooltip')) { RGraph.Registry.Get('chart.tooltip').style.height = '" + (height * 5.0) + "px'; }", 50)); - RGraph.Registry.Get('chart.tooltip.timers').push(setTimeout("if (RGraph.Registry.Get('chart.tooltip')) { RGraph.Registry.Get('chart.tooltip').style.height = '" + (height * 4.5) + "px'; }", 75)); - RGraph.Registry.Get('chart.tooltip.timers').push(setTimeout("if (RGraph.Registry.Get('chart.tooltip')) { RGraph.Registry.Get('chart.tooltip').style.height = '" + (height * 4.0) + "px'; }", 100)); - RGraph.Registry.Get('chart.tooltip.timers').push(setTimeout("if (RGraph.Registry.Get('chart.tooltip')) { RGraph.Registry.Get('chart.tooltip').style.height = '" + (height * 3.5) + "px'; }", 125)); - RGraph.Registry.Get('chart.tooltip.timers').push(setTimeout("if (RGraph.Registry.Get('chart.tooltip')) { RGraph.Registry.Get('chart.tooltip').style.height = '" + (height * 3.0) + "px'; }", 150)); - RGraph.Registry.Get('chart.tooltip.timers').push(setTimeout("if (RGraph.Registry.Get('chart.tooltip')) { RGraph.Registry.Get('chart.tooltip').style.height = '" + (height * 2.5) + "px'; }", 175)); - RGraph.Registry.Get('chart.tooltip.timers').push(setTimeout("if (RGraph.Registry.Get('chart.tooltip')) { RGraph.Registry.Get('chart.tooltip').style.height = '" + (height * 2.0) + "px'; }", 200)); - RGraph.Registry.Get('chart.tooltip.timers').push(setTimeout("if (RGraph.Registry.Get('chart.tooltip')) { RGraph.Registry.Get('chart.tooltip').style.height = '" + (height * 1.5) + "px'; }", 225)); - RGraph.Registry.Get('chart.tooltip.timers').push(setTimeout("if (RGraph.Registry.Get('chart.tooltip')) { RGraph.Registry.Get('chart.tooltip').style.height = '" + height + "px'; }", 250)); - - // When the animation is finished, set the tooltip HTML - RGraph.Registry.Get('chart.tooltip.timers').push(setTimeout("if (RGraph.Registry.Get('chart.tooltip')) { RGraph.Registry.Get('chart.tooltip').innerHTML = RGraph.Registry.Get('chart.tooltip').__text__; }", 250)); - - /** - * This resets the pointer - */ - RGraph.Registry.Get('chart.tooltip.timers').push(setTimeout("if (RGraph.Registry.Get('chart.tooltip')) { RGraph.Registry.Get('chart.tooltip').style.cursor = 'default'; }", 275)); - - } else if (effect == 'snap') { - - /******************************************************* - * Move the tooltip - *******************************************************/ - for (var i=1; i<=10; ++i) { - RGraph.Registry.Get('chart.tooltip.timers').push(setTimeout("if (RGraph.Registry.Get('chart.tooltip')) { RGraph.Registry.Get('chart.tooltip').style.left = '" + (x * 0.1 * i) + "px'; }", 15 * i)); - RGraph.Registry.Get('chart.tooltip.timers').push(setTimeout("if (RGraph.Registry.Get('chart.tooltip')) { RGraph.Registry.Get('chart.tooltip').style.top = '" + (y * 0.1 * i) + "px'; }", 15 * i)); - } - - tooltipObj.style.left = 0 - tooltipObj.offsetWidth + 'px'; - tooltipObj.style.top = 0 - tooltipObj.offsetHeight + 'px'; - - } else if (effect != 'fade' && effect != 'expand' && effect != 'none' && effect != 'snap' && effect != 'contract') { - alert('[COMMON] Unknown tooltip effect: ' + effect); - } - - if (effect != 'none') { - setTimeout("if (RGraph.Registry.Get('chart.tooltip')) { RGraph.Registry.Get('chart.tooltip').style.opacity = 0.1; }", 25); - setTimeout("if (RGraph.Registry.Get('chart.tooltip')) { RGraph.Registry.Get('chart.tooltip').style.opacity = 0.2; }", 50); - setTimeout("if (RGraph.Registry.Get('chart.tooltip')) { RGraph.Registry.Get('chart.tooltip').style.opacity = 0.3; }", 75); - setTimeout("if (RGraph.Registry.Get('chart.tooltip')) { RGraph.Registry.Get('chart.tooltip').style.opacity = 0.4; }", 100); - setTimeout("if (RGraph.Registry.Get('chart.tooltip')) { RGraph.Registry.Get('chart.tooltip').style.opacity = 0.5; }", 125); - setTimeout("if (RGraph.Registry.Get('chart.tooltip')) { RGraph.Registry.Get('chart.tooltip').style.opacity = 0.6; }", 150); - setTimeout("if (RGraph.Registry.Get('chart.tooltip')) { RGraph.Registry.Get('chart.tooltip').style.opacity = 0.7; }", 175); - setTimeout("if (RGraph.Registry.Get('chart.tooltip')) { RGraph.Registry.Get('chart.tooltip').style.opacity = 0.8; }", 200); - setTimeout("if (RGraph.Registry.Get('chart.tooltip')) { RGraph.Registry.Get('chart.tooltip').style.opacity = 0.9; }", 225); - } - - setTimeout("if (RGraph.Registry.Get('chart.tooltip')) { RGraph.Registry.Get('chart.tooltip').style.opacity = 1;}", effect == 'none' ? 50 : 250); - - /** - * If the tooltip it self is clicked, cancel it - */ - tooltipObj.onmousedown = function (e) - { - e = RGraph.FixEventObject(e) - e.stopPropagation(); - } - - tooltipObj.onclick = function (e) - { - if (e.button == 0) { - e = RGraph.FixEventObject(e); - e.stopPropagation(); - } - } - - /** - * Install the function for hiding the tooltip. - */ - document.body.onmousedown = function (event) - { - var tooltip = RGraph.Registry.Get('chart.tooltip'); - - if (tooltip) { - RGraph.HideTooltip(); - - // Redraw if highlighting is enabled - if (tooltip.__canvas__.__object__.Get('chart.tooltips.highlight')) { - RGraph.Redraw(); - } - } - } - - /** - * If the window is resized, hide the tooltip - */ - window.onresize = function () - { - var tooltip = RGraph.Registry.Get('chart.tooltip'); - - if (tooltip) { - tooltip.parentNode.removeChild(tooltip); - tooltip.style.display = 'none'; - tooltip.style.visibility = 'hidden'; - RGraph.Registry.Set('chart.tooltip', null); - - // Redraw the graph if necessary - if (canvas.__object__.Get('chart.tooltips.highlight')) { - RGraph.Clear(canvas); - canvas.__object__.Draw(); - } - } - } - - /** - * Keep a reference to the tooltip - */ - RGraph.Registry.Set('chart.tooltip', tooltipObj); - - /** - * Fire the tooltip event - */ - RGraph.FireCustomEvent(canvas.__object__, 'ontooltip'); - } - - - /** - * - */ - RGraph.getTooltipText = function (text) - { - var result = /^id:(.*)/.exec(text); - - if (result && result[1] && document.getElementById(result[1])) { - text = document.getElementById(result[1]).innerHTML; - } - - return text; - } - - - /** - * - */ - RGraph.getTooltipWidth = function (text, obj) - { - var div = document.createElement('DIV'); - div.className = obj.Get('chart.tooltips.css.class'); - div.style.paddingLeft = RGraph.tooltips.padding; - div.style.paddingRight = RGraph.tooltips.padding; - div.style.fontFamily = RGraph.tooltips.font_face; - div.style.fontSize = RGraph.tooltips.font_size; - div.style.visibility = 'hidden'; - div.style.position = 'absolute'; - div.style.top = '300px'; - div.style.left = 0; - div.style.display = 'inline'; - div.innerHTML = RGraph.getTooltipText(text); - document.body.appendChild(div); - - return div.offsetWidth; - } - - - /** - * Hides the currently shown tooltip - */ - RGraph.HideTooltip = function () - { - var tooltip = RGraph.Registry.Get('chart.tooltip'); - - if (tooltip) { - tooltip.parentNode.removeChild(tooltip); - tooltip.style.display = 'none'; - tooltip.style.visibility = 'hidden'; - RGraph.Registry.Set('chart.tooltip', null); - } - } \ No newline at end of file diff --git a/PHP/CodeCoverage/Report/HTML/Renderer/Template/RGraph.scatter.js b/PHP/CodeCoverage/Report/HTML/Renderer/Template/RGraph.scatter.js deleted file mode 100644 index a6c669705..000000000 --- a/PHP/CodeCoverage/Report/HTML/Renderer/Template/RGraph.scatter.js +++ /dev/null @@ -1,1494 +0,0 @@ - /** - * o------------------------------------------------------------------------------o - * | This file is part of the RGraph package - you can learn more at: | - * | | - * | http://www.rgraph.net | - * | | - * | This package is licensed under the RGraph license. For all kinds of business | - * | purposes there is a small one-time licensing fee to pay and for non | - * | commercial purposes it is free to use. You can read the full license here: | - * | | - * | http://www.rgraph.net/LICENSE.txt | - * o------------------------------------------------------------------------------o - */ - - if (typeof(RGraph) == 'undefined') RGraph = {}; - - /** - * The scatter graph constructor - * - * @param object canvas The cxanvas object - * @param array data The chart data - */ - RGraph.Scatter = function (id, data) - { - // Get the canvas and context objects - this.id = id; - this.canvas = document.getElementById(id); - this.canvas.__object__ = this; - this.context = this.canvas.getContext ? this.canvas.getContext("2d") : null; - this.max = 0; - this.coords = []; - this.data = []; - this.type = 'scatter'; - this.isRGraph = true; - - - /** - * Compatibility with older browsers - */ - RGraph.OldBrowserCompat(this.context); - - - // Various config properties - this.properties = { - 'chart.background.barcolor1': 'rgba(0,0,0,0)', - 'chart.background.barcolor2': 'rgba(0,0,0,0)', - 'chart.background.grid': true, - 'chart.background.grid.width': 1, - 'chart.background.grid.color': '#ddd', - 'chart.background.grid.hsize': 20, - 'chart.background.grid.vsize': 20, - 'chart.background.hbars': null, - 'chart.background.vbars': null, - 'chart.background.grid.vlines': true, - 'chart.background.grid.hlines': true, - 'chart.background.grid.border': true, - 'chart.background.grid.autofit':false, - 'chart.background.grid.autofit.numhlines': 7, - 'chart.background.grid.autofit.numvlines': 20, - 'chart.text.size': 10, - 'chart.text.angle': 0, - 'chart.text.color': 'black', - 'chart.text.font': 'Verdana', - 'chart.tooltips.effect': 'fade', - 'chart.tooltips.hotspot': 3, - 'chart.tooltips.css.class': 'RGraph_tooltip', - 'chart.tooltips.highlight': true, - 'chart.tooltips.coords.adjust': [0,0], - 'chart.units.pre': '', - 'chart.units.post': '', - 'chart.tickmarks': 'cross', - 'chart.ticksize': 5, - 'chart.xticks': true, - 'chart.xaxis': true, - 'chart.gutter.left': 25, - 'chart.gutter.right': 25, - 'chart.gutter.top': 25, - 'chart.gutter.bottom': 25, - 'chart.xmax': 0, - 'chart.ymax': null, - 'chart.ymin': null, - 'chart.scale.decimals': null, - 'chart.scale.point': '.', - 'chart.scale.thousand': ',', - 'chart.title': '', - 'chart.title.background': null, - 'chart.title.hpos': null, - 'chart.title.vpos': null, - 'chart.title.xaxis': '', - 'chart.title.yaxis': '', - 'chart.title.xaxis.pos': 0.25, - 'chart.title.yaxis.pos': 0.25, - 'chart.labels': [], - 'chart.labels.ingraph': null, - 'chart.labels.above': false, - 'chart.labels.above.size': 8, - 'chart.labels.above.decimals': 0, - 'chart.ylabels': true, - 'chart.ylabels.count': 5, - 'chart.ylabels.invert': false, - 'chart.contextmenu': null, - 'chart.defaultcolor': 'black', - 'chart.xaxispos': 'bottom', - 'chart.yaxispos': 'left', - 'chart.noendxtick': false, - 'chart.crosshairs': false, - 'chart.crosshairs.color': '#333', - 'chart.crosshairs.linewidth': 1, - 'chart.crosshairs.coords': false, - 'chart.crosshairs.coords.fixed':true, - 'chart.crosshairs.coords.fadeout':false, - 'chart.crosshairs.coords.labels.x': 'X', - 'chart.crosshairs.coords.labels.y': 'Y', - 'chart.annotatable': false, - 'chart.annotate.color': 'black', - 'chart.line': false, - 'chart.line.linewidth': 1, - 'chart.line.colors': ['green', 'red'], - 'chart.line.shadow.color': 'rgba(0,0,0,0)', - 'chart.line.shadow.blur': 2, - 'chart.line.shadow.offsetx': 3, - 'chart.line.shadow.offsety': 3, - 'chart.line.stepped': false, - 'chart.noaxes': false, - 'chart.key': [], - 'chart.key.background': 'white', - 'chart.key.position': 'graph', - 'chart.key.halign': 'right', - 'chart.key.shadow': false, - 'chart.key.shadow.color': '#666', - 'chart.key.shadow.blur': 3, - 'chart.key.shadow.offsetx': 2, - 'chart.key.shadow.offsety': 2, - 'chart.key.position.gutter.boxed': true, - 'chart.key.position.x': null, - 'chart.key.position.y': null, - 'chart.key.color.shape': 'square', - 'chart.key.rounded': true, - 'chart.key.linewidth': 1, - 'chart.axis.color': 'black', - 'chart.zoom.factor': 1.5, - 'chart.zoom.fade.in': true, - 'chart.zoom.fade.out': true, - 'chart.zoom.hdir': 'right', - 'chart.zoom.vdir': 'down', - 'chart.zoom.frames': 10, - 'chart.zoom.delay': 50, - 'chart.zoom.shadow': true, - 'chart.zoom.mode': 'canvas', - 'chart.zoom.thumbnail.width': 75, - 'chart.zoom.thumbnail.height': 75, - 'chart.zoom.background': true, - 'chart.zoom.action': 'zoom', - 'chart.boxplot.width': 8, - 'chart.resizable': false, - 'chart.resize.handle.adjust': [0,0], - 'chart.resize.handle.background': null, - 'chart.xmin': 0, - 'chart.labels.specific.align': 'left' - } - - // Handle multiple datasets being given as one argument - if (arguments[1][0] && arguments[1][0][0] && typeof(arguments[1][0][0][0]) == 'number') { - // Store the data set(s) - for (var i=0; i 0) { - - this.scale = []; - this.max = this.Get('chart.ymax'); - this.min = this.Get('chart.ymin') ? this.Get('chart.ymin') : 0; - - this.scale[0] = ((this.max - this.min) * (1/5)) + this.min; - this.scale[1] = ((this.max - this.min) * (2/5)) + this.min; - this.scale[2] = ((this.max - this.min) * (3/5)) + this.min; - this.scale[3] = ((this.max - this.min) * (4/5)) + this.min; - this.scale[4] = ((this.max - this.min) * (5/5)) + this.min; - - var decimals = this.Get('chart.scale.decimals'); - - this.scale = [ - Number(this.scale[0]).toFixed(decimals), - Number(this.scale[1]).toFixed(decimals), - Number(this.scale[2]).toFixed(decimals), - Number(this.scale[3]).toFixed(decimals), - Number(this.scale[4]).toFixed(decimals) - ]; - - } else { - - var i = 0; - var j = 0; - - for (i=0; i= 5) { - RGraph.Text(context, font, text_size, xPos, this.gutterTop + ((RGraph.GetHeight(this) - this.gutterTop - this.gutterBottom) * (1/10) ), RGraph.number_format(this, this.scale[3], units_pre, units_post), 'center', align); - RGraph.Text(context, font, text_size, xPos, this.gutterTop + ((RGraph.GetHeight(this) - this.gutterTop - this.gutterBottom) * (3/10) ), RGraph.number_format(this, this.scale[1], units_pre, units_post), 'center', align); - } - - if (numYLabels >= 3) { - RGraph.Text(context, font, text_size, xPos, this.gutterTop + ((RGraph.GetHeight(this) - this.gutterTop - this.gutterBottom) * (2/10) ), RGraph.number_format(this, this.scale[2], units_pre, units_post), 'center', align); - RGraph.Text(context, font, text_size, xPos, this.gutterTop + ((RGraph.GetHeight(this) - this.gutterTop - this.gutterBottom) * (4/10) ), RGraph.number_format(this, this.scale[0], units_pre, units_post), 'center', align); - } - - // Draw the bottom halves labels - if (numYLabels >= 3) { - RGraph.Text(context, font, text_size, xPos, this.gutterTop + ((RGraph.GetHeight(this) - this.gutterTop - this.gutterBottom) * (1/10) ) + this.halfGraphHeight, '-' + RGraph.number_format(this, this.scale[0], units_pre, units_post), 'center', align); - RGraph.Text(context, font, text_size, xPos, this.gutterTop + ((RGraph.GetHeight(this) - this.gutterTop - this.gutterBottom) * (3/10) ) + this.halfGraphHeight, '-' + RGraph.number_format(this, this.scale[2], units_pre, units_post), 'center', align); - } - - if (numYLabels == 5) { - RGraph.Text(context, font, text_size, xPos, this.gutterTop + ((RGraph.GetHeight(this) - this.gutterTop - this.gutterBottom) * (2/10) ) + this.halfGraphHeight, '-' + RGraph.number_format(this, this.scale[1], units_pre, units_post), 'center', align); - RGraph.Text(context, font, text_size, xPos, this.gutterTop + ((RGraph.GetHeight(this) - this.gutterTop - this.gutterBottom) * (4/10) ) + this.halfGraphHeight, '-' + RGraph.number_format(this, this.scale[3], units_pre, units_post), 'center', align); - } - - RGraph.Text(context, font, text_size, xPos, this.gutterTop + ((RGraph.GetHeight(this) - this.gutterTop - this.gutterBottom) * (5/10) ) + this.halfGraphHeight, '-' + RGraph.number_format(this, this.scale[4], units_pre, units_post), 'center', align); - - } else if (numYLabels == 10) { - // 10 Y labels - var interval = (this.grapharea / numYLabels) / 2; - - for (var i=0; i= 5) { - RGraph.Text(context, font, text_size, xPos, this.gutterTop + ((RGraph.GetHeight(this) - this.gutterTop - this.gutterBottom) * (2/5) ), RGraph.number_format(this, this.scale[1], units_pre, units_post), 'center', align); - RGraph.Text(context, font, text_size, xPos, this.gutterTop + ((RGraph.GetHeight(this) - this.gutterTop - this.gutterBottom) * (4/5) ), RGraph.number_format(this, this.scale[3], units_pre, units_post), 'center', align); - } - - if (numYLabels >= 3) { - RGraph.Text(context, font, text_size, xPos, this.gutterTop + ((RGraph.GetHeight(this) - this.gutterTop - this.gutterBottom) * (3/5) ), RGraph.number_format(this, this.scale[2], units_pre, units_post), 'center', align); - RGraph.Text(context, font, text_size, xPos, this.gutterTop + ((RGraph.GetHeight(this) - this.gutterTop - this.gutterBottom) * (1/5) ), RGraph.number_format(this, this.scale[0], units_pre, units_post), 'center', align); - } - } else { - RGraph.Text(context, font, text_size, xPos, this.gutterTop, RGraph.number_format(this, this.scale[4], units_pre, units_post), 'center', align); - - if (numYLabels >= 5) { - RGraph.Text(context, font, text_size, xPos, this.gutterTop + ((RGraph.GetHeight(this) - this.gutterTop - this.gutterBottom) * (1/5) ), RGraph.number_format(this, this.scale[3], units_pre, units_post), 'center', align); - RGraph.Text(context, font, text_size, xPos, this.gutterTop + ((RGraph.GetHeight(this) - this.gutterTop - this.gutterBottom) * (3/5) ), RGraph.number_format(this, this.scale[1], units_pre, units_post), 'center', align); - } - - if (numYLabels >= 3) { - RGraph.Text(context, font, text_size, xPos, this.gutterTop + ((RGraph.GetHeight(this) - this.gutterTop - this.gutterBottom) * (2/5) ), RGraph.number_format(this, this.scale[2], units_pre, units_post), 'center', align); - RGraph.Text(context, font, text_size, xPos, this.gutterTop + ((RGraph.GetHeight(this) - this.gutterTop - this.gutterBottom) * (4/5) ), RGraph.number_format(this, this.scale[0], units_pre, units_post), 'center', align); - } - } - } else if (numYLabels == 10) { - var interval = (this.grapharea / numYLabels) / 2; - if (invert) { - for (var i=numYLabels; i>=0; --i) { - RGraph.Text(context, font, text_size, xPos,this.gutterTop + ((RGraph.GetHeight(this) - this.gutterTop - this.gutterBottom) * ((10-i)/10) ), - - RGraph.number_format(this,(this.max - (this.max * (i/10))).toFixed((this.Get('chart.scale.decimals'))), units_pre, units_post), - - 'center', align); - } - } else { - // 10 Y labels - for (var i=0; i 0) { - angle = -1 * this.Get('chart.text.angle'); - valign = 'center'; - halign = 'right'; - yPos -= 10; - } - - for (i=0; i= 2) { - - this.context.lineCap = 'round'; - this.context.lineJoin = 'round'; - this.context.lineWidth = this.GetLineWidth(i);// i is the index of the set of coordinates - this.context.strokeStyle = this.Get('chart.line.colors')[i]; - this.context.beginPath(); - - var len = this.coords[i].length; - - for (var j=0; j 0) { - - var i=0; - - for (var set=0; set= (xCoord - offset) && - mouseY <= (yCoord + offset) && - mouseY >= (yCoord - offset)) { - - return [xCoord, yCoord, set, i, obj.data[set][i][3]]; - } - } - } - } - - - /** - * Draws the above line labels - */ - RGraph.Scatter.prototype.DrawAboveLabels = function () - { - var context = this.context; - var size = this.Get('chart.labels.above.size'); - var font = this.Get('chart.text.font'); - var units_pre = this.Get('chart.units.pre'); - var units_post = this.Get('chart.units.post'); - - - for (var set=0; set {title} - - - - - + + + @@ -25,35 +77,12 @@

Class Coverage Distribution

- - +

Class Complexity

- - +
diff --git a/PHP/CodeCoverage/Report/HTML/Renderer/Template/highcharts.js b/PHP/CodeCoverage/Report/HTML/Renderer/Template/highcharts.js new file mode 100755 index 000000000..0a9d24f9d --- /dev/null +++ b/PHP/CodeCoverage/Report/HTML/Renderer/Template/highcharts.js @@ -0,0 +1,170 @@ +/* + Highcharts JS v2.1.6 (2011-07-08) + + (c) 2009-2011 Torstein H?nsi + + License: www.highcharts.com/license +*/ +(function(){function pa(a,b){var c;a||(a={});for(c in b)a[c]=b[c];return a}function ja(a,b){return parseInt(a,b||10)}function Pb(a){return typeof a==="string"}function Lb(a){return typeof a==="object"}function dc(a){return typeof a==="number"}function qc(a,b){for(var c=a.length;c--;)if(a[c]===b){a.splice(c,1);break}}function M(a){return a!==Va&&a!==null}function Ea(a,b,c){var d,e;if(Pb(b))if(M(c))a.setAttribute(b,c);else{if(a&&a.getAttribute)e=a.getAttribute(b)}else if(M(b)&&Lb(b))for(d in b)a.setAttribute(d, +b[d]);return e}function rc(a){if(!a||a.constructor!==Array)a=[a];return a}function C(){var a=arguments,b,c,d=a.length;for(b=0;b3?c.length%3:0;return e+(g?c.substr(0,g)+d:"")+c.substr(g).replace(/(\d{3})(?=\d)/g,"$1"+d)+(f?b+$a(a-c).toFixed(f).slice(2):"")}function Ad(){this.symbol=this.color=0}function ec(a,b){Cc=C(a,b.animation)}function Bd(){var a=Wa.global.useUTC;Dc=a?Date.UTC:function(b,c,d,e,f,g){return(new Date(b,c,C(d,1),C(e, +0),C(f,0),C(g,0))).getTime()};bd=a?"getUTCMinutes":"getMinutes";cd=a?"getUTCHours":"getHours";dd=a?"getUTCDay":"getDay";sc=a?"getUTCDate":"getDate";Ec=a?"getUTCMonth":"getMonth";Fc=a?"getUTCFullYear":"getFullYear";Cd=a?"setUTCMinutes":"setMinutes";Dd=a?"setUTCHours":"setHours";ed=a?"setUTCDate":"setDate";Ed=a?"setUTCMonth":"setMonth";Fd=a?"setUTCFullYear":"setFullYear"}function Gc(a){Hc||(Hc=ib(Qb));a&&Hc.appendChild(a);Hc.innerHTML=""}function Ic(){}function Gd(a,b){function c(m,i){function y(k, +o){this.pos=k;this.minor=o;this.isNew=true;o||this.addLabel()}function x(k){if(k){this.options=k;this.id=k.id}return this}function Q(k,o,r){this.isNegative=o;this.options=k;this.x=r;this.alignOptions={align:k.align||(qa?o?"left":"right":"center"),verticalAlign:k.verticalAlign||(qa?"middle":o?"bottom":"top"),y:C(k.y,qa?4:o?14:-6),x:C(k.x,qa?o?-6:6:0)};this.textAlign=k.textAlign||(qa?o?"right":"left":"center")}function na(){var k=[],o=[],r;T=ra=null;Fa=[];u(Ia,function(q){r=false;u(["xAxis","yAxis"], +function(ma){if(q.isCartesian&&(ma==="xAxis"&&Ga||ma==="yAxis"&&!Ga)&&(q.options[ma]===i.index||q.options[ma]===Va&&i.index===0)){q[ma]=v;Fa.push(q);r=true}});if(!q.visible&&w.ignoreHiddenSeries)r=false;if(r){var A,U,G,V,Ba;if(!Ga){A=q.options.stacking;Jc=A==="percent";if(A){V=q.type+C(q.options.stack,"");Ba="-"+V;q.stackKey=V;U=k[V]||[];k[V]=U;G=o[Ba]||[];o[Ba]=G}if(Jc){T=0;ra=99}}if(q.isCartesian){u(q.data,function(ma){var s=ma.x,W=ma.y,ba=W<0,ia=ba?G:U,zb=ba?Ba:V;if(T===null)T=ra=ma[$];if(Ga)if(s> +ra)ra=s;else{if(sra)ra=W;else if(ma=0){T=0;Hd=true}else if(ra<0){ra=0;Id=true}}}})}function O(k,o){var r,q;Fb=o?1:sa.pow(10,kb(sa.log(k)/sa.LN10));r=k/Fb;if(!o){o=[1,2,2.5,5,10];if(i.allowDecimals===false||H)if(Fb===1)o=[1,2,5,10];else if(Fb<=0.1)o=[1/Fb]}for(q= +0;q0||!Id))fa+=k*Kd}Ta=ca===fa?1:Rb&&!A&&U===r.options.tickPixelInterval?r.tickInterval:C(A,Xa?1:(fa-ca)*U/oa);if(!F&&!M(i.tickInterval))Ta=O(Ta);v.tickInterval=Ta;Kc=i.minorTickInterval==="auto"&&Ta?Ta/5:i.minorTickInterval;if(F){ta=[];A=Wa.global.useUTC;var G=1E3/rb,V=6E4/ +rb,Ba=36E5/rb;U=864E5/rb;k=6048E5/rb;q=2592E6/rb;var ma=31556952E3/rb,s=[["second",G,[1,2,5,10,15,30]],["minute",V,[1,2,5,10,15,30]],["hour",Ba,[1,2,3,4,6,8,12]],["day",U,[1,2]],["week",k,[1,2]],["month",q,[1,2,3,4,6]],["year",ma,null]],W=s[6],ba=W[1],ia=W[2];for(r=0;r=G)ia.setSeconds(ba>=V?0:s*kb(ia.getSeconds()/ +s));if(ba>=V)ia[Cd](ba>=Ba?0:s*kb(ia[bd]()/s));if(ba>=Ba)ia[Dd](ba>=U?0:s*kb(ia[cd]()/s));if(ba>=U)ia[ed](ba>=q?1:s*kb(ia[sc]()/s));if(ba>=q){ia[Ed](ba>=ma?0:s*kb(ia[Ec]()/s));o=ia[Fc]()}if(ba>=ma){o-=o%s;ia[Fd](o)}ba===k&&ia[ed](ia[sc]()-ia[dd]()+i.startOfWeek);r=1;o=ia[Fc]();G=ia.getTime()/rb;V=ia[Ec]();for(Ba=ia[sc]();Go&&ta.shift();if(i.endOnTick)fa=r;else faMb[$])Mb[$]=ta.length}}function Aa(){var k,o;Gb=ca;Ld=fa;na();Ma();fb=ua;ua=oa/(fa-ca||1);if(!Ga)for(k in t)for(o in t[k])t[k][o].cum=t[k][o].total;if(!v.isDirty)v.isDirty= +ca!==Gb||fa!==Ld}function Qa(k){k=(new x(k)).render();Sb.push(k);return k}function Ra(){var k=i.title,o=i.stackLabels,r=i.alternateGridColor,q=i.lineWidth,A,U,G=m.hasRendered,V=G&&M(Gb)&&!isNaN(Gb);A=Fa.length&&M(ca)&&M(fa);oa=z?Ca:xa;ua=oa/(fa-ca||1);eb=z?Y:sb;if(A||Rb){if(Kc&&!Xa)for(A=ca+(ta[0]-ca)%Kc;A<=fa;A+=Kc){Zb[A]||(Zb[A]=new y(A,true));V&&Zb[A].isNew&&Zb[A].render(null,true);Zb[A].isActive=true;Zb[A].render()}u(ta,function(s,W){if(!Rb||s>=ca&&s<=fa){V&&tb[s].isNew&&tb[s].render(W,true); +tb[s].isActive=true;tb[s].render(W)}});r&&u(ta,function(s,W){if(W%2===0&&s=1E3?zd(k,0):k},Oc=z&&i.labels.staggerLines,$b=i.reversed,ac=Xa&&i.tickmarkPlacement==="between"?0.5:0;y.prototype={addLabel:function(){var k=this.pos,o=i.labels,r=!(k===ca&&!C(i.showFirstLabel,1)||k===fa&&!C(i.showLastLabel,0)),q=Xa&&z&&Xa.length&&!o.step&&!o.staggerLines&&!o.rotation&&Ca/Xa.length||!z&&Ca/2,A=this.label;k=$d.call({isFirst:k===ta[0],isLast:k===ta[ta.length-1],dateTimeLabelFormat:Lc,value:Xa&&Xa[k]?Xa[k]: +k});q=q&&{width:Ha(1,X(q-2*(o.padding||10)))+bb};q=pa(q,o.style);if(A===Va)this.label=M(k)&&r&&o.enabled?ga.text(k,0,0).attr({align:o.align,rotation:o.rotation}).css(q).add(gc):null;else A&&A.attr({text:k}).css(q)},getLabelSize:function(){var k=this.label;return k?(this.labelBBox=k.getBBox())[z?"height":"width"]:0},render:function(k,o){var r=!this.minor,q=this.label,A=this.pos,U=i.labels,G=this.gridLine,V=r?i.gridLineWidth:i.minorGridLineWidth,Ba=r?i.gridLineColor:i.minorGridLineColor,ma=r?i.gridLineDashStyle: +i.minorGridLineDashStyle,s=this.mark,W=r?i.tickLength:i.minorTickLength,ba=r?i.tickWidth:i.minorTickWidth||0,ia=r?i.tickColor:i.minorTickColor,zb=r?i.tickPosition:i.minorTickPosition;r=U.step;var lb=o&&Pc||Ua,Nb;Nb=z?Ib(A+ac,null,null,o)+eb:Y+P+(Ka?(o&&jd||Ya)-Hb-Y:0);lb=z?lb-sb+P-(Ka?xa:0):lb-Ib(A+ac,null,null,o)-eb;if(V){A=Tb(A+ac,V,o);if(G===Va){G={stroke:Ba,"stroke-width":V};if(ma)G.dashstyle=ma;this.gridLine=G=V?ga.path(A).attr(G).add(L):null}G&&A&&G.animate({d:A})}if(ba){if(zb==="inside")W= +-W;if(Ka)W=-W;V=ga.crispLine([ab,Nb,lb,La,Nb+(z?0:-W),lb+(z?W:0)],ba);if(s)s.animate({d:V});else this.mark=ga.path(V).attr({stroke:ia,"stroke-width":ba}).add(gc)}if(q&&!isNaN(Nb)){Nb=Nb+U.x-(ac&&z?ac*ua*($b?-1:1):0);lb=lb+U.y-(ac&&!z?ac*ua*($b?1:-1):0);M(U.y)||(lb+=ja(q.styles.lineHeight)*0.9-q.getBBox().height/2);if(Oc)lb+=k/(r||1)%Oc*16;if(r)q[k%r?"hide":"show"]();q[this.isNew?"attr":"animate"]({x:Nb,y:lb})}this.isNew=false},destroy:function(){for(var k in this)this[k]&&this[k].destroy&&this[k].destroy()}}; +x.prototype={render:function(){var k=this,o=k.options,r=o.label,q=k.label,A=o.width,U=o.to,G,V=o.from,Ba=o.dashStyle,ma=k.svgElem,s=[],W,ba,ia=o.color;ba=o.zIndex;var zb=o.events;if(A){s=Tb(o.value,A);o={stroke:ia,"stroke-width":A};if(Ba)o.dashstyle=Ba}else if(M(V)&&M(U)){V=Ha(V,ca);U=qb(U,fa);G=Tb(U);if((s=Tb(V))&&G)s.push(G[4],G[5],G[1],G[2]);else s=null;o={fill:ia}}else return;if(M(ba))o.zIndex=ba;if(ma)if(s)ma.animate({d:s},null,ma.onGetPath);else{ma.hide();ma.onGetPath=function(){ma.show()}}else if(s&& +s.length){k.svgElem=ma=ga.path(s).attr(o).add();if(zb){Ba=function(lb){ma.on(lb,function(Nb){zb[lb].apply(k,[Nb])})};for(W in zb)Ba(W)}}if(r&&M(r.text)&&s&&s.length&&Ca>0&&xa>0){r=va({align:z&&G&&"center",x:z?!G&&4:10,verticalAlign:!z&&G&&"middle",y:z?G?16:10:G?6:-4,rotation:z&&!G&&90},r);if(!q)k.label=q=ga.text(r.text,0,0).attr({align:r.textAlign||r.align,rotation:r.rotation,zIndex:ba}).css(r.style).add();G=[s[1],s[4],C(s[6],s[1])];s=[s[2],s[5],C(s[7],s[2])];W=qb.apply(sa,G);ba=qb.apply(sa,s);q.align(r, +false,{x:W,y:ba,width:Ha.apply(sa,G)-W,height:Ha.apply(sa,s)-ba});q.show()}else q&&q.hide();return k},destroy:function(){for(var k in this){this[k]&&this[k].destroy&&this[k].destroy();delete this[k]}qc(Sb,this)}};Q.prototype={setTotal:function(k){this.cum=this.total=k},render:function(k){var o=this.options.formatter.call(this);if(this.label)this.label.attr({text:o,visibility:ub});else this.label=m.renderer.text(o,0,0).css(this.options.style).attr({align:this.textAlign,rotation:this.options.rotation, +visibility:ub}).add(k)},setOffset:function(k,o){var r=this.isNegative,q=v.translate(this.total),A=v.translate(0);A=$a(q-A);var U=m.xAxis[0].translate(this.x)+k,G=m.plotHeight;r={x:qa?r?q:q-A:U,y:qa?G-U-o:r?G-q-A:G-q,width:qa?A:o,height:qa?o:A};this.label&&this.label.align(this.alignOptions,null,r).attr({visibility:Ab})}};Ib=function(k,o,r,q,A){var U=1,G=0,V=q?fb:ua;q=q?Gb:ca;V||(V=ua);if(r){U*=-1;G=oa}if($b){U*=-1;G-=U*oa}if(o){if($b)k=oa-k;k=k/V+q;if(H&&A)k=sa.pow(10,k)}else{if(H&&A)k=sa.log(k)/ +sa.LN10;k=U*(k-q)*V+G}return k};Tb=function(k,o,r){var q,A,U;k=Ib(k,null,null,r);var G=r&&Pc||Ua,V=r&&jd||Ya,Ba;r=A=X(k+eb);q=U=X(G-k-eb);if(isNaN(k))Ba=true;else if(z){q=ha;U=G-sb;if(rY+Ca)Ba=true}else{r=Y;A=V-Hb;if(qha+xa)Ba=true}return Ba?null:ga.crispLine([ab,r,q,La,A,U],o||0)};if(qa&&Ga&&$b===Va)$b=true;pa(v,{addPlotBand:Qa,addPlotLine:Qa,adjustTickAmount:function(){if(Mb&&!F&&!Xa&&!Rb){var k=hc,o=ta.length;hc=Mb[$];if(ok)k=ca;else if(fa'+(H? +Nc("%A, %b %e, %Y",P):P)+""]:[];u(F,function(ua){oa.push(ua.point.tooltipFormatter($))});return oa.join("
")}function y(F,H){z=Za?F:(2*z+F)/3;Z=Za?H:(Z+H)/2;t.translate(z,Z);kd=$a(F-z)>1||$a(H-Z)>1?function(){y(F,H)}:null}function x(){if(!Za){var F=p.hoverPoints;t.hide();u(ea,function(H){H&&H.hide()});F&&u(F,function(H){H.setState()});p.hoverPoints=null;Za=true}}var Q,na=m.borderWidth,O=m.crosshairs,ea=[],Ma=m.style,Aa=m.shared,Qa=ja(Ma.padding),Ra=na+Qa,Za=true,Ga,Ka,z=0,Z=0;Ma.padding= +0;var t=ga.g("tooltip").attr({zIndex:8}).add(),v=ga.rect(Ra,Ra,0,0,m.borderRadius,na).attr({fill:m.backgroundColor,"stroke-width":na}).add(t).shadow(m.shadow),N=ga.text("",Qa+Ra,ja(Ma.fontSize)+Qa+Ra).attr({zIndex:1}).css(Ma).add(t);t.hide();return{shared:Aa,refresh:function(F){var H,P,$,oa=0,ua={},fb=[];$=F.tooltipPos;H=m.formatter||i;ua=p.hoverPoints;if(Aa){ua&&u(ua,function(eb){eb.setState()});p.hoverPoints=F;u(F,function(eb){eb.setState(Bb);oa+=eb.plotY;fb.push(eb.getLabelConfig())});P=F[0].plotX; +oa=X(oa)/F.length;ua={x:F[0].category};ua.points=fb;F=F[0]}else ua=F.getLabelConfig();ua=H.call(ua);Q=F.series;P=Aa?P:F.plotX;oa=Aa?oa:F.plotY;H=X($?$[0]:qa?Ca-oa:P);P=X($?$[1]:qa?xa-P:oa);$=Aa||!F.series.isCartesian||kc(H,P);if(ua===false||!$)x();else{if(Za){t.show();Za=false}N.attr({text:ua});$=N.getBBox();Ga=$.width+2*Qa;Ka=$.height+2*Qa;v.attr({width:Ga,height:Ka,stroke:m.borderColor||F.color||Q.color||"#606060"});$=H-Ga+Y-25;P=P-Ka+ha+10;if($<7)$=Y+H+15;if(P<5)P=5;else if(P+Ka>Ua)P=Ua-Ka-5;y(X($- +Ra),X(P-Ra))}if(O){O=rc(O);for(H=O.length;H--;){P=F.series[H?"yAxis":"xAxis"];if(O[H]&&P){P=P.getPlotLinePath(F[H?"y":"x"],1);if(ea[H])ea[H].attr({d:P,visibility:Ab});else{$={"stroke-width":O[H].width||1,stroke:O[H].color||"#C0C0C0",zIndex:2};if(O[H].dashStyle)$.dashstyle=O[H].dashStyle;ea[H]=ga.path(P).attr($).add()}}}}},hide:x}}function f(m,i){function y(z){var Z,t=Nd&&wa.width/wa.documentElement.clientWidth-1,v,N,F;z=z||cb.event;if(!z.target)z.target=z.srcElement;Z=z.touches?z.touches.item(0): +z;if(z.type!=="mousemove"||cb.opera||t){v=ya;N={left:v.offsetLeft,top:v.offsetTop};for(v=v.offsetParent;v;){N.left+=v.offsetLeft;N.top+=v.offsetTop;if(v!==wa.body&&v!==wa.documentElement){N.left-=v.scrollLeft;N.top-=v.scrollTop}v=v.offsetParent}tc=N;v=tc.left;N=tc.top}if(Bc){F=z.x;Z=z.y}else if(Z.layerX===Va){F=Z.pageX-v;Z=Z.pageY-N}else{F=z.layerX;Z=z.layerY}if(t){F+=X((t+1)*v-v);Z+=X((t+1)*N-N)}return pa(z,{chartX:F,chartY:Z})}function x(z){var Z={xAxis:[],yAxis:[]};u(db,function(t){var v=t.translate, +N=t.isXAxis;Z[N?"xAxis":"yAxis"].push({axis:t,value:v((qa?!N:N)?z.chartX-Y:xa-z.chartY+ha,true)})});return Z}function Q(){var z=m.hoverSeries,Z=m.hoverPoint;Z&&Z.onMouseOut();z&&z.onMouseOut();uc&&uc.hide();ld=null}function na(){if(Aa){var z={xAxis:[],yAxis:[]},Z=Aa.getBBox(),t=Z.x-Y,v=Z.y-ha;if(Ma){u(db,function(N){var F=N.translate,H=N.isXAxis,P=qa?!H:H,$=F(P?t:xa-v-Z.height,true,0,0,1);F=F(P?t+Z.width:xa-v,true,0,0,1);z[H?"xAxis":"yAxis"].push({axis:N,min:qb($,F),max:Ha($,F)})});Pa(m,"selection", +z,md)}Aa=Aa.destroy()}m.mouseIsDown=nd=Ma=false;Cb(wa,Jb?"touchend":"mouseup",na)}var O,ea,Ma,Aa,Qa=w.zoomType,Ra=/x/.test(Qa),Za=/y/.test(Qa),Ga=Ra&&!qa||Za&&qa,Ka=Za&&!qa||Ra&&qa;Qc=function(){if(Rc){Rc.translate(Y,ha);qa&&Rc.attr({width:m.plotWidth,height:m.plotHeight}).invert()}else m.trackerGroup=Rc=ga.g("tracker").attr({zIndex:9}).add()};Qc();if(i.enabled)m.tooltip=uc=e(i);(function(){var z=true;ya.onmousedown=function(t){t=y(t);!Jb&&t.preventDefault&&t.preventDefault();m.mouseIsDown=nd=true; +O=t.chartX;ea=t.chartY;Sa(wa,Jb?"touchend":"mouseup",na)};var Z=function(t){if(!(t&&t.touches&&t.touches.length>1)){t=y(t);if(!Jb)t.returnValue=false;var v=t.chartX,N=t.chartY,F=!kc(v-Y,N-ha);if(Jb&&t.type==="touchstart")if(Ea(t.target,"isTracker"))m.runTrackerClick||t.preventDefault();else!ae&&!F&&t.preventDefault();if(F){z||Q();if(vY+Ca)v=Y+Ca;if(Nha+xa)N=ha+xa}if(nd&&t.type!=="touchstart"){Ma=Math.sqrt(Math.pow(O-v,2)+Math.pow(ea-N,2));if(Ma>10){if(lc&&(Ra|| +Za)&&kc(O-Y,ea-ha))Aa||(Aa=ga.rect(Y,ha,Ga?1:Ca,Ka?1:xa,0).attr({fill:"rgba(69,114,167,0.25)",zIndex:7}).add());if(Aa&&Ga){v=v-O;Aa.attr({width:$a(v),x:(v>0?0:v)+O})}if(Aa&&Ka){N=N-ea;Aa.attr({height:$a(N),y:(N>0?0:N)+ea})}}}else if(!F){var H;N=m.hoverPoint;v=m.hoverSeries;var P,$,oa=Ya,ua=qa?t.chartY:t.chartX-Y;if(uc&&i.shared){H=[];P=Ia.length;for($=0;$ +oa&&H.splice(P,1);if(H.length&&H[0].plotX!==ld){uc.refresh(H);ld=H[0].plotX}}if(v&&v.tracker)(t=v.tooltipPoints[ua])&&t!==N&&t.onMouseOver()}return(z=F)||!lc}};ya.onmousemove=Z;Sa(ya,"mouseleave",Q);ya.ontouchstart=function(t){if(Ra||Za)ya.onmousedown(t);Z(t)};ya.ontouchmove=Z;ya.ontouchend=function(){Ma&&Q()};ya.onclick=function(t){var v=m.hoverPoint;t=y(t);t.cancelBubble=true;if(!Ma)if(v&&Ea(t.target,"isTracker")){var N=v.plotX,F=v.plotY;pa(v,{pageX:tc.left+Y+(qa?Ca-F:N),pageY:tc.top+ha+(qa?xa- +N:F)});Pa(v.series,"click",pa(t,{point:v}));v.firePointEvent("click",t)}else{pa(t,x(t));kc(t.chartX-Y,t.chartY-ha)&&Pa(m,"click",t)}Ma=false}})();Od=setInterval(function(){kd&&kd()},32);pa(this,{zoomX:Ra,zoomY:Za,resetTracker:Q})}function g(m){var i=m.type||w.type||w.defaultSeriesType,y=vb[i],x=p.hasRendered;if(x)if(qa&&i==="column")y=vb.bar;else if(!qa&&i==="bar")y=vb.column;i=new y;i.init(p,m);if(!x&&i.inverted)qa=true;if(i.isCartesian)lc=i.isCartesian;Ia.push(i);return i}function h(){w.alignTicks!== +false&&u(db,function(m){m.adjustTickAmount()});Mb=null}function j(m){var i=p.isDirtyLegend,y,x=p.isDirtyBox,Q=Ia.length,na=Q,O=p.clipRect;for(ec(m,p);na--;){m=Ia[na];if(m.isDirty&&m.options.stacking){y=true;break}}if(y)for(na=Q;na--;){m=Ia[na];if(m.options.stacking)m.isDirty=true}u(Ia,function(ea){if(ea.isDirty){ea.cleanData();ea.getSegments();if(ea.options.legendType==="point")i=true}});if(i&&od.renderLegend){od.renderLegend();p.isDirtyLegend=false}if(lc){if(!Sc){Mb=null;u(db,function(ea){ea.setScale()})}h(); +vc();u(db,function(ea){if(ea.isDirty||x){ea.redraw();x=true}})}if(x){pd();Qc();if(O){Tc(O);O.animate({width:p.plotSizeX,height:p.plotSizeY})}}u(Ia,function(ea){if(ea.isDirty&&ea.visible&&(!ea.isCartesian||ea.xAxis))ea.redraw()});jc&&jc.resetTracker&&jc.resetTracker();Pa(p,"redraw")}function l(){var m=a.xAxis||{},i=a.yAxis||{},y;m=rc(m);u(m,function(x,Q){x.index=Q;x.isX=true});i=rc(i);u(i,function(x,Q){x.index=Q});db=m.concat(i);p.xAxis=[];p.yAxis=[];db=mc(db,function(x){y=new c(p,x);p[y.isXAxis?"xAxis": +"yAxis"].push(y);return y});h()}function n(m,i){Kb=va(a.title,m);wc=va(a.subtitle,i);u([["title",m,Kb],["subtitle",i,wc]],function(y){var x=y[0],Q=p[x],na=y[1];y=y[2];if(Q&&na){Q.destroy();Q=null}if(y&&y.text&&!Q)p[x]=ga.text(y.text,0,0).attr({align:y.align,"class":"highcharts-"+x,zIndex:1}).css(y.style).add().align(y,false,Ob)})}function J(){mb=w.renderTo;Pd=nc+qd++;if(Pb(mb))mb=wa.getElementById(mb);mb.innerHTML="";if(!mb.offsetWidth){Vb=mb.cloneNode(0);Na(Vb,{position:oc,top:"-9999px",display:""}); +wa.body.appendChild(Vb)}Uc=(Vb||mb).offsetWidth;xc=(Vb||mb).offsetHeight;p.chartWidth=Ya=w.width||Uc||600;p.chartHeight=Ua=w.height||(xc>19?xc:400);p.container=ya=ib(Qb,{className:"highcharts-container"+(w.className?" "+w.className:""),id:Pd},pa({position:Qd,overflow:ub,width:Ya+bb,height:Ua+bb,textAlign:"left"},w.style),Vb||mb);p.renderer=ga=w.forExport?new Vc(ya,Ya,Ua,true):new Wc(ya,Ya,Ua);var m,i;if(Rd&&ya.getBoundingClientRect){m=function(){Na(ya,{left:0,top:0});i=ya.getBoundingClientRect(); +Na(ya,{left:-(i.left-ja(i.left))+bb,top:-(i.top-ja(i.top))+bb})};m();Sa(cb,"resize",m);Sa(p,"destroy",function(){Cb(cb,"resize",m)})}}function D(){function m(){var y=w.width||mb.offsetWidth,x=w.height||mb.offsetHeight;if(y&&x){if(y!==Uc||x!==xc){clearTimeout(i);i=setTimeout(function(){rd(y,x,false)},100)}Uc=y;xc=x}}var i;Sa(cb,"resize",m);Sa(p,"destroy",function(){Cb(cb,"resize",m)})}function aa(){var m=a.labels,i=a.credits,y;n();od=p.legend=new be(p);vc();u(db,function(x){x.setTickPositions(true)}); +h();vc();pd();lc&&u(db,function(x){x.render()});if(!p.seriesGroup)p.seriesGroup=ga.g("series-group").attr({zIndex:3}).add();u(Ia,function(x){x.translate();x.setTooltipPoints();x.render()});m.items&&u(m.items,function(){var x=pa(m.style,this.style),Q=ja(x.left)+Y,na=ja(x.top)+ha+12;delete x.left;delete x.top;ga.text(this.html,Q,na).attr({zIndex:2}).css(x).add()});if(!p.toolbar)p.toolbar=d(p);if(i.enabled&&!p.credits){y=i.href;ga.text(i.text,0,0).on("click",function(){if(y)location.href=y}).attr({align:i.position.align, +zIndex:8}).css(i.style).add().align(i.position)}Qc();p.hasRendered=true;if(Vb){mb.appendChild(ya);Gc(Vb)}}function E(){var m=Ia.length,i=ya&&ya.parentNode;Pa(p,"destroy");Cb(cb,"unload",E);Cb(p);for(u(db,function(y){Cb(y)});m--;)Ia[m].destroy();if(ya){ya.innerHTML="";Cb(ya);i&&i.removeChild(ya);ya=null}if(ga)ga.alignedObjects=null;clearInterval(Od);for(m in p)delete p[m]}function da(){if(!yc&&cb==cb.top&&wa.readyState!=="complete")wa.attachEvent("onreadystatechange",function(){wa.detachEvent("onreadystatechange", +da);wa.readyState==="complete"&&da()});else{J();sd();td();u(a.series||[],function(m){g(m)});p.inverted=qa=C(qa,a.chart.inverted);l();p.render=aa;p.tracker=jc=new f(p,a.tooltip);aa();Pa(p,"load");b&&b.apply(p,[p]);u(p.callbacks,function(m){m.apply(p,[p])})}}Mc=va(Mc,Wa.xAxis);hd=va(hd,Wa.yAxis);Wa.xAxis=Wa.yAxis=null;a=va(Wa,a);var w=a.chart,R=w.margin;R=Lb(R)?R:[R,R,R,R];var B=C(w.marginTop,R[0]),K=C(w.marginRight,R[1]),S=C(w.marginBottom,R[2]),I=C(w.marginLeft,R[3]),za=w.spacingTop,Da=w.spacingRight, +gb=w.spacingBottom,wb=w.spacingLeft,Ob,Kb,wc,ha,Hb,sb,Y,Ub,mb,Vb,ya,Pd,Uc,xc,Ya,Ua,jd,Pc,Xc,ud,vd,Yc,p=this,ae=(R=w.events)&&!!R.click,wd,kc,uc,nd,bc,Sd,xd,xa,Ca,jc,Rc,Qc,od,Wb,Xb,tc,lc=w.showAxes,Sc=0,db=[],Mb,Ia=[],qa,ga,kd,Od,ld,pd,vc,sd,td,rd,md,Td,be=function(m){function i(L,ka){var T=L.legendItem,ra=L.legendLine,Fa=L.legendSymbol,Ja=Ka.color,Oa=ka?O.itemStyle.color:Ja,fa=ka?L.color:Ja;Ja=ka?L.pointAttr[hb]:{stroke:Ja,fill:Ja};T&&T.css({fill:Oa});ra&&ra.attr({stroke:fa});Fa&&Fa.attr(Ja)}function y(L, +ka,T){var ra=L.legendItem,Fa=L.legendLine,Ja=L.legendSymbol;L=L.checkbox;ra&&ra.attr({x:ka,y:T});Fa&&Fa.translate(ka,T-4);Ja&&Ja.attr({x:ka+Ja.xOff,y:T+Ja.yOff});if(L){L.x=ka;L.y=T}}function x(){u(Qa,function(L){var ka=L.checkbox,T=fb.alignAttr;ka&&Na(ka,{left:T.translateX+L.legendItemWidth+ka.x-40+bb,top:T.translateY+ka.y-11+bb})})}function Q(L){var ka,T,ra,Fa,Ja=L.legendItem;Fa=L.series||L;var Oa=Fa.options,fa=Oa&&Oa.borderWidth||0;if(!Ja){Fa=/^(bar|pie|area|column)$/.test(Fa.type);L.legendItem= +Ja=ga.text(O.labelFormatter.call(L),0,0).css(L.visible?Za:Ka).on("mouseover",function(){L.setState(Bb);Ja.css(Ga)}).on("mouseout",function(){Ja.css(L.visible?Za:Ka);L.setState()}).on("click",function(){var Gb=function(){L.setVisible()};L.firePointEvent?L.firePointEvent("legendItemClick",null,Gb):Pa(L,"legendItemClick",null,Gb)}).attr({zIndex:2}).add(fb);if(!Fa&&Oa&&Oa.lineWidth){var ca={"stroke-width":Oa.lineWidth,zIndex:2};if(Oa.dashStyle)ca.dashstyle=Oa.dashStyle;L.legendLine=ga.path([ab,-Ma-Aa, +0,La,-Aa,0]).attr(ca).add(fb)}if(Fa)ka=ga.rect(T=-Ma-Aa,ra=-11,Ma,12,2).attr({zIndex:3}).add(fb);else if(Oa&&Oa.marker&&Oa.marker.enabled)ka=ga.symbol(L.symbol,T=-Ma/2-Aa,ra=-4,Oa.marker.radius).attr({zIndex:3}).add(fb);if(ka){ka.xOff=T+fa%2/2;ka.yOff=ra+fa%2/2}L.legendSymbol=ka;i(L,L.visible);if(Oa&&Oa.showCheckbox){L.checkbox=ib("input",{type:"checkbox",checked:L.selected,defaultChecked:L.selected},O.itemCheckboxStyle,ya);Sa(L.checkbox,"click",function(Gb){Pa(L,"checkboxClick",{checked:Gb.target.checked}, +function(){L.select()})})}}ka=Ja.getBBox();T=L.legendItemWidth=O.itemWidth||Ma+Aa+ka.width+Z;P=ka.height;if(ea&&N-v+T>(Ib||Ya-2*z-v)){N=v;F+=P}H=F;y(L,N,F);if(ea)N+=T;else F+=P;eb=Ib||Ha(ea?N-v:T,eb)}function na(){N=v;F=t;H=eb=0;fb||(fb=ga.g("legend").attr({zIndex:7}).add());Qa=[];u(Tb,function(ra){var Fa=ra.options;if(Fa.showInLegend)Qa=Qa.concat(Fa.legendType==="point"?ra.data:ra)});Qa.sort(function(ra,Fa){return(ra.options.legendIndex||0)-(Fa.options.legendIndex||0)});gc&&Qa.reverse();u(Qa,Q); +Wb=Ib||eb;Xb=H-t+P;if(oa||ua){Wb+=2*z;Xb+=2*z;if($)Wb>0&&Xb>0&&$.animate($.crisp(null,null,null,Wb,Xb));else $=ga.rect(0,0,Wb,Xb,O.borderRadius,oa||0).attr({stroke:O.borderColor,"stroke-width":oa||0,fill:ua||jb}).add(fb).shadow(O.shadow);$[Qa.length?"show":"hide"]()}for(var L=["left","right","top","bottom"],ka,T=4;T--;){ka=L[T];if(Ra[ka]&&Ra[ka]!=="auto"){O[T<2?"align":"verticalAlign"]=ka;O[T<2?"x":"y"]=ja(Ra[ka])*(T%2?-1:1)}}fb.align(pa(O,{width:Wb,height:Xb}),true,Ob);Sc||x()}var O=m.options.legend; +if(O.enabled){var ea=O.layout==="horizontal",Ma=O.symbolWidth,Aa=O.symbolPadding,Qa,Ra=O.style,Za=O.itemStyle,Ga=O.itemHoverStyle,Ka=O.itemHiddenStyle,z=ja(Ra.padding),Z=20,t=18,v=4+z+Ma+Aa,N,F,H,P=0,$,oa=O.borderWidth,ua=O.backgroundColor,fb,eb,Ib=O.width,Tb=m.series,gc=O.reversed;na();Sa(m,"endResize",x);return{colorizeItem:i,destroyItem:function(L){var ka=L.checkbox;u(["legendItem","legendLine","legendSymbol"],function(T){L[T]&&L[T].destroy()});ka&&Gc(L.checkbox)},renderLegend:na}}};kc=function(m, +i){return m>=0&&m<=Ca&&i>=0&&i<=xa};Td=function(){Pa(p,"selection",{resetSelection:true},md);p.toolbar.remove("zoom")};md=function(m){var i=Wa.lang,y=p.pointCount<100;p.toolbar.add("zoom",i.resetZoom,i.resetZoomTitle,Td);!m||m.resetSelection?u(db,function(x){x.setExtremes(null,null,false,y)}):u(m.xAxis.concat(m.yAxis),function(x){var Q=x.axis;if(p.tracker[Q.isXAxis?"zoomX":"zoomY"])Q.setExtremes(x.min,x.max,false,y)});j()};vc=function(){var m=a.legend,i=C(m.margin,10),y=m.x,x=m.y,Q=m.align,na=m.verticalAlign, +O;sd();if((p.title||p.subtitle)&&!M(B))if(O=Ha(p.title&&!Kb.floating&&!Kb.verticalAlign&&Kb.y||0,p.subtitle&&!wc.floating&&!wc.verticalAlign&&wc.y||0))ha=Ha(ha,O+C(Kb.margin,15)+za);if(m.enabled&&!m.floating)if(Q==="right")M(K)||(Hb=Ha(Hb,Wb-y+i+Da));else if(Q==="left")M(I)||(Y=Ha(Y,Wb+y+i+wb));else if(na==="top")M(B)||(ha=Ha(ha,Xb+x+i+za));else if(na==="bottom")M(S)||(sb=Ha(sb,Xb-x+i+gb));lc&&u(db,function(ea){ea.getOffset()});M(I)||(Y+=Ub[3]);M(B)||(ha+=Ub[0]);M(S)||(sb+=Ub[2]);M(K)||(Hb+=Ub[1]); +td()};rd=function(m,i,y){var x=p.title,Q=p.subtitle;Sc+=1;ec(y,p);Pc=Ua;jd=Ya;p.chartWidth=Ya=X(m);p.chartHeight=Ua=X(i);Na(ya,{width:Ya+bb,height:Ua+bb});ga.setSize(Ya,Ua,y);Ca=Ya-Y-Hb;xa=Ua-ha-sb;Mb=null;u(db,function(na){na.isDirty=true;na.setScale()});u(Ia,function(na){na.isDirty=true});p.isDirtyLegend=true;p.isDirtyBox=true;vc();x&&x.align(null,null,Ob);Q&&Q.align(null,null,Ob);j(y);Pc=null;Pa(p,"resize");setTimeout(function(){Pa(p,"endResize",null,function(){Sc-=1})},Cc&&Cc.duration||500)}; +td=function(){p.plotLeft=Y=X(Y);p.plotTop=ha=X(ha);p.plotWidth=Ca=X(Ya-Y-Hb);p.plotHeight=xa=X(Ua-ha-sb);p.plotSizeX=qa?xa:Ca;p.plotSizeY=qa?Ca:xa;Ob={x:wb,y:za,width:Ya-wb-Da,height:Ua-za-gb}};sd=function(){ha=C(B,za);Hb=C(K,Da);sb=C(S,gb);Y=C(I,wb);Ub=[0,0,0,0]};pd=function(){var m=w.borderWidth||0,i=w.backgroundColor,y=w.plotBackgroundColor,x=w.plotBackgroundImage,Q,na={x:Y,y:ha,width:Ca,height:xa};Q=m+(w.shadow?8:0);if(m||i)if(Xc)Xc.animate(Xc.crisp(null,null,null,Ya-Q,Ua-Q));else Xc=ga.rect(Q/ +2,Q/2,Ya-Q,Ua-Q,w.borderRadius,m).attr({stroke:w.borderColor,"stroke-width":m,fill:i||jb}).add().shadow(w.shadow);if(y)if(ud)ud.animate(na);else ud=ga.rect(Y,ha,Ca,xa,0).attr({fill:y}).add().shadow(w.plotShadow);if(x)if(vd)vd.animate(na);else vd=ga.image(x,Y,ha,Ca,xa).add();if(w.plotBorderWidth)if(Yc)Yc.animate(Yc.crisp(null,Y,ha,Ca,xa));else Yc=ga.rect(Y,ha,Ca,xa,0,w.plotBorderWidth).attr({stroke:w.plotBorderColor,"stroke-width":w.plotBorderWidth,zIndex:4}).add();p.isDirtyBox=false};Sa(cb,"unload", +E);w.reflow!==false&&Sa(p,"load",D);if(R)for(wd in R)Sa(p,wd,R[wd]);p.options=a;p.series=Ia;p.addSeries=function(m,i,y){var x;if(m){ec(y,p);i=C(i,true);Pa(p,"addSeries",{options:m},function(){x=g(m);x.isDirty=true;p.isDirtyLegend=true;i&&p.redraw()})}return x};p.animation=C(w.animation,true);p.destroy=E;p.get=function(m){var i,y,x;for(i=0;i=a)this.color=0},wrapSymbol:function(a){if(this.symbol>=a)this.symbol=0}};la&&la.init&&la.init();if(!la&&cb.jQuery){var ob=jQuery;u=function(a,b){for(var c=0,d=a.length;c-1,f=e?7:3,g;b=b.split(" ");c=[].concat(c);var h,j,l=function(n){for(g=n.length;g--;)n[g]===ab&&n.splice(g+1,0,n[g+1],n[g+2],n[g+1],n[g+2])};if(e){l(b);l(c)}if(a.isArea){h=b.splice(b.length-6,6);j=c.splice(c.length-6,6)}if(d){c=[].concat(c).splice(0,f).concat(c);a.shift=false}if(b.length)for(a=c.length;b.length255)b[e]=255}}return this},setOpacity:function(d){b[3]=d;return this}}};Ic.prototype={init:function(a,b){this.element=wa.createElementNS("http://www.w3.org/2000/svg",b);this.renderer=a},animate:function(a,b,c){if(b=C(b,Cc,true)){b=va(b);if(c)b.complete=c;Zc(this,a,b)}else{this.attr(a);c&&c()}},attr:function(a,b){var c,d,e,f,g=this.element,h=g.nodeName,j= +this.renderer,l,n=this.shadows,J,D=this;if(Pb(a)&&M(b)){c=a;a={};a[c]=b}if(Pb(a)){c=a;if(h==="circle")c={x:"cx",y:"cy"}[c]||c;else if(c==="strokeWidth")c="stroke-width";D=Ea(g,c)||this[c]||0;if(c!=="d"&&c!=="visibility")D=parseFloat(D)}else for(c in a){l=false;d=a[c];if(c==="d"){if(d&&d.join)d=d.join(" ");if(/(NaN| {2}|^$)/.test(d))d="M 0 0";this.d=d}else if(c==="x"&&h==="text"){for(e=0;eg||!M(g)&&M(b))){d.insertBefore(f,a);return this}}d.appendChild(f);this.added=true;return this},destroy:function(){var a=this.element||{},b=this.shadows,c=a.parentNode,d;a.onclick=a.onmouseout=a.onmouseover=a.onmousemove=null;Tc(this);c&&c.removeChild(a);b&&u(b,function(e){(c=e.parentNode)&&c.removeChild(e)});qc(this.renderer.alignedObjects,this);for(d in this)delete this[d];return null},empty:function(){for(var a=this.element,b=a.childNodes, +c=b.length;c--;)a.removeChild(b[c])},shadow:function(a,b){var c=[],d,e,f=this.element,g=this.parentInverted?"(-1,-1)":"(1,1)";if(a){for(d=1;d<=3;d++){e=f.cloneNode(0);Ea(e,{isShadow:"true",stroke:"rgb(0, 0, 0)","stroke-opacity":0.05*d,"stroke-width":7-2*d,transform:"translate"+g,fill:jb});b?b.element.appendChild(e):f.parentNode.insertBefore(e,f);c.push(e)}this.shadows=c}return this}};var Vc=function(){this.init.apply(this,arguments)};Vc.prototype={Element:Ic,init:function(a,b,c,d){var e=location, +f;f=this.createElement("svg").attr({xmlns:"http://www.w3.org/2000/svg",version:"1.1"});a.appendChild(f.element);this.box=f.element;this.boxWrapper=f;this.alignedObjects=[];this.url=Bc?"":e.href.replace(/#.*?$/,"");this.defs=this.createElement("defs").add();this.forExport=d;this.setSize(b,c,false)},createElement:function(a){var b=new this.Element;b.init(this,a);return b},buildText:function(a){for(var b=a.element,c=C(a.textStr,"").toString().replace(/<(b|strong)>/g,'').replace(/<(i|em)>/g, +'').replace(//g,"").split(//g),d=b.childNodes,e=/style="([^"]+)"/,f=/href="([^"]+)"/,g=Ea(b,"x"),h=a.styles,j=Rd&&h&&h.HcDirection==="rtl"&&!this.forExport&&ja(pc.split("Firefox/")[1])<4,l,n=h&&ja(h.width),J=h&&h.lineHeight,D,aa=d.length;aa--;)b.removeChild(d[aa]);n&&!a.added&&this.box.appendChild(b);u(c,function(E,da){var w,R=0,B;E=E.replace(//g,"|||");w=E.split("|||"); +u(w,function(K){if(K!==""||w.length===1){var S={},I=wa.createElementNS("http://www.w3.org/2000/svg","tspan");e.test(K)&&Ea(I,"style",K.match(e)[1].replace(/(;| |^)color([ :])/,"$1fill$2"));if(f.test(K)){Ea(I,"onclick",'location.href="'+K.match(f)[1]+'"');Na(I,{cursor:"pointer"})}K=(K.replace(/<(.|\n)*?>/g,"")||" ").replace(/</g,"<").replace(/>/g,">");if(j){l=[];for(aa=K.length;aa--;)l.push(K.charAt(aa));K=l.join("")}I.appendChild(wa.createTextNode(K));if(R)S.dx=3;else S.x=g;if(!R){if(da){!yc&& +a.renderer.forExport&&Na(I,{display:"block"});B=cb.getComputedStyle&&ja(cb.getComputedStyle(D,null).getPropertyValue("line-height"));if(!B||isNaN(B))B=J||D.offsetHeight||18;Ea(I,"dy",B)}D=I}Ea(I,S);b.appendChild(I);R++;if(n){K=K.replace(/-/g,"- ").split(" ");for(var za,Da=[];K.length||Da.length;){za=b.getBBox().width;S=za>n;if(!S||K.length===1){K=Da;Da=[];if(K.length){I=wa.createElementNS("http://www.w3.org/2000/svg","tspan");Ea(I,{dy:J||16,x:g});b.appendChild(I);if(za>n)n=za}}else{I.removeChild(I.firstChild); +Da.unshift(K.pop())}K.length&&I.appendChild(wa.createTextNode(K.join(" ").replace(/- /g,"-")))}}}})})},crispLine:function(a,b){if(a[1]===a[4])a[1]=a[4]=X(a[1])+b%2/2;if(a[2]===a[5])a[2]=a[5]=X(a[2])+b%2/2;return a},path:function(a){return this.createElement("path").attr({d:a,fill:jb})},circle:function(a,b,c){a=Lb(a)?a:{x:a,y:b,r:c};return this.createElement("circle").attr(a)},arc:function(a,b,c,d,e,f){if(Lb(a)){b=a.y;c=a.r;d=a.innerR;e=a.start;f=a.end;a=a.x}return this.symbol("arc",a||0,b||0,c||0, +{innerR:d||0,start:e||0,end:f||0})},rect:function(a,b,c,d,e,f){if(Lb(a)){b=a.y;c=a.width;d=a.height;e=a.r;f=a.strokeWidth;a=a.x}e=this.createElement("rect").attr({rx:e,ry:e,fill:jb});return e.attr(e.crisp(f,a,b,Ha(c,0),Ha(d,0)))},setSize:function(a,b,c){var d=this.alignedObjects,e=d.length;this.width=a;this.height=b;for(this.boxWrapper[C(c,true)?"animate":"attr"]({width:a,height:b});e--;)d[e].align()},g:function(a){return this.createElement("g").attr(M(a)&&{"class":nc+a})},image:function(a,b,c,d, +e){var f={preserveAspectRatio:jb};arguments.length>1&&pa(f,{x:b,y:c,width:d,height:e});f=this.createElement("image").attr(f);f.element.setAttributeNS?f.element.setAttributeNS("http://www.w3.org/1999/xlink","href",a):f.element.setAttribute("hc-svg-href",a);return f},symbol:function(a,b,c,d,e){var f,g=this.symbols[a];g=g&&g(X(b),X(c),d,e);var h=/^url\((.*?)\)$/,j;if(g){f=this.path(g);pa(f,{symbolName:a,x:b,y:c,r:d});e&&pa(f,e)}else if(h.test(a)){var l=function(n,J){n.attr({width:J[0],height:J[1]}).translate(-X(J[0]/ +2),-X(J[1]/2))};j=a.match(h)[1];a=Vd[j];f=this.image(j).attr({x:b,y:c});if(a)l(f,a);else{f.attr({width:0,height:0});ib("img",{onload:function(){l(f,Vd[j]=[this.width,this.height])},src:j})}}else f=this.circle(b,c,d);return f},symbols:{square:function(a,b,c){c=0.707*c;return[ab,a-c,b-c,La,a+c,b-c,a+c,b+c,a-c,b+c,"Z"]},triangle:function(a,b,c){return[ab,a,b-1.33*c,La,a+c,b+0.67*c,a-c,b+0.67*c,"Z"]},"triangle-down":function(a,b,c){return[ab,a,b+1.33*c,La,a-c,b-0.67*c,a+c,b-0.67*c,"Z"]},diamond:function(a, +b,c){return[ab,a,b-c,La,a+c,b,a,b+c,a-c,b,"Z"]},arc:function(a,b,c,d){var e=d.start,f=d.end-1.0E-6,g=d.innerR,h=nb(e),j=Db(e),l=nb(f);f=Db(f);d=d.end-e');if(b){c=b===Qb||b==="span"||b==="img"?c.join(""):a.prepVML(c);this.element=ib(c)}this.renderer=a},add:function(a){var b= +this.renderer,c=this.element,d=b.box;d=a?a.element||a:d;a&&a.inverted&&b.invertChild(c,d);zc&&d.gVis===ub&&Na(c,{visibility:ub});d.appendChild(c);this.added=true;this.alignOnAdd&&this.updateTransform();return this},attr:function(a,b){var c,d,e,f=this.element||{},g=f.style,h=f.nodeName,j=this.renderer,l=this.symbolName,n,J,D=this.shadows,aa=this;if(Pb(a)&&M(b)){c=a;a={};a[c]=b}if(Pb(a)){c=a;aa=c==="strokeWidth"||c==="stroke-width"?this.strokeweight:this[c]}else for(c in a){d=a[c];n=false;if(l&&/^(x|y|r|start|end|width|height|innerR)/.test(c)){if(!J){this.symbolAttr(a); +J=true}n=true}else if(c==="d"){d=d||[];this.d=d.join(" ");e=d.length;for(n=[];e--;)n[e]=dc(d[e])?X(d[e]*10)-5:d[e]==="Z"?"x":d[e];d=n.join(" ")||"x";f.path=d;if(D)for(e=D.length;e--;)D[e].path=d;n=true}else if(c==="zIndex"||c==="visibility"){if(zc&&c==="visibility"&&h==="DIV"){f.gVis=d;n=f.childNodes;for(e=n.length;e--;)Na(n[e],{visibility:d});if(d===Ab)d=null}if(d)g[c]=d;n=true}else if(/^(width|height)$/.test(c)){if(this.updateClipping){this[c]=d;this.updateClipping()}else g[c]=d;n=true}else if(/^(x|y)$/.test(c)){this[c]= +d;if(f.tagName==="SPAN")this.updateTransform();else g[{x:"left",y:"top"}[c]]=d}else if(c==="class")f.className=d;else if(c==="stroke"){d=j.color(d,f,c);c="strokecolor"}else if(c==="stroke-width"||c==="strokeWidth"){f.stroked=d?true:false;c="strokeweight";this[c]=d;if(dc(d))d+=bb}else if(c==="dashstyle"){(f.getElementsByTagName("stroke")[0]||ib(j.prepVML([""]),null,null,f))[c]=d||"solid";this.dashstyle=d;n=true}else if(c==="fill")if(h==="SPAN")g.color=d;else{f.filled=d!==jb?true:false;d=j.color(d, +f,c);c="fillcolor"}else if(c==="translateX"||c==="translateY"||c==="rotation"||c==="align"){if(c==="align")c="textAlign";this[c]=d;this.updateTransform();n=true}else if(c==="text"){this.bBox=null;f.innerHTML=d;n=true}if(D&&c==="visibility")for(e=D.length;e--;)D[e].style[c]=d;if(!n)if(zc)f[c]=d;else Ea(f,c,d)}return aa},clip:function(a){var b=this,c=a.members;c.push(b);b.destroyClip=function(){qc(c,b)};return b.css(a.getCSS(b.inverted))},css:function(a){var b=this.element;if(b=a&&b.tagName==="SPAN"&& +a.width){delete a.width;this.textWidth=b;this.updateTransform()}this.styles=pa(this.styles,a);Na(this.element,a);return this},destroy:function(){this.destroyClip&&this.destroyClip();Ic.prototype.destroy.apply(this)},empty:function(){for(var a=this.element.childNodes,b=a.length,c;b--;){c=a[b];c.parentNode.removeChild(c)}},getBBox:function(){var a=this.element,b=this.bBox;if(!b){if(a.nodeName==="text")a.style.position=oc;b=this.bBox={x:a.offsetLeft,y:a.offsetTop,width:a.offsetWidth,height:a.offsetHeight}}return b}, +on:function(a,b){this.element["on"+a]=function(){var c=cb.event;c.target=c.srcElement;b(c)};return this},updateTransform:function(){if(this.added){var a=this,b=a.element,c=a.translateX||0,d=a.translateY||0,e=a.x||0,f=a.y||0,g=a.textAlign||"left",h={left:0,center:0.5,right:1}[g],j=g&&g!=="left";if(c||d)a.css({marginLeft:c,marginTop:d});a.inverted&&u(b.childNodes,function(R){a.renderer.invertChild(R,b)});if(b.tagName==="SPAN"){var l,n;c=a.rotation;var J;l=0;d=1;var D=0,aa;J=ja(a.textWidth);var E=a.xCorr|| +0,da=a.yCorr||0,w=[c,g,b.innerHTML,a.textWidth].join(",");if(w!==a.cTT){if(M(c)){l=c*Ud;d=nb(l);D=Db(l);Na(b,{filter:c?["progid:DXImageTransform.Microsoft.Matrix(M11=",d,", M12=",-D,", M21=",D,", M22=",d,", sizingMethod='auto expand')"].join(""):jb})}l=b.offsetWidth;n=b.offsetHeight;if(l>J){Na(b,{width:J+bb,display:"block",whiteSpace:"normal"});l=J}J=X((ja(b.style.fontSize)||12)*1.2);E=d<0&&-l;da=D<0&&-n;aa=d*D<0;E+=D*J*(aa?1-h:h);da-=d*J*(c?aa?h:1-h:1);if(j){E-=l*h*(d<0?-1:1);if(c)da-=n*h*(D<0?-1: +1);Na(b,{textAlign:g})}a.xCorr=E;a.yCorr=da}Na(b,{left:e+E,top:f+da});a.cTT=w}}else this.alignOnAdd=true},shadow:function(a,b){var c=[],d,e=this.element,f=this.renderer,g,h=e.style,j,l=e.path;if(l&&typeof l.value!=="string")l="x";if(a){for(d=1;d<=3;d++){j=[''];g=ib(f.prepVML(j),null,{left:ja(h.left)+1,top:ja(h.top)+1});j=[''];ib(f.prepVML(j), +null,null,g);b?b.element.appendChild(g):e.parentNode.insertBefore(g,e);c.push(g)}this.shadows=c}return this}});la=function(){this.init.apply(this,arguments)};la.prototype=va(Vc.prototype,{Element:Eb,isIE8:pc.indexOf("MSIE 8.0")>-1,init:function(a,b,c){var d;this.alignedObjects=[];d=this.createElement(Qb);a.appendChild(d.element);this.box=d.element;this.boxWrapper=d;this.setSize(b,c,false);if(!wa.namespaces.hcv){wa.namespaces.add("hcv","urn:schemas-microsoft-com:vml");wa.createStyleSheet().cssText= +"hcv\\:fill, hcv\\:path, hcv\\:shape, hcv\\:stroke{ behavior:url(#default#VML); display: inline-block; } "}},clipRect:function(a,b,c,d){var e=this.createElement();return pa(e,{members:[],left:a,top:b,width:c,height:d,getCSS:function(f){var g=this.top,h=this.left,j=h+this.width,l=g+this.height;g={clip:"rect("+X(f?h:g)+"px,"+X(f?l:j)+"px,"+X(f?j:l)+"px,"+X(f?g:h)+"px)"};!f&&zc&&pa(g,{width:j+bb,height:l+bb});return g},updateClipping:function(){u(e.members,function(f){f.css(e.getCSS(f.inverted))})}})}, +color:function(a,b,c){var d,e=/^rgba/;if(a&&a.linearGradient){var f,g,h=a.linearGradient,j,l,n,J;u(a.stops,function(D,aa){if(e.test(D[1])){d=Yb(D[1]);f=d.get("rgb");g=d.get("a")}else{f=D[1];g=1}if(aa){n=f;J=g}else{j=f;l=g}});a=90-sa.atan((h[3]-h[1])/(h[2]-h[0]))*180/cc;c=["<",c,' colors="0% ',j,",100% ",n,'" angle="',a,'" opacity="',J,'" o:opacity2="',l,'" type="gradient" focus="100%" />'];ib(this.prepVML(c),null,null,b)}else if(e.test(a)&&b.tagName!=="IMG"){d=Yb(a);c=["<",c,' opacity="',d.get("a"), +'"/>'];ib(this.prepVML(c),null,null,b);return d.get("rgb")}else return a},prepVML:function(a){var b=this.isIE8;a=a.join("");if(b){a=a.replace("/>",' xmlns="urn:schemas-microsoft-com:vml" />');a=a.indexOf('style="')===-1?a.replace("/>",' style="display:inline-block;behavior:url(#default#VML);" />'):a.replace('style="','style="display:inline-block;behavior:url(#default#VML);')}else a=a.replace("<","1&&f.css({left:b,top:c,width:d,height:e});return f},rect:function(a,b, +c,d,e,f){if(Lb(a)){b=a.y;c=a.width;d=a.height;e=a.r;f=a.strokeWidth;a=a.x}var g=this.symbol("rect");g.r=e;return g.attr(g.crisp(f,a,b,Ha(c,0),Ha(d,0)))},invertChild:function(a,b){var c=b.style;Na(a,{flip:"x",left:ja(c.width)-10,top:ja(c.height)-10,rotation:-90})},symbols:{arc:function(a,b,c,d){var e=d.start,f=d.end,g=nb(e),h=Db(e),j=nb(f),l=Db(f);d=d.innerR;var n=0.07/c,J=d&&0.1/d||0;if(f-e===0)return["x"];else if(2*cc-f+e',this.name||b.name,": ",!a?"x = "+(this.name||this.x)+", ":"","",!a?"y = ":"",this.y,""].join("")},update:function(a,b,c){var d=this,e=d.series,f=d.graphic,g=e.chart;b=C(b,true);d.firePointEvent("update",{options:a},function(){d.applyOptions(a);if(Lb(a)){e.getAttribs();f&&f.attr(d.pointAttr[e.state])}e.isDirty=true;b&&g.redraw(c)})},remove:function(a,b){var c= +this,d=c.series,e=d.chart,f=d.data;ec(b,e);a=C(a,true);c.firePointEvent("remove",null,function(){qc(f,c);c.destroy();d.isDirty=true;a&&e.redraw()})},firePointEvent:function(a,b,c){var d=this,e=this.series.options;if(e.point.events[a]||d.options&&d.options.events&&d.options.events[a])this.importEvents();if(a==="click"&&e.allowPointSelect)c=function(f){d.select(null,f.ctrlKey||f.metaKey||f.shiftKey)};Pa(this,a,b,c)},importEvents:function(){if(!this.hasImportedEvents){var a=va(this.series.options.point, +this.options).events,b;this.events=a;for(b in a)Sa(this,b,a[b]);this.hasImportedEvents=true}},setState:function(a){var b=this.series,c=b.options.states,d=xb[b.type].marker&&b.options.marker,e=d&&!d.enabled,f=(d=d&&d.states[a])&&d.enabled===false,g=b.stateMarkerGraphic,h=b.chart,j=this.pointAttr;a=a||hb;if(!(a===this.state||this.selected&&a!=="select"||c[a]&&c[a].enabled===false||a&&(f||e&&!d.enabled))){if(this.graphic)this.graphic.attr(j[a]);else{if(a){if(!g)b.stateMarkerGraphic=g=h.renderer.circle(0, +0,j[a].r).attr(j[a]).add(b.group);g.translate(this.plotX,this.plotY)}if(g)g[a?"show":"hide"]()}this.state=a}}};var pb=function(){};pb.prototype={isCartesian:true,type:"line",pointClass:Ac,pointAttrToOptions:{stroke:"lineColor","stroke-width":"lineWidth",fill:"fillColor",r:"radius"},init:function(a,b){var c,d;d=a.series.length;this.chart=a;b=this.setOptions(b);pa(this,{index:d,options:b,name:b.name||"Series "+(d+1),state:hb,pointAttr:{},visible:b.visible!==false,selected:b.selected===true});d=b.events; +for(c in d)Sa(this,c,d[c]);if(d&&d.click||b.point&&b.point.events&&b.point.events.click||b.allowPointSelect)a.runTrackerClick=true;this.getColor();this.getSymbol();this.setData(b.data,false)},autoIncrement:function(){var a=this.options,b=this.xIncrement;b=C(b,a.pointStart,0);this.pointInterval=C(this.pointInterval,a.pointInterval,1);this.xIncrement=b+this.pointInterval;return b},cleanData:function(){var a=this.chart,b=this.data,c,d,e=a.smallestInterval,f,g;b.sort(function(h,j){return h.x-j.x});if(this.options.connectNulls)for(g= +b.length-1;g>=0;g--)b[g].y===null&&b[g-1]&&b[g+1]&&b.splice(g,1);for(g=b.length-1;g>=0;g--)if(b[g-1]){f=b[g].x-b[g-1].x;if(f>0&&(d===Va||fa+1&&b.push(c.slice(a+1,e));a=e}else e===c.length-1&&b.push(c.slice(a+1,e+1))});this.segments=b},setOptions:function(a){var b=this.chart.options.plotOptions;return va(b[this.type],b.series,a)},getColor:function(){var a= +this.chart.options.colors,b=this.chart.counters;this.color=this.options.color||a[b.color++]||"#0000ff";b.wrapColor(a.length)},getSymbol:function(){var a=this.chart.options.symbols,b=this.chart.counters;this.symbol=this.options.marker.symbol||a[b.symbol++];b.wrapSymbol(a.length)},addPoint:function(a,b,c,d){var e=this.data,f=this.graph,g=this.area,h=this.chart;a=(new this.pointClass).init(this,a);ec(d,h);if(f&&c)f.shift=c;if(g){g.shift=c;g.isArea=true}b=C(b,true);e.push(a);c&&e[0].remove(false);this.getAttribs(); +this.isDirty=true;b&&h.redraw()},setData:function(a,b){var c=this,d=c.data,e=c.initialColor,f=c.chart,g=d&&d.length||0;c.xIncrement=null;if(M(e))f.counters.color=e;for(a=mc(rc(a||[]),function(h){return(new c.pointClass).init(c,h)});g--;)d[g].destroy();c.data=a;c.cleanData();c.getSegments();c.getAttribs();c.isDirty=true;f.isDirtyBox=true;C(b,true)&&f.redraw(false)},remove:function(a,b){var c=this,d=c.chart;a=C(a,true);if(!c.isRemoving){c.isRemoving=true;Pa(c,"remove",null,function(){c.destroy();d.isDirtyLegend= +d.isDirtyBox=true;a&&d.redraw(b)})}c.isRemoving=false},translate:function(){for(var a=this.chart,b=this.options.stacking,c=this.xAxis.categories,d=this.yAxis,e=this.data,f=e.length;f--;){var g=e[f],h=g.x,j=g.y,l=g.low,n=d.stacks[(j<0?"-":"")+this.stackKey];g.plotX=this.xAxis.translate(h);if(b&&this.visible&&n&&n[h]){l=n[h];h=l.total;l.cum=l=l.cum-j;j=l+j;if(b==="percent"){l=h?l*100/h:0;j=h?j*100/h:0}g.percentage=h?g.y*100/h:0;g.stackTotal=h}if(M(l))g.yBottom=d.translate(l,0,1,0,1);if(j!==null)g.plotY= +d.translate(j,0,1,0,1);g.clientX=a.inverted?a.plotHeight-g.plotX:g.plotX;g.category=c&&c[g.x]!==Va?c[g.x]:g.x}},setTooltipPoints:function(a){var b=this.chart,c=b.inverted,d=[],e=X((c?b.plotTop:b.plotLeft)+b.plotSizeX),f,g,h=[];if(a)this.tooltipPoints=null;u(this.segments,function(j){d=d.concat(j)});if(this.xAxis&&this.xAxis.reversed)d=d.reverse();u(d,function(j,l){f=d[l-1]?d[l-1]._high+1:0;for(g=j._high=d[l+1]?kb((j.plotX+(d[l+1]?d[l+1].plotX:e))/2):e;f<=g;)h[c?e-f++:f++]=j});this.tooltipPoints=h}, +onMouseOver:function(){var a=this.chart,b=a.hoverSeries;if(!(!Jb&&a.mouseIsDown)){b&&b!==this&&b.onMouseOut();this.options.events.mouseOver&&Pa(this,"mouseOver");this.tracker&&this.tracker.toFront();this.setState(Bb);a.hoverSeries=this}},onMouseOut:function(){var a=this.options,b=this.chart,c=b.tooltip,d=b.hoverPoint;d&&d.onMouseOut();this&&a.events.mouseOut&&Pa(this,"mouseOut");c&&!a.stickyTracking&&c.hide();this.setState();b.hoverSeries=null},animate:function(a){var b=this.chart,c=this.clipRect, +d=this.options.animation;if(d&&!Lb(d))d={};if(a){if(!c.isAnimating){c.attr("width",0);c.isAnimating=true}}else{c.animate({width:b.plotSizeX},d);this.animate=null}},drawPoints:function(){var a,b=this.data,c=this.chart,d,e,f,g,h,j;if(this.options.marker.enabled)for(f=b.length;f--;){g=b[f];d=g.plotX;e=g.plotY;j=g.graphic;if(e!==Va&&!isNaN(e)){a=g.pointAttr[g.selected?"select":hb];h=a.r;if(j)j.animate({x:d,y:e,r:h});else g.graphic=c.renderer.symbol(C(g.marker&&g.marker.symbol,this.symbol),d,e,h).attr(a).add(this.group)}}}, +convertAttribs:function(a,b,c,d){var e=this.pointAttrToOptions,f,g,h={};a=a||{};b=b||{};c=c||{};d=d||{};for(f in e){g=e[f];h[f]=C(a[g],b[f],c[f],d[f])}return h},getAttribs:function(){var a=this,b=xb[a.type].marker?a.options.marker:a.options,c=b.states,d=c[Bb],e,f=a.color,g={stroke:f,fill:f},h=a.data,j=[],l,n=a.pointAttrToOptions,J;if(a.options.marker){d.radius=d.radius||b.radius+2;d.lineWidth=d.lineWidth||b.lineWidth+1}else d.color=d.color||Yb(d.color||f).brighten(d.brightness).get();j[hb]=a.convertAttribs(b, +g);u([Bb,"select"],function(D){j[D]=a.convertAttribs(c[D],j[hb])});a.pointAttr=j;for(f=h.length;f--;){g=h[f];if((b=g.options&&g.options.marker||g.options)&&b.enabled===false)b.radius=0;e=false;if(g.options)for(J in n)if(M(b[n[J]]))e=true;if(e){l=[];c=b.states||{};e=c[Bb]=c[Bb]||{};if(!a.options.marker)e.color=Yb(e.color||g.options.color).brighten(e.brightness||d.brightness).get();l[hb]=a.convertAttribs(b,j[hb]);l[Bb]=a.convertAttribs(c[Bb],j[Bb],l[hb]);l.select=a.convertAttribs(c.select,j.select, +l[hb])}else l=j;g.pointAttr=l}},destroy:function(){var a=this,b=a.chart,c=/\/5[0-9\.]+ (Safari|Mobile)\//.test(pc),d,e;Pa(a,"destroy");Cb(a);a.legendItem&&a.chart.legend.destroyItem(a);u(a.data,function(f){f.destroy()});u(["area","graph","dataLabelsGroup","group","tracker"],function(f){if(a[f]){d=c&&f==="group"?"hide":"destroy";a[f][d]()}});if(b.hoverSeries===a)b.hoverSeries=null;qc(b.series,a);for(e in a)delete a[e]},drawDataLabels:function(){if(this.options.dataLabels.enabled){var a=this,b,c,d= +a.data,e=a.options.dataLabels,f,g=a.dataLabelsGroup,h=a.chart,j=h.inverted,l=a.type,n;n=a.options.stacking;var J=l==="column"||l==="bar",D=e.verticalAlign===null,aa=e.y===null;if(J)if(n){if(D)e=va(e,{verticalAlign:"middle"});if(aa)e=va(e,{y:{top:14,middle:4,bottom:-6}[e.verticalAlign]})}else if(D)e=va(e,{verticalAlign:"top"});if(!g)g=a.dataLabelsGroup=h.renderer.g("data-labels").attr({visibility:a.visible?Ab:ub,zIndex:6}).translate(h.plotLeft,h.plotTop).add();n=e.color;if(n==="auto")n=null;e.style.color= +C(n,a.color);u(d,function(E){var da=E.barX,w=da&&da+E.barW/2||E.plotX||-999,R=C(E.plotY,-999),B=E.dataLabel,K=e.align,S=aa?E.y>0?-6:12:e.y;f=e.formatter.call(E.getLabelConfig());b=(j?h.plotWidth-R:w)+e.x;c=(j?h.plotHeight-w:R)+S;if(l==="column")b+={left:-1,right:1}[K]*E.barW/2||0;if(j&&E.y<0){K="right";b-=10}if(B){if(j&&!e.y)c=c+ja(B.styles.lineHeight)*0.9-B.getBBox().height/2;B.attr({text:f}).animate({x:b,y:c})}else if(M(f)){B=E.dataLabel=h.renderer.text(f,b,c).attr({align:K,rotation:e.rotation, +zIndex:1}).css(e.style).add(g);j&&!e.y&&B.attr({y:c+ja(B.styles.lineHeight)*0.9-B.getBBox().height/2})}if(J&&a.options.stacking){w=E.barY;R=E.barW;E=E.barH;B.align(e,null,{x:j?h.plotWidth-w-E:da,y:j?h.plotHeight-da-R:w,width:j?E:R,height:j?R:E})}})}},drawGraph:function(){var a=this,b=a.options,c=a.graph,d=[],e,f=a.area,g=a.group,h=b.lineColor||a.color,j=b.lineWidth,l=b.dashStyle,n,J=a.chart.renderer,D=a.yAxis.getThreshold(b.threshold||0),aa=/^area/.test(a.type),E=[],da=[];u(a.segments,function(w){n= +[];u(w,function(S,I){if(a.getPointSpline)n.push.apply(n,a.getPointSpline(w,S,I));else{n.push(I?La:ab);I&&b.step&&n.push(S.plotX,w[I-1].plotY);n.push(S.plotX,S.plotY)}});if(w.length>1)d=d.concat(n);else E.push(w[0]);if(aa){var R=[],B,K=n.length;for(B=0;B=0;B--)R.push(w[B].plotX,w[B].yBottom);else R.push(La,w[w.length-1].plotX,D,La,w[0].plotX,D);da=da.concat(R)}});a.graphPath=d;a.singlePoints=E;if(aa){e= +C(b.fillColor,Yb(a.color).setOpacity(b.fillOpacity||0.75).get());if(f)f.animate({d:da});else a.area=a.chart.renderer.path(da).attr({fill:e}).add(g)}if(c)c.animate({d:d});else if(j){c={stroke:h,"stroke-width":j};if(l)c.dashstyle=l;a.graph=J.path(d).attr(c).add(g).shadow(b.shadow)}},render:function(){var a=this,b=a.chart,c,d,e=a.options,f=e.animation,g=f&&a.animate;f=g?f&&f.duration||500:0;var h=a.clipRect,j=b.renderer;if(!h){h=a.clipRect=!b.hasRendered&&b.clipRect?b.clipRect:j.clipRect(0,0,b.plotSizeX, +b.plotSizeY);if(!b.clipRect)b.clipRect=h}if(!a.group){c=a.group=j.g("series");if(b.inverted){d=function(){c.attr({width:b.plotWidth,height:b.plotHeight}).invert()};d();Sa(b,"resize",d);Sa(a,"destroy",function(){Cb(b,"resize",d)})}c.clip(a.clipRect).attr({visibility:a.visible?Ab:ub,zIndex:e.zIndex}).translate(b.plotLeft,b.plotTop).add(b.seriesGroup)}a.drawDataLabels();g&&a.animate(true);a.drawGraph&&a.drawGraph();a.drawPoints();a.options.enableMouseTracking!==false&&a.drawTracker();g&&a.animate(); +setTimeout(function(){h.isAnimating=false;if((c=a.group)&&h!==b.clipRect&&h.renderer){c.clip(a.clipRect=b.clipRect);h.destroy()}},f);a.isDirty=false},redraw:function(){var a=this.chart,b=this.group;if(b){a.inverted&&b.attr({width:a.plotWidth,height:a.plotHeight});b.animate({translateX:a.plotLeft,translateY:a.plotTop})}this.translate();this.setTooltipPoints(true);this.render()},setState:function(a){var b=this.options,c=this.graph,d=b.states;b=b.lineWidth;a=a||hb;if(this.state!==a){this.state=a;if(!(d[a]&& +d[a].enabled===false)){if(a)b=d[a].lineWidth||b+1;if(c&&!c.dashstyle)c.attr({"stroke-width":b},a?0:500)}}},setVisible:function(a,b){var c=this.chart,d=this.legendItem,e=this.group,f=this.tracker,g=this.dataLabelsGroup,h,j=this.data,l=c.options.chart.ignoreHiddenSeries;h=this.visible;h=(this.visible=a=a===Va?!h:a)?"show":"hide";e&&e[h]();if(f)f[h]();else for(e=j.length;e--;){f=j[e];f.tracker&&f.tracker[h]()}g&&g[h]();d&&c.legend.colorizeItem(this,a);this.isDirty=true;this.options.stacking&&u(c.series, +function(n){if(n.options.stacking&&n.visible)n.isDirty=true});if(l)c.isDirtyBox=true;b!==false&&c.redraw();Pa(this,h)},show:function(){this.setVisible(true)},hide:function(){this.setVisible(false)},select:function(a){this.selected=a=a===Va?!this.selected:a;if(this.checkbox)this.checkbox.checked=a;Pa(this,a?"select":"unselect")},drawTracker:function(){var a=this,b=a.options,c=[].concat(a.graphPath),d=c.length,e=a.chart,f=e.options.tooltip.snap,g=a.tracker,h=b.cursor;h=h&&{cursor:h};var j=a.singlePoints, +l;if(d)for(l=d+1;l--;){c[l]===ab&&c.splice(l+1,0,c[l+1]-f,c[l+2],La);if(l&&c[l]===ab||l===d)c.splice(l,0,La,c[l-2]+f,c[l-1])}for(l=0;la&&j>e){j=Ha(a,e);n=2*e-j}else if(jg&&n>e){n=Ha(g,e);j=2*e-n}else if(nK?za-K:B-(I<=B?K:0)}Kb=gb-3}pa(S,{barX:Da,barY:gb,barW:w,barH:wb});S.shapeType="rect";I=pa(b.renderer.Element.prototype.crisp.apply({},[e,Da,gb,w,wb]),{r:c.borderRadius});if(e% +2){I.y-=1;I.height+=1}S.shapeArgs=I;S.trackerArgs=M(Kb)&&va(S.shapeArgs,{height:Ha(6,wb+3),y:Kb})})},getSymbol:function(){},drawGraph:function(){},drawPoints:function(){var a=this,b=a.options,c=a.chart.renderer,d,e;u(a.data,function(f){var g=f.plotY;if(g!==Va&&!isNaN(g)&&f.y!==null){d=f.graphic;e=f.shapeArgs;if(d){Tc(d);d.animate(e)}else f.graphic=c[f.shapeType](e).attr(f.pointAttr[f.selected?"select":hb]).add(a.group).shadow(b.shadow)}})},drawTracker:function(){var a=this,b=a.chart,c=b.renderer, +d,e,f=+new Date,g=a.options.cursor,h=g&&{cursor:g},j;u(a.data,function(l){e=l.tracker;d=l.trackerArgs||l.shapeArgs;delete d.strokeWidth;if(l.y!==null)if(e)e.attr(d);else l.tracker=c[l.shapeType](d).attr({isTracker:f,fill:Wd,visibility:a.visible?Ab:ub,zIndex:1}).on(Jb?"touchstart":"mouseover",function(n){j=n.relatedTarget||n.fromElement;b.hoverSeries!==a&&Ea(j,"isTracker")!==f&&a.onMouseOver();l.onMouseOver()}).on("mouseout",function(n){if(!a.options.stickyTracking){j=n.relatedTarget||n.toElement; +Ea(j,"isTracker")!==f&&a.onMouseOut()}}).css(h).add(l.group||b.trackerGroup)})},animate:function(a){var b=this,c=b.data;if(!a){u(c,function(d){var e=d.graphic;d=d.shapeArgs;if(e){e.attr({height:0,y:b.yAxis.translate(0,0,1)});e.animate({height:d.height,y:d.y},b.options.animation)}});b.animate=null}},remove:function(){var a=this,b=a.chart;b.hasRendered&&u(b.series,function(c){if(c.type===a.type)c.isDirty=true});pb.prototype.remove.apply(a,arguments)}});vb.column=ad;la=yb(ad,{type:"bar",init:function(a){a.inverted= +this.inverted=true;ad.prototype.init.apply(this,arguments)}});vb.bar=la;la=yb(pb,{type:"scatter",translate:function(){var a=this;pb.prototype.translate.apply(a);u(a.data,function(b){b.shapeType="circle";b.shapeArgs={x:b.plotX,y:b.plotY,r:a.chart.options.tooltip.snap}})},drawTracker:function(){var a=this,b=a.options.cursor,c=b&&{cursor:b},d;u(a.data,function(e){(d=e.graphic)&&d.attr({isTracker:true}).on("mouseover",function(){a.onMouseOver();e.onMouseOver()}).on("mouseout",function(){a.options.stickyTracking|| +a.onMouseOut()}).css(c)})},cleanData:function(){}});vb.scatter=la;la=yb(Ac,{init:function(){Ac.prototype.init.apply(this,arguments);var a=this,b;pa(a,{visible:a.visible!==false,name:C(a.name,"Slice")});b=function(){a.slice()};Sa(a,"select",b);Sa(a,"unselect",b);return a},setVisible:function(a){var b=this.series.chart,c=this.tracker,d=this.dataLabel,e=this.connector,f=this.shadowGroup,g;g=(this.visible=a=a===Va?!this.visible:a)?"show":"hide";this.group[g]();c&&c[g]();d&&d[g]();e&&e[g]();f&&f[g](); +this.legendItem&&b.legend.colorizeItem(this,a)},slice:function(a,b,c){var d=this.series.chart,e=this.slicedTranslation;ec(c,d);C(b,true);a=this.sliced=M(a)?a:!this.sliced;a={translateX:a?e[0]:d.plotLeft,translateY:a?e[1]:d.plotTop};this.group.animate(a);this.shadowGroup&&this.shadowGroup.animate(a)}});la=yb(pb,{type:"pie",isCartesian:false,pointClass:la,pointAttrToOptions:{stroke:"borderColor","stroke-width":"borderWidth",fill:"color"},getColor:function(){this.initialColor=this.chart.counters.color}, +animate:function(){var a=this;u(a.data,function(b){var c=b.graphic;b=b.shapeArgs;var d=-cc/2;if(c){c.attr({r:0,start:d,end:d});c.animate({r:b.r,start:b.start,end:b.end},a.options.animation)}});a.animate=null},translate:function(){var a=0,b=this,c=-0.25,d=b.options,e=d.slicedOffset,f=e+d.borderWidth,g=d.center.concat([d.size,d.innerSize||0]),h=b.chart,j=h.plotWidth,l=h.plotHeight,n,J,D,aa=b.data,E=2*cc,da,w=qb(j,l),R,B,K,S=d.dataLabels.distance;g=mc(g,function(I,za){return(R=/%$/.test(I))?[j,l,w,w][za]* +ja(I)/100:I});b.getX=function(I,za){D=sa.asin((I-g[1])/(g[2]/2+S));return g[0]+(za?-1:1)*nb(D)*(g[2]/2+S)};b.center=g;u(aa,function(I){a+=I.y});u(aa,function(I){da=a?I.y/a:0;n=X(c*E*1E3)/1E3;c+=da;J=X(c*E*1E3)/1E3;I.shapeType="arc";I.shapeArgs={x:g[0],y:g[1],r:g[2]/2,innerR:g[3]/2,start:n,end:J};D=(J+n)/2;I.slicedTranslation=mc([nb(D)*e+h.plotLeft,Db(D)*e+h.plotTop],X);B=nb(D)*g[2]/2;b.radiusY=K=Db(D)*g[2]/2;I.tooltipPos=[g[0]+B*0.7,g[1]+K*0.7];I.labelPos=[g[0]+B+nb(D)*S,g[1]+K+Db(D)*S,g[0]+B+nb(D)* +f,g[1]+K+Db(D)*f,g[0]+B,g[1]+K,S<0?"center":D0,J=this.center[1],D=[[],[]],aa,E,da,w,R=2,B;if(d.enabled){pb.prototype.drawDataLabels.apply(this);u(a,function(gb){D[gb.labelPos[7]da){h=[].concat(I);h.sort(w);for(B=za;B--;)h[B].rank=B;for(B=za;B--;)I[B].rank>=da&&I.splice(B,1);za=I.length}for(B= +0;BE&&K[Da+1]!==null||aa").appendTo(b),e=d.css("display");d.remove();if(e==="none"||e===""){ch||(ch=c.createElement("iframe"),ch.frameBorder=ch.width=ch.height=0),b.appendChild(ch);if(!ci||!ch.createElement)ci=(ch.contentWindow||ch.contentDocument).document,ci.write((c.compatMode==="CSS1Compat"?"":"")+""),ci.close();d=ci.createElement(a),ci.body.appendChild(d),e=f.css(d,"display"),b.removeChild(ch)}cg[a]=e}return cg[a]}function cq(a,b){var c={};f.each(cm.concat.apply([],cm.slice(0,b)),function(){c[this]=a});return c}function cp(){cn=b}function co(){setTimeout(cp,0);return cn=f.now()}function cf(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function ce(){try{return new a.XMLHttpRequest}catch(b){}}function b$(a,c){a.dataFilter&&(c=a.dataFilter(c,a.dataType));var d=a.dataTypes,e={},g,h,i=d.length,j,k=d[0],l,m,n,o,p;for(g=1;g0){c!=="border"&&f.each(e,function(){c||(d-=parseFloat(f.css(a,"padding"+this))||0),c==="margin"?d+=parseFloat(f.css(a,c+this))||0:d-=parseFloat(f.css(a,"border"+this+"Width"))||0});return d+"px"}d=bv(a,b,b);if(d<0||d==null)d=a.style[b]||0;d=parseFloat(d)||0,c&&f.each(e,function(){d+=parseFloat(f.css(a,"padding"+this))||0,c!=="padding"&&(d+=parseFloat(f.css(a,"border"+this+"Width"))||0),c==="margin"&&(d+=parseFloat(f.css(a,c+this))||0)});return d+"px"}function bl(a,b){b.src?f.ajax({url:b.src,async:!1,dataType:"script"}):f.globalEval((b.text||b.textContent||b.innerHTML||"").replace(bd,"/*$0*/")),b.parentNode&&b.parentNode.removeChild(b)}function bk(a){f.nodeName(a,"input")?bj(a):"getElementsByTagName"in a&&f.grep(a.getElementsByTagName("input"),bj)}function bj(a){if(a.type==="checkbox"||a.type==="radio")a.defaultChecked=a.checked}function bi(a){return"getElementsByTagName"in a?a.getElementsByTagName("*"):"querySelectorAll"in a?a.querySelectorAll("*"):[]}function bh(a,b){var c;if(b.nodeType===1){b.clearAttributes&&b.clearAttributes(),b.mergeAttributes&&b.mergeAttributes(a),c=b.nodeName.toLowerCase();if(c==="object")b.outerHTML=a.outerHTML;else if(c!=="input"||a.type!=="checkbox"&&a.type!=="radio"){if(c==="option")b.selected=a.defaultSelected;else if(c==="input"||c==="textarea")b.defaultValue=a.defaultValue}else a.checked&&(b.defaultChecked=b.checked=a.checked),b.value!==a.value&&(b.value=a.value);b.removeAttribute(f.expando)}}function bg(a,b){if(b.nodeType===1&&!!f.hasData(a)){var c=f.expando,d=f.data(a),e=f.data(b,d);if(d=d[c]){var g=d.events;e=e[c]=f.extend({},d);if(g){delete e.handle,e.events={};for(var h in g)for(var i=0,j=g[h].length;i=0===c})}function U(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function M(a,b){return(a&&a!=="*"?a+".":"")+b.replace(y,"`").replace(z,"&")}function L(a){var b,c,d,e,g,h,i,j,k,l,m,n,o,p=[],q=[],r=f._data(this,"events");if(!(a.liveFired===this||!r||!r.live||a.target.disabled||a.button&&a.type==="click")){a.namespace&&(n=new RegExp("(^|\\.)"+a.namespace.split(".").join("\\.(?:.*\\.)?")+"(\\.|$)")),a.liveFired=this;var s=r.live.slice(0);for(i=0;ic)break;a.currentTarget=e.elem,a.data=e.handleObj.data,a.handleObj=e.handleObj,o=e.handleObj.origHandler.apply(e.elem,arguments);if(o===!1||a.isPropagationStopped()){c=e.level,o===!1&&(b=!1);if(a.isImmediatePropagationStopped())break}}return b}}function J(a,c,d){var e=f.extend({},d[0]);e.type=a,e.originalEvent={},e.liveFired=b,f.event.handle.call(c,e),e.isDefaultPrevented()&&d[0].preventDefault()}function D(){return!0}function C(){return!1}function m(a,c,d){var e=c+"defer",g=c+"queue",h=c+"mark",i=f.data(a,e,b,!0);i&&(d==="queue"||!f.data(a,g,b,!0))&&(d==="mark"||!f.data(a,h,b,!0))&&setTimeout(function(){!f.data(a,g,b,!0)&&!f.data(a,h,b,!0)&&(f.removeData(a,e,!0),i.resolve())},0)}function l(a){for(var b in a)if(b!=="toJSON")return!1;return!0}function k(a,c,d){if(d===b&&a.nodeType===1){var e="data-"+c.replace(j,"$1-$2").toLowerCase();d=a.getAttribute(e);if(typeof d=="string"){try{d=d==="true"?!0:d==="false"?!1:d==="null"?null:f.isNaN(d)?i.test(d)?f.parseJSON(d):d:parseFloat(d)}catch(g){}f.data(a,c,d)}else d=b}return d}var c=a.document,d=a.navigator,e=a.location,f=function(){function K(){if(!e.isReady){try{c.documentElement.doScroll("left")}catch(a){setTimeout(K,1);return}e.ready()}}var e=function(a,b){return new e.fn.init(a,b,h)},f=a.jQuery,g=a.$,h,i=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,j=/\S/,k=/^\s+/,l=/\s+$/,m=/\d/,n=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,o=/^[\],:{}\s]*$/,p=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,q=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,r=/(?:^|:|,)(?:\s*\[)+/g,s=/(webkit)[ \/]([\w.]+)/,t=/(opera)(?:.*version)?[ \/]([\w.]+)/,u=/(msie) ([\w.]+)/,v=/(mozilla)(?:.*? rv:([\w.]+))?/,w=/-([a-z]|[0-9])/ig,x=/^-ms-/,y=function(a,b){return(b+"").toUpperCase()},z=d.userAgent,A,B,C,D=Object.prototype.toString,E=Object.prototype.hasOwnProperty,F=Array.prototype.push,G=Array.prototype.slice,H=String.prototype.trim,I=Array.prototype.indexOf,J={};e.fn=e.prototype={constructor:e,init:function(a,d,f){var g,h,j,k;if(!a)return this;if(a.nodeType){this.context=this[0]=a,this.length=1;return this}if(a==="body"&&!d&&c.body){this.context=c,this[0]=c.body,this.selector=a,this.length=1;return this}if(typeof a=="string"){a.charAt(0)!=="<"||a.charAt(a.length-1)!==">"||a.length<3?g=i.exec(a):g=[null,a,null];if(g&&(g[1]||!d)){if(g[1]){d=d instanceof e?d[0]:d,k=d?d.ownerDocument||d:c,j=n.exec(a),j?e.isPlainObject(d)?(a=[c.createElement(j[1])],e.fn.attr.call(a,d,!0)):a=[k.createElement(j[1])]:(j=e.buildFragment([g[1]],[k]),a=(j.cacheable?e.clone(j.fragment):j.fragment).childNodes);return e.merge(this,a)}h=c.getElementById(g[2]);if(h&&h.parentNode){if(h.id!==g[2])return f.find(a);this.length=1,this[0]=h}this.context=c,this.selector=a;return this}return!d||d.jquery?(d||f).find(a):this.constructor(d).find(a)}if(e.isFunction(a))return f.ready(a);a.selector!==b&&(this.selector=a.selector,this.context=a.context);return e.makeArray(a,this)},selector:"",jquery:"1.6.3",length:0,size:function(){return this.length},toArray:function(){return G.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this[this.length+a]:this[a]},pushStack:function(a,b,c){var d=this.constructor();e.isArray(a)?F.apply(d,a):e.merge(d,a),d.prevObject=this,d.context=this.context,b==="find"?d.selector=this.selector+(this.selector?" ":"")+c:b&&(d.selector=this.selector+"."+b+"("+c+")");return d},each:function(a,b){return e.each(this,a,b)},ready:function(a){e.bindReady(),B.done(a);return this},eq:function(a){return a===-1?this.slice(a):this.slice(a,+a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(G.apply(this,arguments),"slice",G.call(arguments).join(","))},map:function(a){return this.pushStack(e.map(this,function(b,c){return a.call(b,c,b)}))},end:function(){return this.prevObject||this.constructor(null)},push:F,sort:[].sort,splice:[].splice},e.fn.init.prototype=e.fn,e.extend=e.fn.extend=function(){var a,c,d,f,g,h,i=arguments[0]||{},j=1,k=arguments.length,l=!1;typeof i=="boolean"&&(l=i,i=arguments[1]||{},j=2),typeof i!="object"&&!e.isFunction(i)&&(i={}),k===j&&(i=this,--j);for(;j0)return;B.resolveWith(c,[e]),e.fn.trigger&&e(c).trigger("ready").unbind("ready")}},bindReady:function(){if(!B){B=e._Deferred();if(c.readyState==="complete")return setTimeout(e.ready,1);if(c.addEventListener)c.addEventListener("DOMContentLoaded",C,!1),a.addEventListener("load",e.ready,!1);else if(c.attachEvent){c.attachEvent("onreadystatechange",C),a.attachEvent("onload",e.ready);var b=!1;try{b=a.frameElement==null}catch(d){}c.documentElement.doScroll&&b&&K()}}},isFunction:function(a){return e.type(a)==="function"},isArray:Array.isArray||function(a){return e.type(a)==="array"},isWindow:function(a){return a&&typeof a=="object"&&"setInterval"in a},isNaN:function(a){return a==null||!m.test(a)||isNaN(a)},type:function(a){return a==null?String(a):J[D.call(a)]||"object"},isPlainObject:function(a){if(!a||e.type(a)!=="object"||a.nodeType||e.isWindow(a))return!1;try{if(a.constructor&&!E.call(a,"constructor")&&!E.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}var d;for(d in a);return d===b||E.call(a,d)},isEmptyObject:function(a){for(var b in a)return!1;return!0},error:function(a){throw a},parseJSON:function(b){if(typeof b!="string"||!b)return null;b=e.trim(b);if(a.JSON&&a.JSON.parse)return a.JSON.parse(b);if(o.test(b.replace(p,"@").replace(q,"]").replace(r,"")))return(new Function("return "+b))();e.error("Invalid JSON: "+b)},parseXML:function(c){var d,f;try{a.DOMParser?(f=new DOMParser,d=f.parseFromString(c,"text/xml")):(d=new ActiveXObject("Microsoft.XMLDOM"),d.async="false",d.loadXML(c))}catch(g){d=b}(!d||!d.documentElement||d.getElementsByTagName("parsererror").length)&&e.error("Invalid XML: "+c);return d},noop:function(){},globalEval:function(b){b&&j.test(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(x,"ms-").replace(w,y)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,c,d){var f,g=0,h=a.length,i=h===b||e.isFunction(a);if(d){if(i){for(f in a)if(c.apply(a[f],d)===!1)break}else for(;g0&&a[0]&&a[j-1]||j===0||e.isArray(a));if(k)for(;i1?h.call(arguments,0):c,--e||g.resolveWith(g,h.call(b,0))}}var b=arguments,c=0,d=b.length,e=d,g=d<=1&&a&&f.isFunction(a.promise)?a:f.Deferred();if(d>1){for(;c
a",d=a.getElementsByTagName("*"),e=a.getElementsByTagName("a")[0];if(!d||!d.length||!e)return{};g=c.createElement("select"),h=g.appendChild(c.createElement("option")),i=a.getElementsByTagName("input")[0],k={leadingWhitespace:a.firstChild.nodeType===3,tbody:!a.getElementsByTagName("tbody").length,htmlSerialize:!!a.getElementsByTagName("link").length,style:/top/.test(e.getAttribute("style")),hrefNormalized:e.getAttribute("href")==="/a",opacity:/^0.55$/.test(e.style.opacity),cssFloat:!!e.style.cssFloat,checkOn:i.value==="on",optSelected:h.selected,getSetAttribute:a.className!=="t",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0},i.checked=!0,k.noCloneChecked=i.cloneNode(!0).checked,g.disabled=!0,k.optDisabled=!h.disabled;try{delete a.test}catch(v){k.deleteExpando=!1}!a.addEventListener&&a.attachEvent&&a.fireEvent&&(a.attachEvent("onclick",function(){k.noCloneEvent=!1}),a.cloneNode(!0).fireEvent("onclick")),i=c.createElement("input"),i.value="t",i.setAttribute("type","radio"),k.radioValue=i.value==="t",i.setAttribute("checked","checked"),a.appendChild(i),l=c.createDocumentFragment(),l.appendChild(a.firstChild),k.checkClone=l.cloneNode(!0).cloneNode(!0).lastChild.checked,a.innerHTML="",a.style.width=a.style.paddingLeft="1px",m=c.getElementsByTagName("body")[0],o=c.createElement(m?"div":"body"),p={visibility:"hidden",width:0,height:0,border:0,margin:0,background:"none"},m&&f.extend(p,{position:"absolute",left:"-1000px",top:"-1000px"});for(t in p)o.style[t]=p[t];o.appendChild(a),n=m||b,n.insertBefore(o,n.firstChild),k.appendChecked=i.checked,k.boxModel=a.offsetWidth===2,"zoom"in a.style&&(a.style.display="inline",a.style.zoom=1,k.inlineBlockNeedsLayout=a.offsetWidth===2,a.style.display="",a.innerHTML="
",k.shrinkWrapBlocks=a.offsetWidth!==2),a.innerHTML="
t
",q=a.getElementsByTagName("td"),u=q[0].offsetHeight===0,q[0].style.display="",q[1].style.display="none",k.reliableHiddenOffsets=u&&q[0].offsetHeight===0,a.innerHTML="",c.defaultView&&c.defaultView.getComputedStyle&&(j=c.createElement("div"),j.style.width="0",j.style.marginRight="0",a.appendChild(j),k.reliableMarginRight=(parseInt((c.defaultView.getComputedStyle(j,null)||{marginRight:0}).marginRight,10)||0)===0),o.innerHTML="",n.removeChild(o);if(a.attachEvent)for(t in{submit:1,change:1,focusin:1})s="on"+t,u=s in a,u||(a.setAttribute(s,"return;"),u=typeof a[s]=="function"),k[t+"Bubbles"]=u;o=l=g=h=m=j=a=i=null;return k}(),f.boxModel=f.support.boxModel;var i=/^(?:\{.*\}|\[.*\])$/,j=/([a-z])([A-Z])/g;f.extend({cache:{},uuid:0,expando:"jQuery"+(f.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){a=a.nodeType?f.cache[a[f.expando]]:a[f.expando];return!!a&&!l(a)},data:function(a,c,d,e){if(!!f.acceptData(a)){var g,h,i=f.expando,j=typeof c=="string",k=a.nodeType,l=k?f.cache:a,m=k?a[f.expando]:a[f.expando]&&f.expando;if((!m||e&&m&&l[m]&&!l[m][i])&&j&&d===b)return;m||(k?a[f.expando]=m=++f.uuid:m=f.expando),l[m]||(l[m]={},k||(l[m].toJSON=f.noop));if(typeof c=="object"||typeof c=="function")e?l[m][i]=f.extend(l[m][i],c):l[m]=f.extend(l[m],c);g=l[m],e&&(g[i]||(g[i]={}),g=g[i]),d!==b&&(g[f.camelCase(c)]=d);if(c==="events"&&!g[c])return g[i]&&g[i].events;j?(h=g[c],h==null&&(h=g[f.camelCase(c)])):h=g;return h}},removeData:function(a,b,c){if(!!f.acceptData(a)){var d,e=f.expando,g=a.nodeType,h=g?f.cache:a,i=g?a[f.expando]:f.expando;if(!h[i])return;if(b){d=c?h[i][e]:h[i];if(d){d[b]||(b=f.camelCase(b)),delete d[b];if(!l(d))return}}if(c){delete h[i][e];if(!l(h[i]))return}var j=h[i][e];f.support.deleteExpando||!h.setInterval?delete h[i]:h[i]=null,j?(h[i]={},g||(h[i].toJSON=f.noop),h[i][e]=j):g&&(f.support.deleteExpando?delete a[f.expando]:a.removeAttribute?a.removeAttribute(f.expando):a[f.expando]=null)}},_data:function(a,b,c){return f.data(a,b,c,!0)},acceptData:function(a){if(a.nodeName){var b=f.noData[a.nodeName.toLowerCase()];if(b)return b!==!0&&a.getAttribute("classid")===b}return!0}}),f.fn.extend({data:function(a,c){var d=null;if(typeof a=="undefined"){if(this.length){d=f.data(this[0]);if(this[0].nodeType===1){var e=this[0].attributes,g;for(var h=0,i=e.length;h-1)return!0;return!1},val:function(a){var c,d,e=this[0];if(!arguments.length){if(e){c=f.valHooks[e.nodeName.toLowerCase()]||f.valHooks[e.type];if(c&&"get"in c&&(d=c.get(e,"value"))!==b)return d;d=e.value;return typeof d=="string"?d.replace(p,""):d==null?"":d}return b}var g=f.isFunction(a);return this.each(function(d){var e=f(this),h;if(this.nodeType===1){g?h=a.call(this,d,e.val()):h=a,h==null?h="":typeof h=="number"?h+="":f.isArray(h)&&(h=f.map(h,function(a){return a==null?"":a+""})),c=f.valHooks[this.nodeName.toLowerCase()]||f.valHooks[this.type];if(!c||!("set"in c)||c.set(this,h,"value")===b)this.value=h}})}}),f.extend({valHooks:{option:{get:function(a){var b=a.attributes.value;return!b||b.specified?a.value:a.text}},select:{get:function(a){var b,c=a.selectedIndex,d=[],e=a.options,g=a.type==="select-one";if(c<0)return null;for(var h=g?c:0,i=g?c+1:e.length;h=0}),c.length||(a.selectedIndex=-1);return c}}},attrFn:{val:!0,css:!0,html:!0,text:!0,data:!0,width:!0,height:!0,offset:!0},attrFix:{tabindex:"tabIndex"},attr:function(a,c,d,e){var g=a.nodeType;if(!a||g===3||g===8||g===2)return b;if(e&&c in f.attrFn)return f(a)[c](d);if(!("getAttribute"in a))return f.prop(a,c,d);var h,i,j=g!==1||!f.isXMLDoc(a);j&&(c=f.attrFix[c]||c,i=f.attrHooks[c],i||(t.test(c)?i=v:u&&(i=u)));if(d!==b){if(d===null){f.removeAttr(a,c);return b}if(i&&"set"in i&&j&&(h=i.set(a,d,c))!==b)return h;a.setAttribute(c,""+d);return d}if(i&&"get"in i&&j&&(h=i.get(a,c))!==null)return h;h=a.getAttribute(c);return h===null?b:h},removeAttr:function(a,b){var c;a.nodeType===1&&(b=f.attrFix[b]||b,f.attr(a,b,""),a.removeAttribute(b),t.test(b)&&(c=f.propFix[b]||b)in a&&(a[c]=!1))},attrHooks:{type:{set:function(a,b){if(q.test(a.nodeName)&&a.parentNode)f.error("type property can't be changed");else if(!f.support.radioValue&&b==="radio"&&f.nodeName(a,"input")){var c=a.value;a.setAttribute("type",b),c&&(a.value=c);return b}}},value:{get:function(a,b){if(u&&f.nodeName(a,"button"))return u.get(a,b);return b in a?a.value:null},set:function(a,b,c){if(u&&f.nodeName(a,"button"))return u.set(a,b,c);a.value=b}}},propFix:{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(a,c,d){var e=a.nodeType;if(!a||e===3||e===8||e===2)return b;var g,h,i=e!==1||!f.isXMLDoc(a);i&&(c=f.propFix[c]||c,h=f.propHooks[c]);return d!==b?h&&"set"in h&&(g=h.set(a,d,c))!==b?g:a[c]=d:h&&"get"in h&&(g=h.get(a,c))!==null?g:a[c]},propHooks:{tabIndex:{get:function(a){var c=a.getAttributeNode("tabindex");return c&&c.specified?parseInt(c.value,10):r.test(a.nodeName)||s.test(a.nodeName)&&a.href?0:b}}}}),f.attrHooks.tabIndex=f.propHooks.tabIndex,v={get:function(a,c){var d;return f.prop(a,c)===!0||(d=a.getAttributeNode(c))&&d.nodeValue!==!1?c.toLowerCase():b},set:function(a,b,c){var d;b===!1?f.removeAttr(a,c):(d=f.propFix[c]||c,d in a&&(a[d]=!0),a.setAttribute(c,c.toLowerCase()));return c}},f.support.getSetAttribute||(u=f.valHooks.button={get:function(a,c){var d;d=a.getAttributeNode(c);return d&&d.nodeValue!==""?d.nodeValue:b},set:function(a,b,d){var e=a.getAttributeNode(d);e||(e=c.createAttribute(d),a.setAttributeNode(e));return e.nodeValue=b+""}},f.each(["width","height"],function(a,b){f.attrHooks[b]=f.extend(f.attrHooks[b],{set:function(a,c){if(c===""){a.setAttribute(b,"auto");return c}}})})),f.support.hrefNormalized||f.each(["href","src","width","height"],function(a,c){f.attrHooks[c]=f.extend(f.attrHooks[c],{get:function(a){var d=a.getAttribute(c,2);return d===null?b:d}})}),f.support.style||(f.attrHooks.style={get:function(a){return a.style.cssText.toLowerCase()||b},set:function(a,b){return a.style.cssText=""+b}}),f.support.optSelected||(f.propHooks.selected=f.extend(f.propHooks.selected,{get:function(a){var b=a.parentNode;b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex);return null}})),f.support.checkOn||f.each(["radio","checkbox"],function(){f.valHooks[this]={get:function(a){return a.getAttribute("value")===null?"on":a.value}}}),f.each(["radio","checkbox"],function(){f.valHooks[this]=f.extend(f.valHooks[this],{set:function(a,b){if(f.isArray(b))return a.checked=f.inArray(f(a).val(),b)>=0}})});var w=/\.(.*)$/,x=/^(?:textarea|input|select)$/i,y=/\./g,z=/ /g,A=/[^\w\s.|`]/g,B=function(a){return a.replace(A,"\\$&")};f.event={add:function(a,c,d,e){if(a.nodeType!==3&&a.nodeType!==8){if(d===!1)d=C;else if(!d)return;var g,h;d.handler&&(g=d,d=g.handler),d.guid||(d.guid=f.guid++);var i=f._data(a);if(!i)return;var j=i.events,k=i.handle;j||(i.events=j={}),k||(i.handle=k=function(a){return typeof f!="undefined"&&(!a||f.event.triggered!==a.type)?f.event.handle.apply(k.elem,arguments):b}),k.elem=a,c=c.split(" ");var l,m=0,n;while(l=c[m++]){h=g?f.extend({},g):{handler:d,data:e},l.indexOf(".")>-1?(n=l.split("."),l=n.shift(),h.namespace=n.slice(0).sort().join(".")):(n=[],h.namespace=""),h.type=l,h.guid||(h.guid=d.guid);var o=j[l],p=f.event.special[l]||{};if(!o){o=j[l]=[];if(!p.setup||p.setup.call(a,e,n,k)===!1)a.addEventListener?a.addEventListener(l,k,!1):a.attachEvent&&a.attachEvent("on"+l,k)}p.add&&(p.add.call(a,h),h.handler.guid||(h.handler.guid=d.guid)),o.push(h),f.event.global[l]=!0}a=null}},global:{},remove:function(a,c,d,e){if(a.nodeType!==3&&a.nodeType!==8){d===!1&&(d=C);var g,h,i,j,k=0,l,m,n,o,p,q,r,s=f.hasData(a)&&f._data(a),t=s&&s.events;if(!s||!t)return;c&&c.type&&(d=c.handler,c=c.type);if(!c||typeof c=="string"&&c.charAt(0)==="."){c=c||"";for(h in t)f.event.remove(a,h+c);return}c=c.split(" ");while(h=c[k++]){r=h,q=null,l=h.indexOf(".")<0,m=[],l||(m=h.split("."),h=m.shift(),n=new RegExp("(^|\\.)"+f.map(m.slice(0).sort(),B).join("\\.(?:.*\\.)?")+"(\\.|$)")),p=t[h];if(!p)continue;if(!d){for(j=0;j=0&&(h=h.slice(0,-1),j=!0),h.indexOf(".")>=0&&(i=h.split("."),h=i.shift(),i.sort());if(!!e&&!f.event.customEvent[h]||!!f.event.global[h]){c=typeof c=="object"?c[f.expando]?c:new f.Event(h,c):new f.Event(h),c.type=h,c.exclusive=j,c.namespace=i.join("."),c.namespace_re=new RegExp("(^|\\.)"+i.join("\\.(?:.*\\.)?")+"(\\.|$)");if(g||!e)c.preventDefault(),c.stopPropagation();if(!e){f.each(f.cache,function(){var a=f.expando,b=this[a];b&&b.events&&b.events[h]&&f.event.trigger(c,d,b.handle.elem)});return}if(e.nodeType===3||e.nodeType===8)return;c.result=b,c.target=e,d=d!=null?f.makeArray(d):[],d.unshift(c);var k=e,l=h.indexOf(":")<0?"on"+h:"";do{var m=f._data(k,"handle");c.currentTarget=k,m&&m.apply(k,d),l&&f.acceptData(k)&&k[l]&&k[l].apply(k,d)===!1&&(c.result=!1,c.preventDefault()),k=k.parentNode||k.ownerDocument||k===c.target.ownerDocument&&a}while(k&&!c.isPropagationStopped());if(!c.isDefaultPrevented()){var n,o=f.event.special[h]||{};if((!o._default||o._default.call(e.ownerDocument,c)===!1)&&(h!=="click"||!f.nodeName(e,"a"))&&f.acceptData(e)){try{l&&e[h]&&(n=e[l],n&&(e[l]=null),f.event.triggered=h,e[h]())}catch(p){}n&&(e[l]=n),f.event.triggered=b}}return c.result}},handle:function(c){c=f.event.fix(c||a.event);var d=((f._data(this,"events")||{})[c.type]||[]).slice(0),e=!c.exclusive&&!c.namespace,g=Array.prototype.slice.call(arguments,0);g[0]=c,c.currentTarget=this;for(var h=0,i=d.length;h-1?f.map(a.options,function(a){return a.selected}).join("-"):"":f.nodeName(a,"select")&&(c=a.selectedIndex);return c},I=function(c){var d=c.target,e,g;if(!!x.test(d.nodeName)&&!d.readOnly){e=f._data(d,"_change_data"),g=H(d),(c.type!=="focusout"||d.type!=="radio")&&f._data(d,"_change_data",g);if(e===b||g===e)return;if(e!=null||g)c.type="change",c.liveFired=b,f.event.trigger(c,arguments[1],d)}};f.event.special.change={filters:{focusout:I,beforedeactivate:I,click:function(a){var b=a.target,c=f.nodeName(b,"input")?b.type:"";(c==="radio"||c==="checkbox"||f.nodeName(b,"select"))&&I.call(this,a)},keydown:function(a){var b=a.target,c=f.nodeName(b,"input")?b.type:"";(a.keyCode===13&&!f.nodeName(b,"textarea")||a.keyCode===32&&(c==="checkbox"||c==="radio")||c==="select-multiple")&&I.call(this,a)},beforeactivate:function(a){var b=a.target;f._data(b,"_change_data",H(b))}},setup:function(a,b){if(this.type==="file")return!1;for(var c in G)f.event.add(this,c+".specialChange",G[c]);return x.test(this.nodeName)},teardown:function(a){f.event.remove(this,".specialChange");return x.test(this.nodeName)}},G=f.event.special.change.filters,G.focus=G.beforeactivate}f.support.focusinBubbles||f.each({focus:"focusin",blur:"focusout"},function(a,b){function e(a){var c=f.event.fix(a);c.type=b,c.originalEvent={},f.event.trigger(c,null,c.target),c.isDefaultPrevented()&&a.preventDefault()}var d=0;f.event.special[b]={setup:function(){d++===0&&c.addEventListener(a,e,!0)},teardown:function(){--d===0&&c.removeEventListener(a,e,!0)}}}),f.each(["bind","one"],function(a,c){f.fn[c]=function(a,d,e){var g;if(typeof a=="object"){for(var h in a)this[c](h,d,a[h],e);return this}if(arguments.length===2||d===!1)e=d,d=b;c==="one"?(g=function(a){f(this).unbind(a,g);return e.apply(this,arguments)},g.guid=e.guid||f.guid++):g=e;if(a==="unload"&&c!=="one")this.one(a,d,e);else for(var i=0,j=this.length;i0?this.bind(b,a,c):this.trigger(b)},f.attrFn&&(f.attrFn[b]=!0)}),function(){function u(a,b,c,d,e,f){for(var g=0,h=d.length;g0){j=i;break}}i=i[a]}d[g]=j}}}function t(a,b,c,d,e,f){for(var g=0,h=d.length;g+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,d=0,e=Object.prototype.toString,g=!1,h=!0,i=/\\/g,j=/\W/;[0,0].sort(function(){h=!1;return 0});var k=function(b,d,f,g){f=f||[],d=d||c;var h=d;if(d.nodeType!==1&&d.nodeType!==9)return[];if(!b||typeof b!="string")return f;var i,j,n,o,q,r,s,t,u=!0,w=k.isXML(d),x=[],y=b;do{a.exec(""),i=a.exec(y);if(i){y=i[3],x.push(i[1]);if(i[2]){o=i[3];break}}}while(i);if(x.length>1&&m.exec(b))if(x.length===2&&l.relative[x[0]])j=v(x[0]+x[1],d);else{j=l.relative[x[0]]?[d]:k(x.shift(),d);while(x.length)b=x.shift(),l.relative[b]&&(b+=x.shift()),j=v(b,j)}else{!g&&x.length>1&&d.nodeType===9&&!w&&l.match.ID.test(x[0])&&!l.match.ID.test(x[x.length-1])&&(q=k.find(x.shift(),d,w),d=q.expr?k.filter(q.expr,q.set)[0]:q.set[0]);if(d){q=g?{expr:x.pop(),set:p(g)}:k.find(x.pop(),x.length===1&&(x[0]==="~"||x[0]==="+")&&d.parentNode?d.parentNode:d,w),j=q.expr?k.filter(q.expr,q.set):q.set,x.length>0?n=p(j):u=!1;while(x.length)r=x.pop(),s=r,l.relative[r]?s=x.pop():r="",s==null&&(s=d),l.relative[r](n,s,w)}else n=x=[]}n||(n=j),n||k.error(r||b);if(e.call(n)==="[object Array]")if(!u)f.push.apply(f,n);else if(d&&d.nodeType===1)for(t=0;n[t]!=null;t++)n[t]&&(n[t]===!0||n[t].nodeType===1&&k.contains(d,n[t]))&&f.push(j[t]);else for(t=0;n[t]!=null;t++)n[t]&&n[t].nodeType===1&&f.push(j[t]);else p(n,f);o&&(k(o,h,f,g),k.uniqueSort(f));return f};k.uniqueSort=function(a){if(r){g=h,a.sort(r);if(g)for(var b=1;b0},k.find=function(a,b,c){var d;if(!a)return[];for(var e=0,f=l.order.length;e":function(a,b){var c,d=typeof b=="string",e=0,f=a.length;if(d&&!j.test(b)){b=b.toLowerCase();for(;e=0)?c||d.push(h):c&&(b[g]=!1));return!1},ID:function(a){return a[1].replace(i,"")},TAG:function(a,b){return a[1].replace(i,"").toLowerCase()},CHILD:function(a){if(a[1]==="nth"){a[2]||k.error(a[0]),a[2]=a[2].replace(/^\+|\s*/g,"");var b=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(a[2]==="even"&&"2n"||a[2]==="odd"&&"2n+1"||!/\D/.test(a[2])&&"0n+"+a[2]||a[2]);a[2]=b[1]+(b[2]||1)-0,a[3]=b[3]-0}else a[2]&&k.error(a[0]);a[0]=d++;return a},ATTR:function(a,b,c,d,e,f){var g=a[1]=a[1].replace(i,"");!f&&l.attrMap[g]&&(a[1]=l.attrMap[g]),a[4]=(a[4]||a[5]||"").replace(i,""),a[2]==="~="&&(a[4]=" "+a[4]+" ");return a},PSEUDO:function(b,c,d,e,f){if(b[1]==="not")if((a.exec(b[3])||"").length>1||/^\w/.test(b[3]))b[3]=k(b[3],null,null,c);else{var g=k.filter(b[3],c,d,!0^f);d||e.push.apply(e,g);return!1}else if(l.match.POS.test(b[0])||l.match.CHILD.test(b[0]))return!0;return b},POS:function(a){a.unshift(!0);return a}},filters:{enabled:function(a){return a.disabled===!1&&a.type!=="hidden"},disabled:function(a){return a.disabled===!0},checked:function(a){return a.checked===!0},selected:function(a){a.parentNode&&a.parentNode.selectedIndex;return a.selected===!0},parent:function(a){return!!a.firstChild},empty:function(a){return!a.firstChild},has:function(a,b,c){return!!k(c[3],a).length},header:function(a){return/h\d/i.test(a.nodeName)},text:function(a){var b=a.getAttribute("type"),c=a.type;return a.nodeName.toLowerCase()==="input"&&"text"===c&&(b===c||b===null)},radio:function(a){return a.nodeName.toLowerCase()==="input"&&"radio"===a.type},checkbox:function(a){return a.nodeName.toLowerCase()==="input"&&"checkbox"===a.type},file:function(a){return a.nodeName.toLowerCase()==="input"&&"file"===a.type},password:function(a){return a.nodeName.toLowerCase()==="input"&&"password"===a.type},submit:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"submit"===a.type},image:function(a){return a.nodeName.toLowerCase()==="input"&&"image"===a.type},reset:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"reset"===a.type},button:function(a){var b=a.nodeName.toLowerCase();return b==="input"&&"button"===a.type||b==="button"},input:function(a){return/input|select|textarea|button/i.test(a.nodeName)},focus:function(a){return a===a.ownerDocument.activeElement}},setFilters:{first:function(a,b){return b===0},last:function(a,b,c,d){return b===d.length-1},even:function(a,b){return b%2===0},odd:function(a,b){return b%2===1},lt:function(a,b,c){return bc[3]-0},nth:function(a,b,c){return c[3]-0===b},eq:function(a,b,c){return c[3]-0===b}},filter:{PSEUDO:function(a,b,c,d){var e=b[1],f=l.filters[e];if(f)return f(a,c,b,d);if(e==="contains")return(a.textContent||a.innerText||k.getText([a])||"").indexOf(b[3])>=0;if(e==="not"){var g=b[3];for(var h=0,i=g.length;h=0}},ID:function(a,b){return a.nodeType===1&&a.getAttribute("id")===b},TAG:function(a,b){return b==="*"&&a.nodeType===1||a.nodeName.toLowerCase()===b},CLASS:function(a,b){return(" "+(a.className||a.getAttribute("class"))+" ").indexOf(b)>-1},ATTR:function(a,b){var c=b[1],d=l.attrHandle[c]?l.attrHandle[c](a):a[c]!=null?a[c]:a.getAttribute(c),e=d+"",f=b[2],g=b[4];return d==null?f==="!=":f==="="?e===g:f==="*="?e.indexOf(g)>=0:f==="~="?(" "+e+" ").indexOf(g)>=0:g?f==="!="?e!==g:f==="^="?e.indexOf(g)===0:f==="$="?e.substr(e.length-g.length)===g:f==="|="?e===g||e.substr(0,g.length+1)===g+"-":!1:e&&d!==!1},POS:function(a,b,c,d){var e=b[2],f=l.setFilters[e];if(f)return f(a,c,b,d)}}},m=l.match.POS,n=function(a,b){return"\\"+(b-0+1)};for(var o in l.match)l.match[o]=new RegExp(l.match[o].source+/(?![^\[]*\])(?![^\(]*\))/.source),l.leftMatch[o]=new RegExp(/(^(?:.|\r|\n)*?)/.source+l.match[o].source.replace(/\\(\d+)/g,n));var p=function(a,b){a=Array.prototype.slice.call(a,0);if(b){b.push.apply(b,a);return b}return a};try{Array.prototype.slice.call(c.documentElement.childNodes,0)[0].nodeType}catch(q){p=function(a,b){var c=0,d=b||[];if(e.call(a)==="[object Array]")Array.prototype.push.apply(d,a);else if(typeof a.length=="number")for(var f=a.length;c",e.insertBefore(a,e.firstChild),c.getElementById(d)&&(l.find.ID=function(a,c,d){if(typeof c.getElementById!="undefined"&&!d){var e=c.getElementById(a[1]);return e?e.id===a[1]||typeof e.getAttributeNode!="undefined"&&e.getAttributeNode("id").nodeValue===a[1]?[e]:b:[]}},l.filter.ID=function(a,b){var c=typeof a.getAttributeNode!="undefined"&&a.getAttributeNode("id");return a.nodeType===1&&c&&c.nodeValue===b}),e.removeChild(a),e=a=null}(),function(){var a=c.createElement("div");a.appendChild(c.createComment("")),a.getElementsByTagName("*").length>0&&(l.find.TAG=function(a,b){var c=b.getElementsByTagName(a[1]);if(a[1]==="*"){var d=[];for(var e=0;c[e];e++)c[e].nodeType===1&&d.push(c[e]);c=d}return c}),a.innerHTML="",a.firstChild&&typeof a.firstChild.getAttribute!="undefined"&&a.firstChild.getAttribute("href")!=="#"&&(l.attrHandle.href=function(a){return a.getAttribute("href",2)}),a=null}(),c.querySelectorAll&&function(){var a=k,b=c.createElement("div"),d="__sizzle__";b.innerHTML="

";if(!b.querySelectorAll||b.querySelectorAll(".TEST").length!==0){k=function(b,e,f,g){e=e||c;if(!g&&!k.isXML(e)){var h=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b);if(h&&(e.nodeType===1||e.nodeType===9)){if(h[1])return p(e.getElementsByTagName(b),f);if(h[2]&&l.find.CLASS&&e.getElementsByClassName)return p(e.getElementsByClassName(h[2]),f)}if(e.nodeType===9){if(b==="body"&&e.body)return p([e.body],f);if(h&&h[3]){var i=e.getElementById(h[3]);if(!i||!i.parentNode)return p([],f);if(i.id===h[3])return p([i],f)}try{return p(e.querySelectorAll(b),f)}catch(j){}}else if(e.nodeType===1&&e.nodeName.toLowerCase()!=="object"){var m=e,n=e.getAttribute("id"),o=n||d,q=e.parentNode,r=/^\s*[+~]/.test(b);n?o=o.replace(/'/g,"\\$&"):e.setAttribute("id",o),r&&q&&(e=e.parentNode);try{if(!r||q)return p(e.querySelectorAll("[id='"+o+"'] "+b),f)}catch(s){}finally{n||m.removeAttribute("id")}}}return a(b,e,f,g)};for(var e in a)k[e]=a[e];b=null}}(),function(){var a=c.documentElement,b=a.matchesSelector||a.mozMatchesSelector||a.webkitMatchesSelector||a.msMatchesSelector;if(b){var d=!b.call(c.createElement("div"),"div"),e=!1;try{b.call(c.documentElement,"[test!='']:sizzle")}catch(f){e=!0}k.matchesSelector=function(a,c){c=c.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!k.isXML(a))try{if(e||!l.match.PSEUDO.test(c)&&!/!=/.test(c)){var f=b.call(a,c);if(f||!d||a.document&&a.document.nodeType!==11)return f}}catch(g){}return k(c,null,null,[a]).length>0}}}(),function(){var a=c.createElement("div");a.innerHTML="
";if(!!a.getElementsByClassName&&a.getElementsByClassName("e").length!==0){a.lastChild.className="e";if(a.getElementsByClassName("e").length===1)return;l.order.splice(1,0,"CLASS"),l.find.CLASS=function(a,b,c){if(typeof b.getElementsByClassName!="undefined"&&!c)return b.getElementsByClassName(a[1])},a=null}}(),c.documentElement.contains?k.contains=function(a,b){return a!==b&&(a.contains?a.contains(b):!0)}:c.documentElement.compareDocumentPosition?k.contains=function(a,b){return!!(a.compareDocumentPosition(b)&16)}:k.contains=function(){return!1},k.isXML=function(a){var b=(a?a.ownerDocument||a:0).documentElement;return b?b.nodeName!=="HTML":!1};var v=function(a,b){var c,d=[],e="",f=b.nodeType?[b]:b;while(c=l.match.PSEUDO.exec(a))e+=c[0],a=a.replace(l.match.PSEUDO,"");a=l.relative[a]?a+"*":a;for(var g=0,h=f.length;g0)for(h=g;h0:this.filter(a).length>0)},closest:function(a,b){var c=[],d,e,g=this[0];if(f.isArray(a)){var h,i,j={},k=1;if(g&&a.length){for(d=0,e=a.length;d-1:f(g).is(h))&&c.push({selector:i,elem:g,level:k});g=g.parentNode,k++}}return c}var l=S.test(a)||typeof a!="string"?f(a,b||this.context):0;for(d=0,e=this.length;d-1:f.find.matchesSelector(g,a)){c.push(g);break}g=g.parentNode;if(!g||!g.ownerDocument||g===b||g.nodeType===11)break}}c=c.length>1?f.unique(c):c;return this.pushStack(c,"closest",a)},index:function(a){if(!a)return this[0]&&this[0].parentNode?this.prevAll().length:-1;if(typeof a=="string")return f.inArray(this[0],f(a));return f.inArray(a.jquery?a[0]:a,this)},add:function(a,b){var c=typeof a=="string"?f(a,b):f.makeArray(a&&a.nodeType?[a]:a),d=f.merge(this.get(),c);return this.pushStack(U(c[0])||U(d[0])?d:f.unique(d))},andSelf:function(){return this.add(this.prevObject)}}),f.each({parent:function(a){var b=a.parentNode;return b&&b.nodeType!==11?b:null},parents:function(a){return f.dir(a,"parentNode")},parentsUntil:function(a,b,c){return f.dir(a,"parentNode",c)},next:function(a){return f.nth(a,2,"nextSibling")},prev:function(a){return f.nth(a,2,"previousSibling")},nextAll:function(a){return f.dir(a,"nextSibling")},prevAll:function(a){return f.dir(a,"previousSibling")},nextUntil:function(a,b,c){return f.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return f.dir(a,"previousSibling",c)},siblings:function(a){return f.sibling(a.parentNode.firstChild,a)},children:function(a){return f.sibling(a.firstChild)},contents:function(a){return f.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:f.makeArray(a.childNodes)}},function(a,b){f.fn[a]=function(c,d){var e=f.map(this,b,c),g=R.call(arguments);N.test(a)||(d=c),d&&typeof d=="string"&&(e=f.filter(d,e)),e=this.length>1&&!T[a]?f.unique(e):e,(this.length>1||P.test(d))&&O.test(a)&&(e=e.reverse());return this.pushStack(e,a,g.join(","))}}),f.extend({filter:function(a,b,c){c&&(a=":not("+a+")");return b.length===1?f.find.matchesSelector(b[0],a)?[b[0]]:[]:f.find.matches(a,b)},dir:function(a,c,d){var e=[],g=a[c];while(g&&g.nodeType!==9&&(d===b||g.nodeType!==1||!f(g).is(d)))g.nodeType===1&&e.push(g),g=g[c];return e},nth:function(a,b,c,d){b=b||1;var e=0;for(;a;a=a[c])if(a.nodeType===1&&++e===b)break;return a},sibling:function(a,b){var c=[];for(;a;a=a.nextSibling)a.nodeType===1&&a!==b&&c.push(a);return c}});var W=/ jQuery\d+="(?:\d+|null)"/g,X=/^\s+/,Y=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,Z=/<([\w:]+)/,$=/",""],legend:[1,"
","
"],thead:[1,"","
"],tr:[2,"","
"],td:[3,"","
"],col:[2,"","
"],area:[1,"",""],_default:[0,"",""]};be.optgroup=be.option,be.tbody=be.tfoot=be.colgroup=be.caption=be.thead,be.th=be.td,f.support.htmlSerialize||(be._default=[1,"div
","
"]),f.fn.extend({text:function(a){if(f.isFunction(a))return this.each(function(b){var c=f(this);c.text(a.call(this,b,c.text()))});if(typeof a!="object"&&a!==b)return this.empty().append((this[0]&&this[0].ownerDocument||c).createTextNode(a));return f.text(this)},wrapAll:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapAll(a.call(this,b))});if(this[0]){var b=f(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&a.firstChild.nodeType===1)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapInner(a.call(this,b))});return this.each(function(){var b=f(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){return this.each(function(){f(this).wrapAll(a)})},unwrap:function(){return this.parent().each(function(){f.nodeName(this,"body")||f(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this)});if(arguments.length){var a=f(arguments[0]);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)});if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,f(arguments[0]).toArray());return a}},remove:function(a,b){for(var c=0,d;(d=this[c])!=null;c++)if(!a||f.filter(a,[d]).length)!b&&d.nodeType===1&&(f.cleanData(d.getElementsByTagName("*")),f.cleanData([d])),d.parentNode&&d.parentNode.removeChild(d);return this},empty:function(){for(var a=0,b;(b=this[a])!=null;a++){b.nodeType===1&&f.cleanData(b.getElementsByTagName("*"));while(b.firstChild)b.removeChild(b.firstChild)}return this},clone:function(a,b){a=a==null?!1:a,b=b==null?a:b;return this.map(function(){return f.clone(this,a,b)})},html:function(a){if(a===b)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(W,""):null;if(typeof a=="string"&&!ba.test(a)&&(f.support.leadingWhitespace||!X.test(a))&&!be[(Z.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Y,"<$1>");try{for(var c=0,d=this.length;c1&&l0?this.clone(!0):this).get();f(e[h])[b](j),d=d.concat(j)}return this.pushStack(d,a,e.selector)}}),f.extend({clone:function(a,b,c){var d=a.cloneNode(!0),e,g,h;if((!f.support.noCloneEvent||!f.support.noCloneChecked)&&(a.nodeType===1||a.nodeType===11)&&!f.isXMLDoc(a)){bh(a,d),e=bi(a),g=bi(d);for(h=0;e[h];++h)g[h]&&bh(e[h],g[h])}if(b){bg(a,d);if(c){e=bi(a),g=bi(d);for(h=0;e[h];++h)bg(e[h],g[h])}}e=g=null;return d},clean:function(a,b,d,e){var g;b=b||c,typeof b.createElement=="undefined"&&(b=b.ownerDocument||b[0]&&b[0].ownerDocument||c);var h=[],i;for(var j=0,k;(k=a[j])!=null;j++){typeof k=="number"&&(k+="");if(!k)continue;if(typeof k=="string")if(!_.test(k))k=b.createTextNode(k);else{k=k.replace(Y,"<$1>");var l=(Z.exec(k)||["",""])[1].toLowerCase(),m=be[l]||be._default,n=m[0],o=b.createElement("div");o.innerHTML=m[1]+k+m[2];while(n--)o=o.lastChild;if(!f.support.tbody){var p=$.test(k),q=l==="table"&&!p?o.firstChild&&o.firstChild.childNodes:m[1]===""&&!p?o.childNodes:[];for(i=q.length-1;i>=0;--i)f.nodeName(q[i],"tbody")&&!q[i].childNodes.length&&q[i].parentNode.removeChild(q[i])}!f.support.leadingWhitespace&&X.test(k)&&o.insertBefore(b.createTextNode(X.exec(k)[0]),o.firstChild),k=o.childNodes}var r;if(!f.support.appendChecked)if(k[0]&&typeof (r=k.length)=="number")for(i=0;i=0)return b+"px"}}}),f.support.opacity||(f.cssHooks.opacity={get:function(a,b){return bn.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=f.isNaN(b)?"":"alpha(opacity="+b*100+")",g=d&&d.filter||c.filter||"";c.zoom=1;if(b>=1&&f.trim(g.replace(bm,""))===""){c.removeAttribute("filter");if(d&&!d.filter)return}c.filter=bm.test(g)?g.replace(bm,e):g+" "+e}}),f(function(){f.support.reliableMarginRight||(f.cssHooks.marginRight={get:function(a,b){var c;f.swap(a,{display:"inline-block"},function(){b?c=bv(a,"margin-right","marginRight"):c=a.style.marginRight});return c}})}),c.defaultView&&c.defaultView.getComputedStyle&&(bw=function(a,c){var d,e,g;c=c.replace(bo,"-$1").toLowerCase();if(!(e=a.ownerDocument.defaultView))return b;if(g=e.getComputedStyle(a,null))d=g.getPropertyValue(c),d===""&&!f.contains(a.ownerDocument.documentElement,a)&&(d=f.style(a,c));return d}),c.documentElement.currentStyle&&(bx=function(a,b){var c,d=a.currentStyle&&a.currentStyle[b],e=a.runtimeStyle&&a.runtimeStyle[b],f=a.style;!bp.test(d)&&bq.test(d)&&(c=f.left,e&&(a.runtimeStyle.left=a.currentStyle.left),f.left=b==="fontSize"?"1em":d||0,d=f.pixelLeft+"px",f.left=c,e&&(a.runtimeStyle.left=e));return d===""?"auto":d}),bv=bw||bx,f.expr&&f.expr.filters&&(f.expr.filters.hidden=function(a){var b=a.offsetWidth,c=a.offsetHeight;return b===0&&c===0||!f.support.reliableHiddenOffsets&&(a.style.display||f.css(a,"display"))==="none"},f.expr.filters.visible=function(a){return!f.expr.filters.hidden(a)});var bz=/%20/g,bA=/\[\]$/,bB=/\r?\n/g,bC=/#.*$/,bD=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,bE=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,bF=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,bG=/^(?:GET|HEAD)$/,bH=/^\/\//,bI=/\?/,bJ=/)<[^<]*)*<\/script>/gi,bK=/^(?:select|textarea)/i,bL=/\s+/,bM=/([?&])_=[^&]*/,bN=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,bO=f.fn.load,bP={},bQ={},bR,bS,bT=["*/"]+["*"];try{bR=e.href}catch(bU){bR=c.createElement("a"),bR.href="",bR=bR.href}bS=bN.exec(bR.toLowerCase())||[],f.fn.extend({load:function(a,c,d){if(typeof a!="string"&&bO)return bO.apply(this,arguments);if(!this.length)return this;var e=a.indexOf(" ");if(e>=0){var g=a.slice(e,a.length);a=a.slice(0,e)}var h="GET";c&&(f.isFunction(c)?(d=c,c=b):typeof c=="object"&&(c=f.param(c,f.ajaxSettings.traditional),h="POST"));var i=this;f.ajax({url:a,type:h,dataType:"html",data:c,complete:function(a,b,c){c=a.responseText,a.isResolved()&&(a.done(function(a){c=a}),i.html(g?f("
").append(c.replace(bJ,"")).find(g):c)),d&&i.each(d,[c,b,a])}});return this},serialize:function(){return f.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?f.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||bK.test(this.nodeName)||bE.test(this.type))}).map(function(a,b){var c=f(this).val();return c==null?null:f.isArray(c)?f.map(c,function(a,c){return{name:b.name,value:a.replace(bB,"\r\n")}}):{name:b.name,value:c.replace(bB,"\r\n")}}).get()}}),f.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){f.fn[b]=function(a){return this.bind(b,a)}}),f.each(["get","post"],function(a,c){f[c]=function(a,d,e,g){f.isFunction(d)&&(g=g||e,e=d,d=b);return f.ajax({type:c,url:a,data:d,success:e,dataType:g})}}),f.extend({getScript:function(a,c){return f.get(a,b,c,"script")},getJSON:function(a,b,c){return f.get(a,b,c,"json")},ajaxSetup:function(a,b){b?bX(a,f.ajaxSettings):(b=a,a=f.ajaxSettings),bX(a,b);return a},ajaxSettings:{url:bR,isLocal:bF.test(bS[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":bT},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":a.String,"text html":!0,"text json":f.parseJSON,"text xml":f.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:bV(bP),ajaxTransport:bV(bQ),ajax:function(a,c){function w(a,c,l,m){if(s!==2){s=2,q&&clearTimeout(q),p=b,n=m||"",v.readyState=a>0?4:0;var o,r,u,w=c,x=l?bZ(d,v,l):b,y,z;if(a>=200&&a<300||a===304){if(d.ifModified){if(y=v.getResponseHeader("Last-Modified"))f.lastModified[k]=y;if(z=v.getResponseHeader("Etag"))f.etag[k]=z}if(a===304)w="notmodified",o=!0;else try{r=b$(d,x),w="success",o=!0}catch(A){w="parsererror",u=A}}else{u=w;if(!w||a)w="error",a<0&&(a=0)}v.status=a,v.statusText=""+(c||w),o?h.resolveWith(e,[r,w,v]):h.rejectWith(e,[v,w,u]),v.statusCode(j),j=b,t&&g.trigger("ajax"+(o?"Success":"Error"),[v,d,o?r:u]),i.resolveWith(e,[v,w]),t&&(g.trigger("ajaxComplete",[v,d]),--f.active||f.event.trigger("ajaxStop"))}}typeof a=="object"&&(c=a,a=b),c=c||{};var d=f.ajaxSetup({},c),e=d.context||d,g=e!==d&&(e.nodeType||e instanceof f)?f(e):f.event,h=f.Deferred(),i=f._Deferred(),j=d.statusCode||{},k,l={},m={},n,o,p,q,r,s=0,t,u,v={readyState:0,setRequestHeader:function(a,b){if(!s){var c=a.toLowerCase();a=m[c]=m[c]||a,l[a]=b}return this},getAllResponseHeaders:function(){return s===2?n:null},getResponseHeader:function(a){var c;if(s===2){if(!o){o={};while(c=bD.exec(n))o[c[1].toLowerCase()]=c[2]}c=o[a.toLowerCase()]}return c===b?null:c},overrideMimeType:function(a){s||(d.mimeType=a);return this},abort:function(a){a=a||"abort",p&&p.abort(a),w(0,a);return this}};h.promise(v),v.success=v.done,v.error=v.fail,v.complete=i.done,v.statusCode=function(a){if(a){var b;if(s<2)for(b in a)j[b]=[j[b],a[b]];else b=a[v.status],v.then(b,b)}return this},d.url=((a||d.url)+"").replace(bC,"").replace(bH,bS[1]+"//"),d.dataTypes=f.trim(d.dataType||"*").toLowerCase().split(bL),d.crossDomain==null&&(r=bN.exec(d.url.toLowerCase()),d.crossDomain=!(!r||r[1]==bS[1]&&r[2]==bS[2]&&(r[3]||(r[1]==="http:"?80:443))==(bS[3]||(bS[1]==="http:"?80:443)))),d.data&&d.processData&&typeof d.data!="string"&&(d.data=f.param(d.data,d.traditional)),bW(bP,d,c,v);if(s===2)return!1;t=d.global,d.type=d.type.toUpperCase(),d.hasContent=!bG.test(d.type),t&&f.active++===0&&f.event.trigger("ajaxStart");if(!d.hasContent){d.data&&(d.url+=(bI.test(d.url)?"&":"?")+d.data,delete d.data),k=d.url;if(d.cache===!1){var x=f.now(),y=d.url.replace(bM,"$1_="+x);d.url=y+(y===d.url?(bI.test(d.url)?"&":"?")+"_="+x:"")}}(d.data&&d.hasContent&&d.contentType!==!1||c.contentType)&&v.setRequestHeader("Content-Type",d.contentType),d.ifModified&&(k=k||d.url,f.lastModified[k]&&v.setRequestHeader("If-Modified-Since",f.lastModified[k]),f.etag[k]&&v.setRequestHeader("If-None-Match",f.etag[k])),v.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+(d.dataTypes[0]!=="*"?", "+bT+"; q=0.01":""):d.accepts["*"]);for(u in d.headers)v.setRequestHeader(u,d.headers[u]);if(d.beforeSend&&(d.beforeSend.call(e,v,d)===!1||s===2)){v.abort();return!1}for(u in{success:1,error:1,complete:1})v[u](d[u]);p=bW(bQ,d,c,v);if(!p)w(-1,"No Transport");else{v.readyState=1,t&&g.trigger("ajaxSend",[v,d]),d.async&&d.timeout>0&&(q=setTimeout(function(){v.abort("timeout")},d.timeout));try{s=1,p.send(l,w)}catch(z){s<2?w(-1,z):f.error(z)}}return v},param:function(a,c){var d=[],e=function(a,b){b=f.isFunction(b)?b():b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};c===b&&(c=f.ajaxSettings.traditional);if(f.isArray(a)||a.jquery&&!f.isPlainObject(a))f.each(a,function(){e(this.name,this.value)});else for(var g in a)bY(g,a[g],c,e);return d.join("&").replace(bz,"+")}}),f.extend({active:0,lastModified:{},etag:{}});var b_=f.now(),ca=/(\=)\?(&|$)|\?\?/i;f.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return f.expando+"_"+b_++}}),f.ajaxPrefilter("json jsonp",function(b,c,d){var e=b.contentType==="application/x-www-form-urlencoded"&&typeof b.data=="string";if(b.dataTypes[0]==="jsonp"||b.jsonp!==!1&&(ca.test(b.url)||e&&ca.test(b.data))){var g,h=b.jsonpCallback=f.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,i=a[h],j=b.url,k=b.data,l="$1"+h+"$2";b.jsonp!==!1&&(j=j.replace(ca,l),b.url===j&&(e&&(k=k.replace(ca,l)),b.data===k&&(j+=(/\?/.test(j)?"&":"?")+b.jsonp+"="+h))),b.url=j,b.data=k,a[h]=function(a){g=[a]},d.always(function(){a[h]=i,g&&f.isFunction(i)&&a[h](g[0])}),b.converters["script json"]=function(){g||f.error(h+" was not called");return g[0]},b.dataTypes[0]="json";return"script"}}),f.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(a){f.globalEval(a);return a}}}),f.ajaxPrefilter("script",function(a){a.cache===b&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),f.ajaxTransport("script",function(a){if(a.crossDomain){var d,e=c.head||c.getElementsByTagName("head")[0]||c.documentElement;return{send:function(f,g){d=c.createElement("script"),d.async="async",a.scriptCharset&&(d.charset=a.scriptCharset),d.src=a.url,d.onload=d.onreadystatechange=function(a,c){if(c||!d.readyState||/loaded|complete/.test(d.readyState))d.onload=d.onreadystatechange=null,e&&d.parentNode&&e.removeChild(d),d=b,c||g(200,"success")},e.insertBefore(d,e.firstChild)},abort:function(){d&&d.onload(0,1)}}}});var cb=a.ActiveXObject?function(){for(var a in cd)cd[a](0,1)}:!1,cc=0,cd;f.ajaxSettings.xhr=a.ActiveXObject?function(){return!this.isLocal&&ce()||cf()}:ce,function(a){f.extend(f.support,{ajax:!!a,cors:!!a&&"withCredentials"in a})}(f.ajaxSettings.xhr()),f.support.ajax&&f.ajaxTransport(function(c){if(!c.crossDomain||f.support.cors){var d;return{send:function(e,g){var h=c.xhr(),i,j;c.username?h.open(c.type,c.url,c.async,c.username,c.password):h.open(c.type,c.url,c.async);if(c.xhrFields)for(j in c.xhrFields)h[j]=c.xhrFields[j];c.mimeType&&h.overrideMimeType&&h.overrideMimeType(c.mimeType),!c.crossDomain&&!e["X-Requested-With"]&&(e["X-Requested-With"]="XMLHttpRequest");try{for(j in e)h.setRequestHeader(j,e[j])}catch(k){}h.send(c.hasContent&&c.data||null),d=function(a,e){var j,k,l,m,n;try{if(d&&(e||h.readyState===4)){d=b,i&&(h.onreadystatechange=f.noop,cb&&delete cd[i]);if(e)h.readyState!==4&&h.abort();else{j=h.status,l=h.getAllResponseHeaders(),m={},n=h.responseXML,n&&n.documentElement&&(m.xml=n),m.text=h.responseText;try{k=h.statusText}catch(o){k=""}!j&&c.isLocal&&!c.crossDomain?j=m.text?200:404:j===1223&&(j=204)}}}catch(p){e||g(-1,p)}m&&g(j,k,m,l)},!c.async||h.readyState===4?d():(i=++cc,cb&&(cd||(cd={},f(a).unload(cb)),cd[i]=d),h.onreadystatechange=d)},abort:function(){d&&d(0,1)}}}});var cg={},ch,ci,cj=/^(?:toggle|show|hide)$/,ck=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,cl,cm=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]],cn;f.fn.extend({show:function(a,b,c){var d,e;if(a||a===0)return this.animate(cq("show",3),a,b,c);for(var g=0,h=this.length;g=e.duration+this.startTime){this.now=this.end,this.pos=this.state=1,this.update(),e.animatedProperties[this.prop]=!0;for(g in e.animatedProperties)e.animatedProperties[g]!==!0&&(c=!1);if(c){e.overflow!=null&&!f.support.shrinkWrapBlocks&&f.each(["","X","Y"],function(a,b){d.style["overflow"+b]=e.overflow[a]}),e.hide&&f(d).hide();if(e.hide||e.show)for(var i in e.animatedProperties)f.style(d,i,e.orig[i]);e.complete.call(d)}return!1}e.duration==Infinity?this.now=b:(h=b-this.startTime,this.state=h/e.duration,this.pos=f.easing[e.animatedProperties[this.prop]](this.state,h,0,1,e.duration),this.now=this.start+(this.end-this.start)*this.pos),this.update();return!0}},f.extend(f.fx,{tick:function(){for(var a=f.timers,b=0;b
";f.extend(b.style,{position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"}),b.innerHTML=j,a.insertBefore(b,a.firstChild),d=b.firstChild,e=d.firstChild,h=d.nextSibling.firstChild.firstChild,this.doesNotAddBorder=e.offsetTop!==5,this.doesAddBorderForTableAndCells=h.offsetTop===5,e.style.position="fixed",e.style.top="20px",this.supportsFixedPosition=e.offsetTop===20||e.offsetTop===15,e.style.position=e.style.top="",d.style.overflow="hidden",d.style.position="relative",this.subtractsBorderForOverflowNotVisible=e.offsetTop===-5,this.doesNotIncludeMarginInBodyOffset=a.offsetTop!==i,a.removeChild(b),f.offset.initialize=f.noop},bodyOffset:function(a){var b=a.offsetTop,c=a.offsetLeft;f.offset.initialize(),f.offset.doesNotIncludeMarginInBodyOffset&&(b+=parseFloat(f.css(a,"marginTop"))||0,c+=parseFloat(f.css(a,"marginLeft"))||0);return{top:b,left:c}},setOffset:function(a,b,c){var d=f.css(a,"position");d==="static"&&(a.style.position="relative");var e=f(a),g=e.offset(),h=f.css(a,"top"),i=f.css(a,"left"),j=(d==="absolute"||d==="fixed")&&f.inArray("auto",[h,i])>-1,k={},l={},m,n;j?(l=e.position(),m=l.top,n=l.left):(m=parseFloat(h)||0,n=parseFloat(i)||0),f.isFunction(b)&&(b=b.call(a,c,g)),b.top!=null&&(k.top=b.top-g.top+m),b.left!=null&&(k.left=b.left-g.left+n),"using"in b?b.using.call(a,k):e.css(k)}},f.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),c=this.offset(),d=ct.test(b[0].nodeName)?{top:0,left:0}:b.offset();c.top-=parseFloat(f.css(a,"marginTop"))||0,c.left-=parseFloat(f.css(a,"marginLeft"))||0,d.top+=parseFloat(f.css(b[0],"borderTopWidth"))||0,d.left+=parseFloat(f.css(b[0],"borderLeftWidth"))||0;return{top:c.top-d.top,left:c.left-d.left}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||c.body;while(a&&!ct.test(a.nodeName)&&f.css(a,"position")==="static")a=a.offsetParent;return a})}}),f.each(["Left","Top"],function(a,c){var d="scroll"+c;f.fn[d]=function(c){var e,g;if(c===b){e=this[0];if(!e)return null;g=cu(e);return g?"pageXOffset"in g?g[a?"pageYOffset":"pageXOffset"]:f.support.boxModel&&g.document.documentElement[d]||g.document.body[d]:e[d]}return this.each(function(){g=cu(this),g?g.scrollTo(a?f(g).scrollLeft():c,a?c:f(g).scrollTop()):this[d]=c})}}),f.each(["Height","Width"],function(a,c){var d=c.toLowerCase();f.fn["inner"+c]=function(){var a=this[0];return a&&a.style?parseFloat(f.css(a,d,"padding")):null},f.fn["outer"+c]=function(a){var b=this[0];return b&&b.style?parseFloat(f.css(b,d,a?"margin":"border")):null},f.fn[d]=function(a){var e=this[0];if(!e)return a==null?null:this;if(f.isFunction(a))return this.each(function(b){var c=f(this);c[d](a.call(this,b,c[d]()))});if(f.isWindow(e)){var g=e.document.documentElement["client"+c],h=e.document.body;return e.document.compatMode==="CSS1Compat"&&g||h&&h["client"+c]||g}if(e.nodeType===9)return Math.max(e.documentElement["client"+c],e.body["scroll"+c],e.documentElement["scroll"+c],e.body["offset"+c],e.documentElement["offset"+c]);if(a===b){var i=f.css(e,d),j=parseFloat(i);return f.isNaN(j)?i:j}return this.css(d,typeof a=="string"?a:a+"px")}}),a.jQuery=a.$=f})(window); \ No newline at end of file diff --git a/PHP/CodeCoverage/Report/HTML/Renderer/Template/style.css b/PHP/CodeCoverage/Report/HTML/Renderer/Template/style.css index 703a725a6..3070a6079 100644 --- a/PHP/CodeCoverage/Report/HTML/Renderer/Template/style.css +++ b/PHP/CodeCoverage/Report/HTML/Renderer/Template/style.css @@ -493,3 +493,8 @@ pre span.keyword { pre span.string { color: #2e3436; } + +#classCoverageDistribution, #classComplexity { + height: 200px; + width: 475px; +} \ No newline at end of file