You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@usergrid.apache.org by sn...@apache.org on 2014/01/28 00:21:51 UTC

[33/61] [abbrv] [partial] updated to latest Angular-based admin portal

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/js/libs/Highcharts-2.3.5/js/adapters/prototype-adapter.js
----------------------------------------------------------------------
diff --git a/portal/js/libs/Highcharts-2.3.5/js/adapters/prototype-adapter.js b/portal/js/libs/Highcharts-2.3.5/js/adapters/prototype-adapter.js
new file mode 100644
index 0000000..6441d2a
--- /dev/null
+++ b/portal/js/libs/Highcharts-2.3.5/js/adapters/prototype-adapter.js
@@ -0,0 +1,16 @@
+/*
+ Highcharts JS v2.3.5 (2012-12-19)
+ Prototype adapter
+
+ @author Michael Nelson, Torstein Hønsi.
+
+ Feel free to use and modify this script.
+ Highcharts license: www.highcharts.com/license.
+*/
+var HighchartsAdapter=function(){var g=typeof Effect!=="undefined";return{init:function(c){if(g)Effect.HighchartsTransition=Class.create(Effect.Base,{initialize:function(a,b,d,e){var f;this.element=a;this.key=b;f=a.attr?a.attr(b):$(a).getStyle(b);if(b==="d")this.paths=c.init(a,a.d,d),this.toD=d,f=0,d=1;this.start(Object.extend(e||{},{from:f,to:d,attribute:b}))},setup:function(){HighchartsAdapter._extend(this.element);if(!this.element._highchart_animation)this.element._highchart_animation={};this.element._highchart_animation[this.key]=
+this},update:function(a){var b=this.paths,d=this.element;b&&(a=c.step(b[0],b[1],a,this.toD));d.attr?d.attr(this.options.attribute,a):(b={},b[this.options.attribute]=a,$(d).setStyle(b))},finish:function(){delete this.element._highchart_animation[this.key]}})},adapterRun:function(c,a){return parseInt($(c).getStyle(a),10)},getScript:function(c,a){var b=$$("head")[0];b&&b.appendChild((new Element("script",{type:"text/javascript",src:c})).observe("load",a))},addNS:function(c){var a=/^(?:click|mouse(?:down|up|over|move|out))$/;
+return/^(?:load|unload|abort|error|select|change|submit|reset|focus|blur|resize|scroll)$/.test(c)||a.test(c)?c:"h:"+c},addEvent:function(c,a,b){c.addEventListener||c.attachEvent?Event.observe($(c),HighchartsAdapter.addNS(a),b):(HighchartsAdapter._extend(c),c._highcharts_observe(a,b))},animate:function(c,a,b){var d,b=b||{};b.delay=0;b.duration=(b.duration||500)/1E3;b.afterFinish=b.complete;if(g)for(d in a)new Effect.HighchartsTransition($(c),d,a[d],b);else{if(c.attr)for(d in a)c.attr(d,a[d]);b.complete&&
+b.complete()}c.attr||$(c).setStyle(a)},stop:function(c){var a;if(c._highcharts_extended&&c._highchart_animation)for(a in c._highchart_animation)c._highchart_animation[a].cancel()},each:function(c,a){$A(c).each(a)},inArray:function(c,a){return a.indexOf(c)},offset:function(c){return $(c).cumulativeOffset()},fireEvent:function(c,a,b,d){c.fire?c.fire(HighchartsAdapter.addNS(a),b):c._highcharts_extended&&(b=b||{},c._highcharts_fire(a,b));b&&b.defaultPrevented&&(d=null);d&&d(b)},removeEvent:function(c,
+a,b){$(c).stopObserving&&(a&&(a=HighchartsAdapter.addNS(a)),$(c).stopObserving(a,b));window===c?Event.stopObserving(c,a,b):(HighchartsAdapter._extend(c),c._highcharts_stop_observing(a,b))},washMouseEvent:function(c){return c},grep:function(c,a){return c.findAll(a)},map:function(c,a){return c.map(a)},merge:function(){function c(a,b){var d,e;for(e in b)d=b[e],a[e]=d&&typeof d==="object"&&d.constructor!==Array&&typeof d.nodeType!=="number"?c(a[e]||{},d):b[e];return a}return function(){var a=arguments,
+b,d={};for(b=0;b<a.length;b++)d=c(d,a[b]);return d}.apply(this,arguments)},_extend:function(c){c._highcharts_extended||Object.extend(c,{_highchart_events:{},_highchart_animation:null,_highcharts_extended:!0,_highcharts_observe:function(a,b){this._highchart_events[a]=[this._highchart_events[a],b].compact().flatten()},_highcharts_stop_observing:function(a,b){a?b?this._highchart_events[a]=[this._highchart_events[a]].compact().flatten().without(b):delete this._highchart_events[a]:this._highchart_events=
+{}},_highcharts_fire:function(a,b){(this._highchart_events[a]||[]).each(function(a){if(!b.stopped)b.preventDefault=function(){b.defaultPrevented=!0},a.bind(this)(b)===!1&&b.preventDefault()}.bind(this))}})}}}();

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/js/libs/Highcharts-2.3.5/js/adapters/prototype-adapter.src.js
----------------------------------------------------------------------
diff --git a/portal/js/libs/Highcharts-2.3.5/js/adapters/prototype-adapter.src.js b/portal/js/libs/Highcharts-2.3.5/js/adapters/prototype-adapter.src.js
new file mode 100644
index 0000000..1f698c5
--- /dev/null
+++ b/portal/js/libs/Highcharts-2.3.5/js/adapters/prototype-adapter.src.js
@@ -0,0 +1,385 @@
+/**
+ * @license Highcharts JS v2.3.5 (2012-12-19)
+ * Prototype adapter
+ *
+ * @author Michael Nelson, Torstein Hønsi.
+ *
+ * Feel free to use and modify this script.
+ * Highcharts license: www.highcharts.com/license.
+ */
+
+// JSLint options:
+/*global Effect, Class, Event, Element, $, $$, $A */
+
+// Adapter interface between prototype and the Highcharts charting library
+var HighchartsAdapter = (function () {
+
+var hasEffect = typeof Effect !== 'undefined';
+
+return {
+
+	/**
+	 * Initialize the adapter. This is run once as Highcharts is first run.
+	 * @param {Object} pathAnim The helper object to do animations across adapters.
+	 */
+	init: function (pathAnim) {
+		if (hasEffect) {
+			/**
+			 * Animation for Highcharts SVG element wrappers only
+			 * @param {Object} element
+			 * @param {Object} attribute
+			 * @param {Object} to
+			 * @param {Object} options
+			 */
+			Effect.HighchartsTransition = Class.create(Effect.Base, {
+				initialize: function (element, attr, to, options) {
+					var from,
+						opts;
+
+					this.element = element;
+					this.key = attr;
+					from = element.attr ? element.attr(attr) : $(element).getStyle(attr);
+
+					// special treatment for paths
+					if (attr === 'd') {
+						this.paths = pathAnim.init(
+							element,
+							element.d,
+							to
+						);
+						this.toD = to;
+
+
+						// fake values in order to read relative position as a float in update
+						from = 0;
+						to = 1;
+					}
+
+					opts = Object.extend((options || {}), {
+						from: from,
+						to: to,
+						attribute: attr
+					});
+					this.start(opts);
+				},
+				setup: function () {
+					HighchartsAdapter._extend(this.element);
+					// If this is the first animation on this object, create the _highcharts_animation helper that
+					// contain pointers to the animation objects.
+					if (!this.element._highchart_animation) {
+						this.element._highchart_animation = {};
+					}
+
+					// Store a reference to this animation instance.
+					this.element._highchart_animation[this.key] = this;
+				},
+				update: function (position) {
+					var paths = this.paths,
+						element = this.element,
+						obj;
+
+					if (paths) {
+						position = pathAnim.step(paths[0], paths[1], position, this.toD);
+					}
+
+					if (element.attr) { // SVGElement
+						element.attr(this.options.attribute, position);
+					
+					} else { // HTML, #409
+						obj = {};
+						obj[this.options.attribute] = position;
+						$(element).setStyle(obj);
+					}
+					
+				},
+				finish: function () {
+					// Delete the property that holds this animation now that it is finished.
+					// Both canceled animations and complete ones gets a 'finish' call.
+					delete this.element._highchart_animation[this.key];
+				}
+			});
+		}
+	},
+	
+	/**
+	 * Run a general method on the framework, following jQuery syntax
+	 * @param {Object} el The HTML element
+	 * @param {String} method Which method to run on the wrapped element
+	 */
+	adapterRun: function (el, method) {
+		
+		// This currently works for getting inner width and height. If adding
+		// more methods later, we need a conditional implementation for each.
+		return parseInt($(el).getStyle(method), 10);
+		
+	},
+
+	/**
+	 * Downloads a script and executes a callback when done.
+	 * @param {String} scriptLocation
+	 * @param {Function} callback
+	 */
+	getScript: function (scriptLocation, callback) {
+		var head = $$('head')[0]; // Returns an array, so pick the first element.
+		if (head) {
+			// Append a new 'script' element, set its type and src attributes, add a 'load' handler that calls the callback
+			head.appendChild(new Element('script', { type: 'text/javascript', src: scriptLocation}).observe('load', callback));
+		}
+	},
+
+	/**
+	 * Custom events in prototype needs to be namespaced. This method adds a namespace 'h:' in front of
+	 * events that are not recognized as native.
+	 */
+	addNS: function (eventName) {
+		var HTMLEvents = /^(?:load|unload|abort|error|select|change|submit|reset|focus|blur|resize|scroll)$/,
+			MouseEvents = /^(?:click|mouse(?:down|up|over|move|out))$/;
+		return (HTMLEvents.test(eventName) || MouseEvents.test(eventName)) ?
+			eventName :
+			'h:' + eventName;
+	},
+
+	// el needs an event to be attached. el is not necessarily a dom element
+	addEvent: function (el, event, fn) {
+		if (el.addEventListener || el.attachEvent) {
+			Event.observe($(el), HighchartsAdapter.addNS(event), fn);
+
+		} else {
+			HighchartsAdapter._extend(el);
+			el._highcharts_observe(event, fn);
+		}
+	},
+
+	// motion makes things pretty. use it if effects is loaded, if not... still get to the end result.
+	animate: function (el, params, options) {
+		var key,
+			fx;
+
+		// default options
+		options = options || {};
+		options.delay = 0;
+		options.duration = (options.duration || 500) / 1000;
+		options.afterFinish = options.complete;
+
+		// animate wrappers and DOM elements
+		if (hasEffect) {
+			for (key in params) {
+				// The fx variable is seemingly thrown away here, but the Effect.setup will add itself to the _highcharts_animation object
+				// on the element itself so its not really lost.
+				fx = new Effect.HighchartsTransition($(el), key, params[key], options);
+			}
+		} else {
+			if (el.attr) { // #409 without effects
+				for (key in params) {
+					el.attr(key, params[key]);
+				}
+			}
+			if (options.complete) {
+				options.complete();
+			}
+		}
+
+		if (!el.attr) { // HTML element, #409
+			$(el).setStyle(params);
+		}
+	},
+
+	// this only occurs in higcharts 2.0+
+	stop: function (el) {
+		var key;
+		if (el._highcharts_extended && el._highchart_animation) {
+			for (key in el._highchart_animation) {
+				// Cancel the animation
+				// The 'finish' function in the Effect object will remove the reference
+				el._highchart_animation[key].cancel();
+			}
+		}
+	},
+
+	// um.. each
+	each: function (arr, fn) {
+		$A(arr).each(fn);
+	},
+	
+	inArray: function (item, arr) {
+		return arr.indexOf(item);
+	},
+
+	/**
+	 * Get the cumulative offset relative to the top left of the page. This method, unlike its
+	 * jQuery and MooTools counterpart, still suffers from issue #208 regarding the position
+	 * of a chart within a fixed container.
+	 */
+	offset: function (el) {
+		return $(el).cumulativeOffset();
+	},
+
+	// fire an event based on an event name (event) and an object (el).
+	// again, el may not be a dom element
+	fireEvent: function (el, event, eventArguments, defaultFunction) {
+		if (el.fire) {
+			el.fire(HighchartsAdapter.addNS(event), eventArguments);
+		} else if (el._highcharts_extended) {
+			eventArguments = eventArguments || {};
+			el._highcharts_fire(event, eventArguments);
+		}
+
+		if (eventArguments && eventArguments.defaultPrevented) {
+			defaultFunction = null;
+		}
+
+		if (defaultFunction) {
+			defaultFunction(eventArguments);
+		}
+	},
+
+	removeEvent: function (el, event, handler) {
+		if ($(el).stopObserving) {
+			if (event) {
+				event = HighchartsAdapter.addNS(event);
+			}
+			$(el).stopObserving(event, handler);
+		} if (window === el) {
+			Event.stopObserving(el, event, handler);
+		} else {
+			HighchartsAdapter._extend(el);
+			el._highcharts_stop_observing(event, handler);
+		}
+	},
+	
+	washMouseEvent: function (e) {
+		return e;
+	},
+
+	// um, grep
+	grep: function (arr, fn) {
+		return arr.findAll(fn);
+	},
+
+	// um, map
+	map: function (arr, fn) {
+		return arr.map(fn);
+	},
+
+	// deep merge. merge({a : 'a', b : {b1 : 'b1', b2 : 'b2'}}, {b : {b2 : 'b2_prime'}, c : 'c'}) => {a : 'a', b : {b1 : 'b1', b2 : 'b2_prime'}, c : 'c'}
+	/*merge: function(){
+		function doCopy(copy, original) {
+			var value,
+				key,
+				undef,
+				nil,
+				same,
+				obj,
+				arr,
+				node;
+
+			for (key in original) {
+				value = original[key];
+				undef = typeof(value) === 'undefined';
+				nil = value === null;
+				same = original === copy[key];
+
+				if (undef || nil || same) {
+					continue;
+				}
+
+				obj = typeof(value) === 'object';
+				arr = value && obj && value.constructor == Array;
+				node = !!value.nodeType;
+
+				if (obj && !arr && !node) {
+					copy[key] = doCopy(typeof copy[key] == 'object' ? copy[key] : {}, value);
+				}
+				else {
+					copy[key] = original[key];
+				}
+			}
+			return copy;
+		}
+
+		var args = arguments, retVal = {};
+
+		for (var i = 0; i < args.length; i++) {
+			retVal = doCopy(retVal, args[i]);
+		}
+
+		return retVal;
+	},*/
+	merge: function () { // the built-in prototype merge function doesn't do deep copy
+		function doCopy(copy, original) {
+			var value, key;
+
+			for (key in original) {
+				value = original[key];
+				if (value && typeof value === 'object' && value.constructor !== Array &&
+						typeof value.nodeType !== 'number') {
+					copy[key] = doCopy(copy[key] || {}, value); // copy
+
+				} else {
+					copy[key] = original[key];
+				}
+			}
+			return copy;
+		}
+
+		function merge() {
+			var args = arguments,
+				i,
+				retVal = {};
+
+			for (i = 0; i < args.length; i++) {
+				retVal = doCopy(retVal, args[i]);
+
+			}
+			return retVal;
+		}
+
+		return merge.apply(this, arguments);
+	},
+
+	// extend an object to handle highchart events (highchart objects, not svg elements).
+	// this is a very simple way of handling events but whatever, it works (i think)
+	_extend: function (object) {
+		if (!object._highcharts_extended) {
+			Object.extend(object, {
+				_highchart_events: {},
+				_highchart_animation: null,
+				_highcharts_extended: true,
+				_highcharts_observe: function (name, fn) {
+					this._highchart_events[name] = [this._highchart_events[name], fn].compact().flatten();
+				},
+				_highcharts_stop_observing: function (name, fn) {
+					if (name) {
+						if (fn) {
+							this._highchart_events[name] = [this._highchart_events[name]].compact().flatten().without(fn);
+						} else {
+							delete this._highchart_events[name];
+						}
+					} else {
+						this._highchart_events = {};
+					}
+				},
+				_highcharts_fire: function (name, args) {
+					(this._highchart_events[name] || []).each(function (fn) {
+						// args is never null here
+						if (args.stopped) {
+							return; // "throw $break" wasn't working. i think because of the scope of 'this'.
+						}
+
+						// Attach a simple preventDefault function to skip default handler if called
+						args.preventDefault = function () {
+							args.defaultPrevented = true;
+						};
+
+						// If the event handler return false, prevent the default handler from executing
+						if (fn.bind(this)(args) === false) {
+							args.preventDefault();
+						}
+					}
+.bind(this));
+				}
+			});
+		}
+	}
+};
+}());

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/js/libs/Highcharts-2.3.5/js/highcharts-more.js
----------------------------------------------------------------------
diff --git a/portal/js/libs/Highcharts-2.3.5/js/highcharts-more.js b/portal/js/libs/Highcharts-2.3.5/js/highcharts-more.js
new file mode 100644
index 0000000..cc23e4c
--- /dev/null
+++ b/portal/js/libs/Highcharts-2.3.5/js/highcharts-more.js
@@ -0,0 +1,35 @@
+/*
+ Highcharts JS v2.3.5 (2012-12-19)
+
+ (c) 2009-2011 Torstein Hønsi
+
+ License: www.highcharts.com/license
+*/
+(function(i,v){function A(a,b,c){this.init.call(this,a,b,c)}function B(a,b,c){a.call(this,b,c);if(this.chart.polar)this.closeSegment=function(a){var b=this.xAxis.center;a.push("L",b[0],b[1])},this.closedStacks=!0}function C(a,b){var c=this.chart,d=this.options.animation,g=this.group,f=this.markerGroup,e=this.xAxis.center,h=c.plotLeft,m=c.plotTop;if(c.polar){if(c.renderer.isSVG)if(d===!0&&(d={}),b){if(g.attrSetters.scaleX=g.attrSetters.scaleY=function(a,b){this[b]=a;this.scaleX!==v&&this.scaleY!==
+v&&this.element.setAttribute("transform","translate("+this.translateX+","+this.translateY+") scale("+this.scaleX+","+this.scaleY+")");return!1},c={translateX:e[0]+h,translateY:e[1]+m,scaleX:0,scaleY:0},g.attr(c),f)f.attrSetters=g.attrSetters,f.attr(c)}else c={translateX:h,translateY:m,scaleX:1,scaleY:1},g.animate(c,d),f&&f.animate(c,d),this.animate=null}else a.call(this,b)}var q=i.each,w=i.extend,p=i.merge,G=i.map,o=i.pick,x=i.pInt,n=i.getOptions().plotOptions,j=i.seriesTypes,D=i.extendClass,E=i.splat,
+l=i.wrap,s=i.Axis,H=i.Tick,z=i.Series,r=j.column.prototype,t=function(){};w(A.prototype,{init:function(a,b,c){var d=this,g=d.defaultOptions;d.chart=b;if(b.angular)g.background={};d.options=a=p(g,a);(a=a.background)&&q([].concat(E(a)).reverse(),function(a){var b=a.backgroundColor,a=p(d.defaultBackgroundOptions,a);if(b)a.backgroundColor=b;a.color=a.backgroundColor;c.options.plotBands.unshift(a)})},defaultOptions:{center:["50%","50%"],size:"85%",startAngle:0},defaultBackgroundOptions:{shape:"circle",
+borderWidth:1,borderColor:"silver",backgroundColor:{linearGradient:{x1:0,y1:0,x2:0,y2:1},stops:[[0,"#FFF"],[1,"#DDD"]]},from:Number.MIN_VALUE,innerRadius:0,to:Number.MAX_VALUE,outerRadius:"105%"}});var y=s.prototype,s=H.prototype,I={getOffset:t,redraw:function(){this.isDirty=!1},render:function(){this.isDirty=!1},setScale:t,setCategories:t,setTitle:t},F={isRadial:!0,defaultRadialGaugeOptions:{labels:{align:"center",x:0,y:null},minorGridLineWidth:0,minorTickInterval:"auto",minorTickLength:10,minorTickPosition:"inside",
+minorTickWidth:1,plotBands:[],tickLength:10,tickPosition:"inside",tickWidth:2,title:{rotation:0},zIndex:2},defaultRadialXOptions:{gridLineWidth:1,labels:{align:null,distance:15,x:0,y:null},maxPadding:0,minPadding:0,plotBands:[],showLastLabel:!1,tickLength:0},defaultRadialYOptions:{gridLineInterpolation:"circle",labels:{align:"right",x:-3,y:-2},plotBands:[],showLastLabel:!1,title:{x:4,text:null,rotation:90}},setOptions:function(a){this.options=p(this.defaultOptions,this.defaultRadialOptions,a)},getOffset:function(){y.getOffset.call(this);
+this.chart.axisOffset[this.side]=0;this.center=this.pane.center=j.pie.prototype.getCenter.call(this.pane)},getLinePath:function(a,b){var c=this.center,b=o(b,c[2]/2-this.offset);return this.chart.renderer.symbols.arc(this.left+c[0],this.top+c[1],b,b,{start:this.startAngleRad,end:this.endAngleRad,open:!0,innerR:0})},setAxisTranslation:function(){y.setAxisTranslation.call(this);if(this.center&&(this.transA=this.isCircular?(this.endAngleRad-this.startAngleRad)/(this.max-this.min||1):this.center[2]/2/
+(this.max-this.min||1),this.isXAxis))this.minPixelPadding=this.transA*this.minPointOffset+(this.reversed?(this.endAngleRad-this.startAngleRad)/4:0)},beforeSetTickPositions:function(){this.autoConnect&&(this.max+=this.categories&&1||this.pointRange||this.closestPointRange)},setAxisSize:function(){y.setAxisSize.call(this);if(this.center)this.len=this.width=this.height=this.isCircular?this.center[2]*(this.endAngleRad-this.startAngleRad)/2:this.center[2]/2},getPosition:function(a,b){if(!this.isCircular)b=
+this.translate(a),a=this.min;return this.postTranslate(this.translate(a),o(b,this.center[2]/2)-this.offset)},postTranslate:function(a,b){var c=this.chart,d=this.center,a=this.startAngleRad+a;return{x:c.plotLeft+d[0]+Math.cos(a)*b,y:c.plotTop+d[1]+Math.sin(a)*b}},getPlotBandPath:function(a,b,c){var d=this.center,g=this.startAngleRad,f=d[2]/2,e=[o(c.outerRadius,"100%"),c.innerRadius,o(c.thickness,10)],h=/%$/,m,k=this.isCircular;this.options.gridLineInterpolation==="polygon"?d=this.getPlotLinePath(a).concat(this.getPlotLinePath(b,
+!0)):(k||(e[0]=this.translate(a),e[1]=this.translate(b)),e=G(e,function(a){h.test(a)&&(a=x(a,10)*f/100);return a}),c.shape==="circle"||!k?(a=-Math.PI/2,b=Math.PI*1.5,m=!0):(a=g+this.translate(a),b=g+this.translate(b)),d=this.chart.renderer.symbols.arc(this.left+d[0],this.top+d[1],e[0],e[0],{start:a,end:b,innerR:o(e[1],e[0]-e[2]),open:m}));return d},getPlotLinePath:function(a,b){var c=this.center,d=this.chart,g=this.getPosition(a),f,e,h;this.isCircular?h=["M",c[0]+d.plotLeft,c[1]+d.plotTop,"L",g.x,
+g.y]:this.options.gridLineInterpolation==="circle"?(a=this.translate(a))&&(h=this.getLinePath(0,a)):(f=d.xAxis[0],h=[],a=this.translate(a),c=f.tickPositions,f.autoConnect&&(c=c.concat([c[0]])),b&&(c=[].concat(c).reverse()),q(c,function(b,c){e=f.getPosition(b,a);h.push(c?"L":"M",e.x,e.y)}));return h},getTitlePosition:function(){var a=this.center,b=this.chart,c=this.options.title;return{x:b.plotLeft+a[0]+(c.x||0),y:b.plotTop+a[1]-{high:0.5,middle:0.25,low:0}[c.align]*a[2]+(c.y||0)}}};l(y,"init",function(a,
+b,c){var d=b.angular,g=b.polar,f=c.isX,e=d&&f,h,m;m=b.options;var k=c.pane||0;if(d){if(w(this,e?I:F),h=!f)this.defaultRadialOptions=this.defaultRadialGaugeOptions}else if(g)w(this,F),this.defaultRadialOptions=(h=f)?this.defaultRadialXOptions:p(this.defaultYAxisOptions,this.defaultRadialYOptions);a.call(this,b,c);if(!e&&(d||g)){a=this.options;if(!b.panes)b.panes=[];this.pane=b.panes[k]=k=new A(E(m.pane)[k],b,this);k=k.options;b.inverted=!1;m.chart.zoomType=null;this.startAngleRad=b=(k.startAngle-90)*
+Math.PI/180;this.endAngleRad=m=(o(k.endAngle,k.startAngle+360)-90)*Math.PI/180;this.offset=a.offset||0;if((this.isCircular=h)&&c.max===v&&m-b===2*Math.PI)this.autoConnect=!0}});l(s,"getPosition",function(a,b,c,d,g){var f=this.axis;return f.getPosition?f.getPosition(c):a.call(this,b,c,d,g)});l(s,"getLabelPosition",function(a,b,c,d,g,f,e,h,m){var k=this.axis,i=f.y,j=f.align,l=(k.translate(this.pos)+k.startAngleRad+Math.PI/2)/Math.PI*180;k.isRadial?(a=k.getPosition(this.pos,k.center[2]/2+o(f.distance,
+-25)),f.rotation==="auto"?d.attr({rotation:l}):i===null&&(i=x(d.styles.lineHeight)*0.9-d.getBBox().height/2),j===null&&(j=k.isCircular?l>20&&l<160?"left":l>200&&l<340?"right":"center":"center",d.attr({align:j})),a.x+=f.x,a.y+=i):a=a.call(this,b,c,d,g,f,e,h,m);return a});l(s,"getMarkPath",function(a,b,c,d,g,f,e){var h=this.axis;h.isRadial?(a=h.getPosition(this.pos,h.center[2]/2+d),b=["M",b,c,"L",a.x,a.y]):b=a.call(this,b,c,d,g,f,e);return b});n.arearange=p(n.area,{lineWidth:1,marker:null,threshold:null,
+tooltip:{pointFormat:'<span style="color:{series.color}">{series.name}</span>: <b>{point.low}</b> - <b>{point.high}</b><br/>'},trackByArea:!0,dataLabels:{verticalAlign:null,xLow:0,xHigh:0,yLow:0,yHigh:0},shadow:!1});s=i.extendClass(i.Point,{applyOptions:function(a,b){var c=this.series,d=c.pointArrayMap,g=0,f=0,e=d.length;if(typeof a==="object"&&typeof a.length!=="number")w(this,a),this.options=a;else if(a.length){if(a.length>e){if(typeof a[0]==="string")this.name=a[0];else if(typeof a[0]==="number")this.x=
+a[0];g++}for(;f<e;)this[d[f++]]=a[g++]}this.y=this[c.pointValKey];if(this.x===v&&c)this.x=b===v?c.autoIncrement():b;return this},toYData:function(){return[this.low,this.high]}});j.arearange=i.extendClass(j.area,{type:"arearange",pointArrayMap:["low","high"],pointClass:s,pointValKey:"low",translate:function(){var a=this.yAxis;j.area.prototype.translate.apply(this);q(this.points,function(b){if(b.y!==null)b.plotLow=b.plotY,b.plotHigh=a.translate(b.high,0,1,0,1)})},getSegmentPath:function(a){var b=[],
+c=a.length,d=z.prototype.getSegmentPath,g,f;f=this.options;for(var e=f.step;c--;)g=a[c],b.push({plotX:g.plotX,plotY:g.plotHigh});a=d.call(this,a);if(e)e===!0&&(e="left"),f.step={left:"right",center:"center",right:"left"}[e];b=d.call(this,b);f.step=e;f=[].concat(a,b);b[0]="L";this.areaPath=this.areaPath.concat(a,b);return f},drawDataLabels:function(){var a=this.data,b=a.length,c,d=[],g=z.prototype,f=this.options.dataLabels,e,h=this.chart.inverted;if(f.enabled||this._hasPointLabels){for(c=b;c--;)e=
+a[c],e.y=e.high,e.plotY=e.plotHigh,d[c]=e.dataLabel,e.dataLabel=e.dataLabelUpper,e.below=!1,h?(f.align="left",f.x=f.xHigh):f.y=f.yHigh;g.drawDataLabels.apply(this,arguments);for(c=b;c--;)e=a[c],e.dataLabelUpper=e.dataLabel,e.dataLabel=d[c],e.y=e.low,e.plotY=e.plotLow,e.below=!0,h?(f.align="right",f.x=f.xLow):f.y=f.yLow;g.drawDataLabels.apply(this,arguments)}},alignDataLabel:j.column.prototype.alignDataLabel,getSymbol:j.column.prototype.getSymbol,drawPoints:t});n.areasplinerange=p(n.arearange);j.areasplinerange=
+D(j.arearange,{type:"areasplinerange",getPointSpline:j.spline.prototype.getPointSpline});n.columnrange=p(n.column,n.arearange,{lineWidth:1,pointRange:null});j.columnrange=D(j.arearange,{type:"columnrange",translate:function(){var a=this.yAxis,b;r.translate.apply(this);q(this.points,function(c){var d=c.shapeArgs;c.plotHigh=b=a.translate(c.high,0,1,0,1);c.plotLow=c.plotY;d.y=b;d.height=c.plotY-b;c.trackerArgs=d})},drawGraph:t,pointAttrToOptions:r.pointAttrToOptions,drawPoints:r.drawPoints,drawTracker:r.drawTracker,
+animate:r.animate});n.gauge=p(n.line,{dataLabels:{enabled:!0,y:15,borderWidth:1,borderColor:"silver",borderRadius:3,style:{fontWeight:"bold"},verticalAlign:"top",zIndex:2},dial:{},pivot:{},tooltip:{headerFormat:""},showInLegend:!1});n={type:"gauge",pointClass:i.extendClass(i.Point,{setState:function(a){this.state=a}}),angular:!0,translate:function(){var a=this,b=a.yAxis,c=b.center;a.generatePoints();q(a.points,function(d){var g=p(a.options.dial,d.dial),f=x(o(g.radius,80))*c[2]/200,e=x(o(g.baseLength,
+70))*f/100,h=x(o(g.rearLength,10))*f/100,m=g.baseWidth||3,k=g.topWidth||1;d.shapeType="path";d.shapeArgs={d:g.path||["M",-h,-m/2,"L",e,-m/2,f,-k/2,f,k/2,e,m/2,-h,m/2,"z"],translateX:c[0],translateY:c[1],rotation:(b.startAngleRad+b.translate(d.y,null,null,null,!0))*180/Math.PI};d.plotX=c[0];d.plotY=c[1]})},drawPoints:function(){var a=this,b=a.yAxis.center,c=a.pivot,d=a.options,g=d.pivot,f=a.chart.renderer;q(a.points,function(b){var c=b.graphic,g=b.shapeArgs,k=g.d,i=p(d.dial,b.dial);c?(c.animate(g),
+g.d=k):b.graphic=f[b.shapeType](g).attr({stroke:i.borderColor||"none","stroke-width":i.borderWidth||0,fill:i.backgroundColor||"black",rotation:g.rotation}).add(a.group)});c?c.animate({translateX:b[0],translateY:b[1]}):a.pivot=f.circle(0,0,o(g.radius,5)).attr({"stroke-width":g.borderWidth||0,stroke:g.borderColor||"silver",fill:g.backgroundColor||"black"}).translate(b[0],b[1]).add(a.group)},animate:function(){var a=this;q(a.points,function(b){var c=b.graphic;c&&(c.attr({rotation:a.yAxis.startAngleRad*
+180/Math.PI}),c.animate({rotation:b.shapeArgs.rotation},a.options.animation))});a.animate=null},render:function(){this.group=this.plotGroup("group","series",this.visible?"visible":"hidden",this.options.zIndex,this.chart.seriesGroup);j.pie.prototype.render.call(this);this.group.clip(this.chart.clipRect)},setData:j.pie.prototype.setData,drawTracker:j.column.prototype.drawTracker};j.gauge=i.extendClass(j.line,n);var u=z.prototype,n=i.MouseTracker.prototype;u.toXY=function(a){var b,c=this.chart;b=a.plotX;
+var d=a.plotY;a.rectPlotX=b;a.rectPlotY=d;a.deg=b/Math.PI*180;b=this.xAxis.postTranslate(a.plotX,this.yAxis.len-d);a.plotX=a.polarPlotX=b.x-c.plotLeft;a.plotY=a.polarPlotY=b.y-c.plotTop};l(j.area.prototype,"init",B);l(j.areaspline.prototype,"init",B);l(j.spline.prototype,"getPointSpline",function(a,b,c,d){var g,f,e,h,i,k,j;if(this.chart.polar){g=c.plotX;f=c.plotY;a=b[d-1];e=b[d+1];this.connectEnds&&(a||(a=b[b.length-2]),e||(e=b[1]));if(a&&e)h=a.plotX,i=a.plotY,b=e.plotX,k=e.plotY,h=(1.5*g+h)/2.5,
+i=(1.5*f+i)/2.5,e=(1.5*g+b)/2.5,j=(1.5*f+k)/2.5,b=Math.sqrt(Math.pow(h-g,2)+Math.pow(i-f,2)),k=Math.sqrt(Math.pow(e-g,2)+Math.pow(j-f,2)),h=Math.atan2(i-f,h-g),i=Math.atan2(j-f,e-g),j=Math.PI/2+(h+i)/2,Math.abs(h-j)>Math.PI/2&&(j-=Math.PI),h=g+Math.cos(j)*b,i=f+Math.sin(j)*b,e=g+Math.cos(Math.PI+j)*k,j=f+Math.sin(Math.PI+j)*k,c.rightContX=e,c.rightContY=j;d?(c=["C",a.rightContX||a.plotX,a.rightContY||a.plotY,h||g,i||f,g,f],a.rightContX=a.rightContY=null):c=["M",g,f]}else c=a.call(this,b,c,d);return c});
+l(u,"translate",function(a){a.call(this);if(this.chart.polar&&!this.preventPostTranslate)for(var a=this.points,b=a.length;b--;)this.toXY(a[b])});l(u,"getSegmentPath",function(a,b){var c=this.points;if(this.chart.polar&&this.options.connectEnds!==!1&&b[b.length-1]===c[c.length-1]&&c[0].y!==null)this.connectEnds=!0,b=[].concat(b,[c[0]]);return a.call(this,b)});l(u,"animate",C);l(r,"animate",C);l(u,"setTooltipPoints",function(a,b){this.chart.polar&&w(this.xAxis,{tooltipLen:360,tooltipPosName:"deg"});
+return a.call(this,b)});l(r,"translate",function(a){var b=this.xAxis,c=this.yAxis.len,d=b.center,g=b.startAngleRad,f=this.chart.renderer,e,h;this.preventPostTranslate=!0;a.call(this);if(b.isRadial){b=this.points;for(h=b.length;h--;)e=b[h],a=e.barX+g,e.shapeType="path",e.shapeArgs={d:f.symbols.arc(d[0],d[1],c-e.plotY,null,{start:a,end:a+e.pointWidth,innerR:c-o(e.yBottom,c)})},this.toXY(e)}});l(r,"alignDataLabel",function(a,b,c,d,g,f){if(this.chart.polar){a=b.rectPlotX/Math.PI*180;if(d.align===null)d.align=
+a>20&&a<160?"left":a>200&&a<340?"right":"center";if(d.verticalAlign===null)d.verticalAlign=a<45||a>315?"bottom":a>135&&a<225?"top":"middle";u.alignDataLabel.call(this,b,c,d,g,f)}else a.call(this,b,c,d,g,f)});l(n,"getIndex",function(a,b){var c,d=this.chart,g;d.polar?(g=d.xAxis[0].center,c=b.chartX-g[0]-d.plotLeft,d=b.chartY-g[1]-d.plotTop,c=180-Math.round(Math.atan2(c,d)/Math.PI*180)):c=a.call(this,b);return c});l(n,"getMouseCoordinates",function(a,b){var c=this.chart,d={xAxis:[],yAxis:[]};c.polar?
+q(c.axes,function(a){var f=a.isXAxis,e=a.center,h=b.chartX-e[0]-c.plotLeft,e=b.chartY-e[1]-c.plotTop;d[f?"xAxis":"yAxis"].push({axis:a,value:a.translate(f?Math.PI-Math.atan2(h,e):Math.sqrt(Math.pow(h,2)+Math.pow(e,2)),!0)})}):d=a.call(this,b);return d})})(Highcharts);

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/js/libs/Highcharts-2.3.5/js/highcharts-more.src.js
----------------------------------------------------------------------
diff --git a/portal/js/libs/Highcharts-2.3.5/js/highcharts-more.src.js b/portal/js/libs/Highcharts-2.3.5/js/highcharts-more.src.js
new file mode 100644
index 0000000..d75102c
--- /dev/null
+++ b/portal/js/libs/Highcharts-2.3.5/js/highcharts-more.src.js
@@ -0,0 +1,1581 @@
+// ==ClosureCompiler==
+// @compilation_level SIMPLE_OPTIMIZATIONS
+
+/**
+ * @license Highcharts JS v2.3.5 (2012-12-19)
+ *
+ * (c) 2009-2011 Torstein Hønsi
+ *
+ * License: www.highcharts.com/license
+ */
+
+// JSLint options:
+/*global Highcharts, document, window, navigator, setInterval, clearInterval, clearTimeout, setTimeout, location, jQuery, $, console */
+
+(function (Highcharts, UNDEFINED) {
+var each = Highcharts.each,
+	extend = Highcharts.extend,
+	merge = Highcharts.merge,
+	map = Highcharts.map,
+	pick = Highcharts.pick,
+	pInt = Highcharts.pInt,
+	defaultPlotOptions = Highcharts.getOptions().plotOptions,
+	seriesTypes = Highcharts.seriesTypes,
+	extendClass = Highcharts.extendClass,
+	splat = Highcharts.splat,
+	wrap = Highcharts.wrap,
+	Axis = Highcharts.Axis,
+	Tick = Highcharts.Tick,
+	Series = Highcharts.Series,
+	colProto = seriesTypes.column.prototype,
+	noop = function () {};/**
+ * The Pane object allows options that are common to a set of X and Y axes.
+ * 
+ * In the future, this can be extended to basic Highcharts and Highstock.
+ */
+function Pane(options, chart, firstAxis) {
+	this.init.call(this, options, chart, firstAxis);
+}
+
+// Extend the Pane prototype
+extend(Pane.prototype, {
+	
+	/**
+	 * Initiate the Pane object
+	 */
+	init: function (options, chart, firstAxis) {
+		var pane = this,
+			backgroundOption,
+			defaultOptions = pane.defaultOptions;
+		
+		pane.chart = chart;
+		
+		// Set options
+		if (chart.angular) { // gauges
+			defaultOptions.background = {}; // gets extended by this.defaultBackgroundOptions
+		}
+		pane.options = options = merge(defaultOptions, options);
+		
+		backgroundOption = options.background;
+		
+		// To avoid having weighty logic to place, update and remove the backgrounds,
+		// push them to the first axis' plot bands and borrow the existing logic there.
+		if (backgroundOption) {
+			each([].concat(splat(backgroundOption)).reverse(), function (config) {
+				var backgroundColor = config.backgroundColor; // if defined, replace the old one (specific for gradients)
+				config = merge(pane.defaultBackgroundOptions, config);
+				if (backgroundColor) {
+					config.backgroundColor = backgroundColor;
+				}
+				config.color = config.backgroundColor; // due to naming in plotBands
+				firstAxis.options.plotBands.unshift(config);
+			});
+		}
+	},
+	
+	/**
+	 * The default options object
+	 */
+	defaultOptions: {
+		// background: {conditional},
+		center: ['50%', '50%'],
+		size: '85%',
+		startAngle: 0
+		//endAngle: startAngle + 360
+	},	
+	
+	/**
+	 * The default background options
+	 */
+	defaultBackgroundOptions: {
+		shape: 'circle',
+		borderWidth: 1,
+		borderColor: 'silver',
+		backgroundColor: {
+			linearGradient: { x1: 0, y1: 0, x2: 0, y2: 1 },
+			stops: [
+				[0, '#FFF'],
+				[1, '#DDD']
+			]
+		},
+		from: Number.MIN_VALUE, // corrected to axis min
+		innerRadius: 0,
+		to: Number.MAX_VALUE, // corrected to axis max
+		outerRadius: '105%'
+	}
+	
+});
+var axisProto = Axis.prototype,
+	tickProto = Tick.prototype;
+	
+/**
+ * Augmented methods for the x axis in order to hide it completely, used for the X axis in gauges
+ */
+var hiddenAxisMixin = {
+	getOffset: noop,
+	redraw: function () {
+		this.isDirty = false; // prevent setting Y axis dirty
+	},
+	render: function () {
+		this.isDirty = false; // prevent setting Y axis dirty
+	},
+	setScale: noop,
+	setCategories: noop,
+	setTitle: noop
+};
+
+/**
+ * Augmented methods for the value axis
+ */
+/*jslint unparam: true*/
+var radialAxisMixin = {
+	isRadial: true,
+	
+	/**
+	 * The default options extend defaultYAxisOptions
+	 */
+	defaultRadialGaugeOptions: {
+		labels: {
+			align: 'center',
+			x: 0,
+			y: null // auto
+		},
+		minorGridLineWidth: 0,
+		minorTickInterval: 'auto',
+		minorTickLength: 10,
+		minorTickPosition: 'inside',
+		minorTickWidth: 1,
+		plotBands: [],
+		tickLength: 10,
+		tickPosition: 'inside',
+		tickWidth: 2,
+		title: {
+			rotation: 0
+		},
+		zIndex: 2 // behind dials, points in the series group
+	},
+	
+	// Circular axis around the perimeter of a polar chart
+	defaultRadialXOptions: {
+		gridLineWidth: 1, // spokes
+		labels: {
+			align: null, // auto
+			distance: 15,
+			x: 0,
+			y: null // auto
+		},
+		maxPadding: 0,
+		minPadding: 0,
+		plotBands: [],
+		showLastLabel: false, 
+		tickLength: 0
+	},
+	
+	// Radial axis, like a spoke in a polar chart
+	defaultRadialYOptions: {
+		gridLineInterpolation: 'circle',
+		labels: {
+			align: 'right',
+			x: -3,
+			y: -2
+		},
+		plotBands: [],
+		showLastLabel: false,
+		title: {
+			x: 4,
+			text: null,
+			rotation: 90
+		}
+	},
+	
+	/**
+	 * Merge and set options
+	 */
+	setOptions: function (userOptions) {
+		
+		this.options = merge(
+			this.defaultOptions,
+			this.defaultRadialOptions,
+			userOptions
+		);
+		
+	},
+	
+	/**
+	 * Wrap the getOffset method to return zero offset for title or labels in a radial 
+	 * axis
+	 */
+	getOffset: function () {
+		// Call the Axis prototype method (the method we're in now is on the instance)
+		axisProto.getOffset.call(this);
+		
+		// Title or label offsets are not counted
+		this.chart.axisOffset[this.side] = 0;
+		
+		// Set the center array
+		this.center = this.pane.center = seriesTypes.pie.prototype.getCenter.call(this.pane);
+	},
+
+
+	/**
+	 * Get the path for the axis line. This method is also referenced in the getPlotLinePath
+	 * method.
+	 */
+	getLinePath: function (lineWidth, radius) {
+		var center = this.center;
+		radius = pick(radius, center[2] / 2 - this.offset);
+		
+		return this.chart.renderer.symbols.arc(
+			this.left + center[0],
+			this.top + center[1],
+			radius,
+			radius, 
+			{
+				start: this.startAngleRad,
+				end: this.endAngleRad,
+				open: true,
+				innerR: 0
+			}
+		);
+	},
+
+	/**
+	 * Override setAxisTranslation by setting the translation to the difference
+	 * in rotation. This allows the translate method to return angle for 
+	 * any given value.
+	 */
+	setAxisTranslation: function () {
+		
+		// Call uber method		
+		axisProto.setAxisTranslation.call(this);
+			
+		// Set transA and minPixelPadding
+		if (this.center) { // it's not defined the first time
+			if (this.isCircular) {
+				
+				this.transA = (this.endAngleRad - this.startAngleRad) / 
+					((this.max - this.min) || 1);
+					
+				
+			} else { 
+				this.transA = (this.center[2] / 2) / ((this.max - this.min) || 1);
+			}
+			
+			if (this.isXAxis) {
+				this.minPixelPadding = this.transA * this.minPointOffset +
+					(this.reversed ? (this.endAngleRad - this.startAngleRad) / 4 : 0); // ???
+			}
+		}
+	},
+	
+	/**
+	 * In case of auto connect, add one closestPointRange to the max value right before
+	 * tickPositions are computed, so that ticks will extend passed the real max.
+	 */
+	beforeSetTickPositions: function () {
+		if (this.autoConnect) {
+			this.max += (this.categories && 1) || this.pointRange || this.closestPointRange; // #1197
+		}
+	},
+	
+	/**
+	 * Override the setAxisSize method to use the arc's circumference as length. This
+	 * allows tickPixelInterval to apply to pixel lengths along the perimeter
+	 */
+	setAxisSize: function () {
+		
+		axisProto.setAxisSize.call(this);
+		
+		if (this.center) { // it's not defined the first time
+			this.len = this.width = this.height = this.isCircular ?
+				this.center[2] * (this.endAngleRad - this.startAngleRad) / 2 :
+				this.center[2] / 2;
+		}
+	},
+	
+	/**
+	 * Returns the x, y coordinate of a point given by a value and a pixel distance
+	 * from center
+	 */
+	getPosition: function (value, length) {
+		if (!this.isCircular) {
+			length = this.translate(value);
+			value = this.min;	
+		}
+		
+		return this.postTranslate(
+			this.translate(value),
+			pick(length, this.center[2] / 2) - this.offset
+		);		
+	},
+	
+	/**
+	 * Translate from intermediate plotX (angle), plotY (axis.len - radius) to final chart coordinates. 
+	 */
+	postTranslate: function (angle, radius) {
+		
+		var chart = this.chart,
+			center = this.center;
+			
+		angle = this.startAngleRad + angle;
+		
+		return {
+			x: chart.plotLeft + center[0] + Math.cos(angle) * radius,
+			y: chart.plotTop + center[1] + Math.sin(angle) * radius
+		}; 
+		
+	},
+	
+	/**
+	 * Find the path for plot bands along the radial axis
+	 */
+	getPlotBandPath: function (from, to, options) {
+		var center = this.center,
+			startAngleRad = this.startAngleRad,
+			fullRadius = center[2] / 2,
+			radii = [
+				pick(options.outerRadius, '100%'),
+				options.innerRadius,
+				pick(options.thickness, 10)
+			],
+			percentRegex = /%$/,
+			start,
+			end,
+			open,
+			isCircular = this.isCircular, // X axis in a polar chart
+			ret;
+			
+		// Polygonal plot bands
+		if (this.options.gridLineInterpolation === 'polygon') {
+			ret = this.getPlotLinePath(from).concat(this.getPlotLinePath(to, true));
+		
+		// Circular grid bands
+		} else {
+			
+			// Plot bands on Y axis (radial axis) - inner and outer radius depend on to and from
+			if (!isCircular) {
+				radii[0] = this.translate(from);
+				radii[1] = this.translate(to);
+			}
+			
+			// Convert percentages to pixel values
+			radii = map(radii, function (radius) {
+				if (percentRegex.test(radius)) {
+					radius = (pInt(radius, 10) * fullRadius) / 100;
+				}
+				return radius;
+			});
+			
+			// Handle full circle
+			if (options.shape === 'circle' || !isCircular) {
+				start = -Math.PI / 2;
+				end = Math.PI * 1.5;
+				open = true;
+			} else {
+				start = startAngleRad + this.translate(from);
+				end = startAngleRad + this.translate(to);
+			}
+		
+		
+			ret = this.chart.renderer.symbols.arc(
+				this.left + center[0],
+				this.top + center[1],
+				radii[0],
+				radii[0],
+				{
+					start: start,
+					end: end,
+					innerR: pick(radii[1], radii[0] - radii[2]),
+					open: open
+				}
+			);
+		}
+		 
+		return ret;
+	},
+	
+	/**
+	 * Find the path for plot lines perpendicular to the radial axis.
+	 */
+	getPlotLinePath: function (value, reverse) {
+		var axis = this,
+			center = axis.center,
+			chart = axis.chart,
+			end = axis.getPosition(value),
+			xAxis,
+			xy,
+			tickPositions,
+			ret;
+		
+		// Spokes
+		if (axis.isCircular) {
+			ret = ['M', center[0] + chart.plotLeft, center[1] + chart.plotTop, 'L', end.x, end.y];
+		
+		// Concentric circles			
+		} else if (axis.options.gridLineInterpolation === 'circle') {
+			value = axis.translate(value);
+			if (value) { // a value of 0 is in the center
+				ret = axis.getLinePath(0, value);
+			}
+		// Concentric polygons 
+		} else {
+			xAxis = chart.xAxis[0];
+			ret = [];
+			value = axis.translate(value);
+			tickPositions = xAxis.tickPositions;
+			if (xAxis.autoConnect) {
+				tickPositions = tickPositions.concat([tickPositions[0]]);
+			}
+			// Reverse the positions for concatenation of polygonal plot bands
+			if (reverse) {
+				tickPositions = [].concat(tickPositions).reverse();
+			}
+				
+			each(tickPositions, function (pos, i) {
+				xy = xAxis.getPosition(pos, value);
+				ret.push(i ? 'L' : 'M', xy.x, xy.y);
+			});
+			
+		}
+		return ret;
+	},
+	
+	/**
+	 * Find the position for the axis title, by default inside the gauge
+	 */
+	getTitlePosition: function () {
+		var center = this.center,
+			chart = this.chart,
+			titleOptions = this.options.title;
+		
+		return { 
+			x: chart.plotLeft + center[0] + (titleOptions.x || 0), 
+			y: chart.plotTop + center[1] - ({ high: 0.5, middle: 0.25, low: 0 }[titleOptions.align] * 
+				center[2]) + (titleOptions.y || 0)  
+		};
+	}
+	
+};
+/*jslint unparam: false*/
+
+/**
+ * Override axisProto.init to mix in special axis instance functions and function overrides
+ */
+wrap(axisProto, 'init', function (proceed, chart, userOptions) {
+	var axis = this,
+		angular = chart.angular,
+		polar = chart.polar,
+		isX = userOptions.isX,
+		isHidden = angular && isX,
+		isCircular,
+		startAngleRad,
+		endAngleRad,
+		options,
+		chartOptions = chart.options,
+		paneIndex = userOptions.pane || 0,
+		pane,
+		paneOptions;
+		
+	// Before prototype.init
+	if (angular) {
+		extend(this, isHidden ? hiddenAxisMixin : radialAxisMixin);
+		isCircular =  !isX;
+		if (isCircular) {
+			this.defaultRadialOptions = this.defaultRadialGaugeOptions;
+		}
+		
+	} else if (polar) {
+		//extend(this, userOptions.isX ? radialAxisMixin : radialAxisMixin);
+		extend(this, radialAxisMixin);
+		isCircular = isX;
+		this.defaultRadialOptions = isX ? this.defaultRadialXOptions : merge(this.defaultYAxisOptions, this.defaultRadialYOptions);
+		
+	}
+	
+	// Run prototype.init
+	proceed.call(this, chart, userOptions);
+	
+	if (!isHidden && (angular || polar)) {
+		options = this.options;
+		
+		// Create the pane and set the pane options.
+		if (!chart.panes) {
+			chart.panes = [];
+		}
+		this.pane = chart.panes[paneIndex] = pane = new Pane(
+			splat(chartOptions.pane)[paneIndex],
+			chart,
+			axis
+		);
+		paneOptions = pane.options;
+		
+			
+		// Disable certain features on angular and polar axes
+		chart.inverted = false;
+		chartOptions.chart.zoomType = null;
+		
+		// Start and end angle options are
+		// given in degrees relative to top, while internal computations are
+		// in radians relative to right (like SVG).
+		this.startAngleRad = startAngleRad = (paneOptions.startAngle - 90) * Math.PI / 180;
+		this.endAngleRad = endAngleRad = (pick(paneOptions.endAngle, paneOptions.startAngle + 360)  - 90) * Math.PI / 180;
+		this.offset = options.offset || 0;
+		
+		this.isCircular = isCircular;
+		
+		// Automatically connect grid lines?
+		if (isCircular && userOptions.max === UNDEFINED && endAngleRad - startAngleRad === 2 * Math.PI) {
+			this.autoConnect = true;
+		}
+	}
+	
+});
+
+/**
+ * Add special cases within the Tick class' methods for radial axes.
+ */	
+wrap(tickProto, 'getPosition', function (proceed, horiz, pos, tickmarkOffset, old) {
+	var axis = this.axis;
+	
+	return axis.getPosition ? 
+		axis.getPosition(pos) :
+		proceed.call(this, horiz, pos, tickmarkOffset, old);	
+});
+
+/**
+ * Wrap the getLabelPosition function to find the center position of the label
+ * based on the distance option
+ */	
+wrap(tickProto, 'getLabelPosition', function (proceed, x, y, label, horiz, labelOptions, tickmarkOffset, index, step) {
+	var axis = this.axis,
+		optionsY = labelOptions.y,
+		ret,
+		align = labelOptions.align,
+		angle = (axis.translate(this.pos) + axis.startAngleRad + Math.PI / 2) / Math.PI * 180;
+	
+	if (axis.isRadial) {
+		ret = axis.getPosition(this.pos, (axis.center[2] / 2) + pick(labelOptions.distance, -25));
+		
+		// Automatically rotated
+		if (labelOptions.rotation === 'auto') {
+			label.attr({ 
+				rotation: angle
+			});
+		
+		// Vertically centered
+		} else if (optionsY === null) {
+			optionsY = pInt(label.styles.lineHeight) * 0.9 - label.getBBox().height / 2;
+		
+		}
+		
+		// Automatic alignment
+		if (align === null) {
+			if (axis.isCircular) {
+				if (angle > 20 && angle < 160) {
+					align = 'left'; // right hemisphere
+				} else if (angle > 200 && angle < 340) {
+					align = 'right'; // left hemisphere
+				} else {
+					align = 'center'; // top or bottom
+				}
+			} else {
+				align = 'center';
+			}
+			label.attr({
+				align: align
+			});
+		}
+		
+		ret.x += labelOptions.x;
+		ret.y += optionsY;
+		
+	} else {
+		ret = proceed.call(this, x, y, label, horiz, labelOptions, tickmarkOffset, index, step);
+	}
+	return ret;
+});
+
+/**
+ * Wrap the getMarkPath function to return the path of the radial marker
+ */
+wrap(tickProto, 'getMarkPath', function (proceed, x, y, tickLength, tickWidth, horiz, renderer) {
+	var axis = this.axis,
+		endPoint,
+		ret;
+		
+	if (axis.isRadial) {
+		endPoint = axis.getPosition(this.pos, axis.center[2] / 2 + tickLength);
+		ret = [
+			'M',
+			x,
+			y,
+			'L',
+			endPoint.x,
+			endPoint.y
+		];
+	} else {
+		ret = proceed.call(this, x, y, tickLength, tickWidth, horiz, renderer);
+	}
+	return ret;
+});/* 
+ * The AreaRangeSeries class
+ * 
+ */
+
+/**
+ * Extend the default options with map options
+ */
+defaultPlotOptions.arearange = merge(defaultPlotOptions.area, {
+	lineWidth: 1,
+	marker: null,
+	threshold: null,
+	tooltip: {
+		pointFormat: '<span style="color:{series.color}">{series.name}</span>: <b>{point.low}</b> - <b>{point.high}</b><br/>' 
+	},
+	trackByArea: true,
+	dataLabels: {
+		verticalAlign: null,
+		xLow: 0,
+		xHigh: 0,
+		yLow: 0,
+		yHigh: 0	
+	},
+	shadow: false
+});
+
+/**
+ * Extend the point object
+ */
+var RangePoint = Highcharts.extendClass(Highcharts.Point, {
+	/**
+	 * Apply the options containing the x and low/high data and possible some extra properties.
+	 * This is called on point init or from point.update. Extends base Point by adding
+	 * multiple y-like values.
+	 *
+	 * @param {Object} options
+	 */
+	applyOptions: function (options, x) {
+		var point = this,
+			series = point.series,
+			pointArrayMap = series.pointArrayMap,
+			i = 0,
+			j = 0,
+			valueCount = pointArrayMap.length;
+
+
+		// object input
+		if (typeof options === 'object' && typeof options.length !== 'number') {
+
+			// copy options directly to point
+			extend(point, options);
+
+			point.options = options;
+			
+		} else if (options.length) { // array
+			// with leading x value
+			if (options.length > valueCount) {
+				if (typeof options[0] === 'string') {
+					point.name = options[0];
+				} else if (typeof options[0] === 'number') {
+					point.x = options[0];
+				}
+				i++;
+			}
+			while (j < valueCount) {
+				point[pointArrayMap[j++]] = options[i++];
+			}
+		}
+
+		// Handle null and make low alias y
+		/*if (point.high === null) {
+			point.low = null;
+		}*/
+		point.y = point[series.pointValKey];
+		
+		// If no x is set by now, get auto incremented value. All points must have an
+		// x value, however the y value can be null to create a gap in the series
+		if (point.x === UNDEFINED && series) {
+			point.x = x === UNDEFINED ? series.autoIncrement() : x;
+		}
+		
+		return point;
+	},
+	
+	/**
+	 * Return a plain array for speedy calculation
+	 */
+	toYData: function () {
+		return [this.low, this.high];
+	}
+});
+
+/**
+ * Add the series type
+ */
+seriesTypes.arearange = Highcharts.extendClass(seriesTypes.area, {
+	type: 'arearange',
+	pointArrayMap: ['low', 'high'],
+	pointClass: RangePoint,
+	pointValKey: 'low',
+	
+	/**
+	 * Translate data points from raw values x and y to plotX and plotY
+	 */
+	translate: function () {
+		var series = this,
+			yAxis = series.yAxis;
+
+		seriesTypes.area.prototype.translate.apply(series);
+
+		// Set plotLow and plotHigh
+		each(series.points, function (point) {
+			
+			if (point.y !== null) {
+				point.plotLow = point.plotY;
+				point.plotHigh = yAxis.translate(point.high, 0, 1, 0, 1);
+			}
+		});
+	},
+	
+	/**
+	 * Extend the line series' getSegmentPath method by applying the segment
+	 * path to both lower and higher values of the range
+	 */
+	getSegmentPath: function (segment) {
+		
+		var highSegment = [],
+			i = segment.length,
+			baseGetSegmentPath = Series.prototype.getSegmentPath,
+			point,
+			linePath,
+			lowerPath,
+			options = this.options,
+			step = options.step,
+			higherPath;
+			
+		// Make a segment with plotX and plotY for the top values
+		while (i--) {
+			point = segment[i];
+			highSegment.push({
+				plotX: point.plotX,
+				plotY: point.plotHigh
+			});
+		}
+		
+		// Get the paths
+		lowerPath = baseGetSegmentPath.call(this, segment);
+		if (step) {
+			if (step === true) {
+				step = 'left';
+			}
+			options.step = { left: 'right', center: 'center', right: 'left' }[step]; // swap for reading in getSegmentPath
+		}
+		higherPath = baseGetSegmentPath.call(this, highSegment);
+		options.step = step;
+		
+		// Create a line on both top and bottom of the range
+		linePath = [].concat(lowerPath, higherPath);
+		
+		// For the area path, we need to change the 'move' statement into 'lineTo' or 'curveTo'
+		higherPath[0] = 'L'; // this probably doesn't work for spline			
+		this.areaPath = this.areaPath.concat(lowerPath, higherPath);
+		
+		return linePath;
+	},
+	
+	/**
+	 * Extend the basic drawDataLabels method by running it for both lower and higher
+	 * values.
+	 */
+	drawDataLabels: function () {
+		
+		var data = this.data,
+			length = data.length,
+			i,
+			originalDataLabels = [],
+			seriesProto = Series.prototype,
+			dataLabelOptions = this.options.dataLabels,
+			point,
+			inverted = this.chart.inverted;
+			
+		if (dataLabelOptions.enabled || this._hasPointLabels) {
+			
+			// Step 1: set preliminary values for plotY and dataLabel and draw the upper labels
+			i = length;
+			while (i--) {
+				point = data[i];
+				
+				// Set preliminary values
+				point.y = point.high;
+				point.plotY = point.plotHigh;
+				
+				// Store original data labels and set preliminary label objects to be picked up 
+				// in the uber method
+				originalDataLabels[i] = point.dataLabel;
+				point.dataLabel = point.dataLabelUpper;
+				
+				// Set the default offset
+				point.below = false;
+				if (inverted) {
+					dataLabelOptions.align = 'left';
+					dataLabelOptions.x = dataLabelOptions.xHigh;								
+				} else {
+					dataLabelOptions.y = dataLabelOptions.yHigh;
+				}
+			}
+			seriesProto.drawDataLabels.apply(this, arguments); // #1209
+			
+			// Step 2: reorganize and handle data labels for the lower values
+			i = length;
+			while (i--) {
+				point = data[i];
+				
+				// Move the generated labels from step 1, and reassign the original data labels
+				point.dataLabelUpper = point.dataLabel;
+				point.dataLabel = originalDataLabels[i];
+				
+				// Reset values
+				point.y = point.low;
+				point.plotY = point.plotLow;
+				
+				// Set the default offset
+				point.below = true;
+				if (inverted) {
+					dataLabelOptions.align = 'right';
+					dataLabelOptions.x = dataLabelOptions.xLow;
+				} else {
+					dataLabelOptions.y = dataLabelOptions.yLow;
+				}
+			}
+			seriesProto.drawDataLabels.apply(this, arguments);
+		}
+	
+	},
+	
+	alignDataLabel: seriesTypes.column.prototype.alignDataLabel,
+	
+	getSymbol: seriesTypes.column.prototype.getSymbol,
+	
+	drawPoints: noop
+});/**
+ * The AreaSplineRangeSeries class
+ */
+
+defaultPlotOptions.areasplinerange = merge(defaultPlotOptions.arearange);
+
+/**
+ * AreaSplineRangeSeries object
+ */
+seriesTypes.areasplinerange = extendClass(seriesTypes.arearange, {
+	type: 'areasplinerange',
+	getPointSpline: seriesTypes.spline.prototype.getPointSpline
+});/**
+ * The ColumnRangeSeries class
+ */
+defaultPlotOptions.columnrange = merge(defaultPlotOptions.column, defaultPlotOptions.arearange, {
+	lineWidth: 1,
+	pointRange: null
+});
+
+/**
+ * ColumnRangeSeries object
+ */
+seriesTypes.columnrange = extendClass(seriesTypes.arearange, {
+	type: 'columnrange',
+	/**
+	 * Translate data points from raw values x and y to plotX and plotY
+	 */
+	translate: function () {
+		var series = this,
+			yAxis = series.yAxis,
+			plotHigh;
+
+		colProto.translate.apply(series);
+
+		// Set plotLow and plotHigh
+		each(series.points, function (point) {
+			var shapeArgs = point.shapeArgs;
+			
+			point.plotHigh = plotHigh = yAxis.translate(point.high, 0, 1, 0, 1);
+			point.plotLow = point.plotY;
+			
+			// adjust shape
+			shapeArgs.y = plotHigh;
+			shapeArgs.height = point.plotY - plotHigh;
+			
+			point.trackerArgs = shapeArgs;
+		});
+	},
+	drawGraph: noop,
+	pointAttrToOptions: colProto.pointAttrToOptions,
+	drawPoints: colProto.drawPoints,
+	drawTracker: colProto.drawTracker,
+	animate: colProto.animate
+});/* 
+ * The GaugeSeries class
+ */
+
+
+
+/**
+ * Extend the default options
+ */
+defaultPlotOptions.gauge = merge(defaultPlotOptions.line, {
+	dataLabels: {
+		enabled: true,
+		y: 15,
+		borderWidth: 1,
+		borderColor: 'silver',
+		borderRadius: 3,
+		style: {
+			fontWeight: 'bold'
+		},
+		verticalAlign: 'top',
+		zIndex: 2
+	},
+	dial: {
+		// radius: '80%',
+		// backgroundColor: 'black',
+		// borderColor: 'silver',
+		// borderWidth: 0,
+		// baseWidth: 3,
+		// topWidth: 1,
+		// baseLength: '70%' // of radius
+		// rearLength: '10%'
+	},
+	pivot: {
+		//radius: 5,
+		//borderWidth: 0
+		//borderColor: 'silver',
+		//backgroundColor: 'black'
+	},
+	tooltip: {
+		headerFormat: ''
+	},
+	showInLegend: false
+});
+
+/**
+ * Extend the point object
+ */
+var GaugePoint = Highcharts.extendClass(Highcharts.Point, {
+	/**
+	 * Don't do any hover colors or anything
+	 */
+	setState: function (state) {
+		this.state = state;
+	}
+});
+
+
+/**
+ * Add the series type
+ */
+var GaugeSeries = {
+	type: 'gauge',
+	pointClass: GaugePoint,
+	
+	// chart.angular will be set to true when a gauge series is present, and this will
+	// be used on the axes
+	angular: true, 
+	
+	/* *
+	 * Extend the bindAxes method by adding radial features to the axes
+	 * /
+	_bindAxes: function () {
+		Series.prototype.bindAxes.call(this);
+		
+		extend(this.xAxis, gaugeXAxisMixin);
+		extend(this.yAxis, radialAxisMixin);
+		this.yAxis.onBind();
+	},*/
+	
+	/**
+	 * Calculate paths etc
+	 */
+	translate: function () {
+		
+		var series = this,
+			yAxis = series.yAxis,
+			center = yAxis.center;
+			
+		series.generatePoints();
+		
+		each(series.points, function (point) {
+			
+			var dialOptions = merge(series.options.dial, point.dial),
+				radius = (pInt(pick(dialOptions.radius, 80)) * center[2]) / 200,
+				baseLength = (pInt(pick(dialOptions.baseLength, 70)) * radius) / 100,
+				rearLength = (pInt(pick(dialOptions.rearLength, 10)) * radius) / 100,
+				baseWidth = dialOptions.baseWidth || 3,
+				topWidth = dialOptions.topWidth || 1;
+				
+			point.shapeType = 'path';
+			point.shapeArgs = {
+				d: dialOptions.path || [
+					'M', 
+					-rearLength, -baseWidth / 2, 
+					'L', 
+					baseLength, -baseWidth / 2,
+					radius, -topWidth / 2,
+					radius, topWidth / 2,
+					baseLength, baseWidth / 2,
+					-rearLength, baseWidth / 2,
+					'z'
+				],
+				translateX: center[0],
+				translateY: center[1],
+				rotation: (yAxis.startAngleRad + yAxis.translate(point.y, null, null, null, true)) * 180 / Math.PI
+			};
+			
+			// Positions for data label
+			point.plotX = center[0];
+			point.plotY = center[1];
+		});
+	},
+	
+	/**
+	 * Draw the points where each point is one needle
+	 */
+	drawPoints: function () {
+		
+		var series = this,
+			center = series.yAxis.center,
+			pivot = series.pivot,
+			options = series.options,
+			pivotOptions = options.pivot,
+			renderer = series.chart.renderer;
+		
+		each(series.points, function (point) {
+			
+			var graphic = point.graphic,
+				shapeArgs = point.shapeArgs,
+				d = shapeArgs.d,
+				dialOptions = merge(options.dial, point.dial); // #1233
+			
+			if (graphic) {
+				graphic.animate(shapeArgs);
+				shapeArgs.d = d; // animate alters it
+			} else {
+				point.graphic = renderer[point.shapeType](shapeArgs)
+					.attr({
+						stroke: dialOptions.borderColor || 'none',
+						'stroke-width': dialOptions.borderWidth || 0,
+						fill: dialOptions.backgroundColor || 'black',
+						rotation: shapeArgs.rotation // required by VML when animation is false
+					})
+					.add(series.group);
+			}
+		});
+		
+		// Add or move the pivot
+		if (pivot) {
+			pivot.animate({ // #1235
+				translateX: center[0],
+				translateY: center[1]
+			});
+		} else {
+			series.pivot = renderer.circle(0, 0, pick(pivotOptions.radius, 5))
+				.attr({
+					'stroke-width': pivotOptions.borderWidth || 0,
+					stroke: pivotOptions.borderColor || 'silver',
+					fill: pivotOptions.backgroundColor || 'black'
+				})
+				.translate(center[0], center[1])
+				.add(series.group);
+		}
+	},
+	
+	/**
+	 * Animate the arrow up from startAngle
+	 */
+	animate: function () {
+		var series = this;
+
+		each(series.points, function (point) {
+			var graphic = point.graphic;
+
+			if (graphic) {
+				// start value
+				graphic.attr({
+					rotation: series.yAxis.startAngleRad * 180 / Math.PI
+				});
+
+				// animate
+				graphic.animate({
+					rotation: point.shapeArgs.rotation
+				}, series.options.animation);
+			}
+		});
+
+		// delete this function to allow it only once
+		series.animate = null;
+	},
+	
+	render: function () {
+		this.group = this.plotGroup(
+			'group', 
+			'series', 
+			this.visible ? 'visible' : 'hidden', 
+			this.options.zIndex, 
+			this.chart.seriesGroup
+		);
+		seriesTypes.pie.prototype.render.call(this);
+		this.group.clip(this.chart.clipRect);
+	},
+	
+	setData: seriesTypes.pie.prototype.setData,
+	drawTracker: seriesTypes.column.prototype.drawTracker
+};
+seriesTypes.gauge = Highcharts.extendClass(seriesTypes.line, GaugeSeries);/**
+ * Extensions for polar charts. Additionally, much of the geometry required for polar charts is
+ * gathered in RadialAxes.js.
+ * 
+ */
+
+var seriesProto = Series.prototype,
+	mouseTrackerProto = Highcharts.MouseTracker.prototype;
+
+
+
+/**
+ * Translate a point's plotX and plotY from the internal angle and radius measures to 
+ * true plotX, plotY coordinates
+ */
+seriesProto.toXY = function (point) {
+	var xy,
+		chart = this.chart,
+		plotX = point.plotX,
+		plotY = point.plotY;
+	
+	// Save rectangular plotX, plotY for later computation
+	point.rectPlotX = plotX;
+	point.rectPlotY = plotY;
+	
+	// Record the angle in degrees for use in tooltip
+	point.deg = plotX / Math.PI * 180;
+	
+	// Find the polar plotX and plotY
+	xy = this.xAxis.postTranslate(point.plotX, this.yAxis.len - plotY);
+	point.plotX = point.polarPlotX = xy.x - chart.plotLeft;
+	point.plotY = point.polarPlotY = xy.y - chart.plotTop;
+};
+
+
+/**
+ * Add some special init logic to areas and areasplines
+ */
+function initArea(proceed, chart, options) {
+	proceed.call(this, chart, options);
+	if (this.chart.polar) {
+		
+		/**
+		 * Overridden method to close a segment path. While in a cartesian plane the area 
+		 * goes down to the threshold, in the polar chart it goes to the center.
+		 */
+		this.closeSegment = function (path) {
+			var center = this.xAxis.center;
+			path.push(
+				'L',
+				center[0],
+				center[1]
+			);			
+		};
+		
+		// Instead of complicated logic to draw an area around the inner area in a stack,
+		// just draw it behind
+		this.closedStacks = true;
+	}
+}
+wrap(seriesTypes.area.prototype, 'init', initArea);
+wrap(seriesTypes.areaspline.prototype, 'init', initArea);
+		
+
+/**
+ * Overridden method for calculating a spline from one point to the next
+ */
+wrap(seriesTypes.spline.prototype, 'getPointSpline', function (proceed, segment, point, i) {
+	
+	var ret,
+		smoothing = 1.5, // 1 means control points midway between points, 2 means 1/3 from the point, 3 is 1/4 etc;
+		denom = smoothing + 1,
+		plotX, 
+		plotY,
+		lastPoint,
+		nextPoint,
+		lastX,
+		lastY,
+		nextX,
+		nextY,
+		leftContX,
+		leftContY,
+		rightContX,
+		rightContY,
+		distanceLeftControlPoint,
+		distanceRightControlPoint,
+		leftContAngle,
+		rightContAngle,
+		jointAngle;
+		
+		
+	if (this.chart.polar) {
+		
+		plotX = point.plotX;
+		plotY = point.plotY;
+		lastPoint = segment[i - 1];
+		nextPoint = segment[i + 1];
+			
+		// Connect ends
+		if (this.connectEnds) {
+			if (!lastPoint) {
+				lastPoint = segment[segment.length - 2]; // not the last but the second last, because the segment is already connected
+			}
+			if (!nextPoint) {
+				nextPoint = segment[1];
+			}	
+		}
+
+		// find control points
+		if (lastPoint && nextPoint) {
+		
+			lastX = lastPoint.plotX;
+			lastY = lastPoint.plotY;
+			nextX = nextPoint.plotX;
+			nextY = nextPoint.plotY;
+			leftContX = (smoothing * plotX + lastX) / denom;
+			leftContY = (smoothing * plotY + lastY) / denom;
+			rightContX = (smoothing * plotX + nextX) / denom;
+			rightContY = (smoothing * plotY + nextY) / denom;
+			distanceLeftControlPoint = Math.sqrt(Math.pow(leftContX - plotX, 2) + Math.pow(leftContY - plotY, 2));
+			distanceRightControlPoint = Math.sqrt(Math.pow(rightContX - plotX, 2) + Math.pow(rightContY - plotY, 2));
+			leftContAngle = Math.atan2(leftContY - plotY, leftContX - plotX);
+			rightContAngle = Math.atan2(rightContY - plotY, rightContX - plotX);
+			jointAngle = (Math.PI / 2) + ((leftContAngle + rightContAngle) / 2);
+				
+				
+			// Ensure the right direction, jointAngle should be in the same quadrant as leftContAngle
+			if (Math.abs(leftContAngle - jointAngle) > Math.PI / 2) {
+				jointAngle -= Math.PI;
+			}
+			
+			// Find the corrected control points for a spline straight through the point
+			leftContX = plotX + Math.cos(jointAngle) * distanceLeftControlPoint;
+			leftContY = plotY + Math.sin(jointAngle) * distanceLeftControlPoint;
+			rightContX = plotX + Math.cos(Math.PI + jointAngle) * distanceRightControlPoint;
+			rightContY = plotY + Math.sin(Math.PI + jointAngle) * distanceRightControlPoint;
+			
+			// Record for drawing in next point
+			point.rightContX = rightContX;
+			point.rightContY = rightContY;
+
+		}
+		
+		
+		// moveTo or lineTo
+		if (!i) {
+			ret = ['M', plotX, plotY];
+		} else { // curve from last point to this
+			ret = [
+				'C',
+				lastPoint.rightContX || lastPoint.plotX,
+				lastPoint.rightContY || lastPoint.plotY,
+				leftContX || plotX,
+				leftContY || plotY,
+				plotX,
+				plotY
+			];
+			lastPoint.rightContX = lastPoint.rightContY = null; // reset for updating series later
+		}
+		
+		
+	} else {
+		ret = proceed.call(this, segment, point, i);
+	}
+	return ret;
+});
+
+/**
+ * Extend translate. The plotX and plotY values are computed as if the polar chart were a
+ * cartesian plane, where plotX denotes the angle in radians and (yAxis.len - plotY) is the pixel distance from
+ * center. 
+ */
+wrap(seriesProto, 'translate', function (proceed) {
+		
+	// Run uber method
+	proceed.call(this);
+	
+	// Postprocess plot coordinates
+	if (this.chart.polar && !this.preventPostTranslate) {
+		var points = this.points,
+			i = points.length;
+		while (i--) {
+			// Translate plotX, plotY from angle and radius to true plot coordinates
+			this.toXY(points[i]);
+		}
+	}
+});
+
+/** 
+ * Extend getSegmentPath to allow connecting ends across 0 to provide a closed circle in 
+ * line-like series.
+ */
+wrap(seriesProto, 'getSegmentPath', function (proceed, segment) {
+		
+	var points = this.points;
+	
+	// Connect the path
+	if (this.chart.polar && this.options.connectEnds !== false && 
+			segment[segment.length - 1] === points[points.length - 1] && points[0].y !== null) {
+		this.connectEnds = true; // re-used in splines
+		segment = [].concat(segment, [points[0]]);
+	}
+	
+	// Run uber method
+	return proceed.call(this, segment);
+	
+});
+
+
+function polarAnimate(proceed, init) {
+	var chart = this.chart,
+		animation = this.options.animation,
+		group = this.group,
+		markerGroup = this.markerGroup,
+		center = this.xAxis.center,
+		plotLeft = chart.plotLeft,
+		plotTop = chart.plotTop,
+		attribs;
+
+	// Specific animation for polar charts
+	if (chart.polar) {
+		
+		// Enable animation on polar charts only in SVG. In VML, the scaling is different, plus animation
+		// would be so slow it would't matter.
+		if (chart.renderer.isSVG) {
+
+			if (animation === true) {
+				animation = {};
+			}
+	
+			// Initialize the animation
+			if (init) {
+				
+				// Create an SVG specific attribute setter for scaleX and scaleY
+				group.attrSetters.scaleX = group.attrSetters.scaleY = function (value, key) {
+					this[key] = value;
+					if (this.scaleX !== UNDEFINED && this.scaleY !== UNDEFINED) {
+						this.element.setAttribute('transform', 'translate(' + this.translateX + ',' + this.translateY + ') scale(' + 
+							this.scaleX + ',' + this.scaleY + ')');
+					}
+					return false;
+				};
+				
+				// Scale down the group and place it in the center
+				attribs = {
+					translateX: center[0] + plotLeft,
+					translateY: center[1] + plotTop,
+					scaleX: 0,
+					scaleY: 0
+				};
+					
+				group.attr(attribs);
+				if (markerGroup) {
+					markerGroup.attrSetters = group.attrSetters;
+					markerGroup.attr(attribs);
+				}
+				
+			// Run the animation
+			} else {
+				attribs = {
+					translateX: plotLeft,
+					translateY: plotTop,
+					scaleX: 1,
+					scaleY: 1
+				};
+				group.animate(attribs, animation);
+				if (markerGroup) {
+					markerGroup.animate(attribs, animation);
+				}
+				
+				// Delete this function to allow it only once
+				this.animate = null;
+			}
+		}
+	
+	// For non-polar charts, revert to the basic animation
+	} else {
+		proceed.call(this, init);
+	} 
+}
+
+// Define the animate method for both regular series and column series and their derivatives
+wrap(seriesProto, 'animate', polarAnimate);
+wrap(colProto, 'animate', polarAnimate);
+
+
+/**
+ * Throw in a couple of properties to let setTooltipPoints know we're indexing the points
+ * in degrees (0-360), not plot pixel width.
+ */
+wrap(seriesProto, 'setTooltipPoints', function (proceed, renew) {
+		
+	if (this.chart.polar) {
+		extend(this.xAxis, {
+			tooltipLen: 360, // degrees are the resolution unit of the tooltipPoints array
+			tooltipPosName: 'deg'
+		});	
+	}
+	
+	// Run uber method
+	return proceed.call(this, renew);
+});
+
+
+/**
+ * Extend the column prototype's translate method
+ */
+wrap(colProto, 'translate', function (proceed) {
+		
+	var xAxis = this.xAxis,
+		len = this.yAxis.len,
+		center = xAxis.center,
+		startAngleRad = xAxis.startAngleRad,
+		renderer = this.chart.renderer,
+		start,
+		points,
+		point,
+		i;
+	
+	this.preventPostTranslate = true;
+	
+	// Run uber method
+	proceed.call(this);
+	
+	// Postprocess plot coordinates
+	if (xAxis.isRadial) {
+		points = this.points;
+		i = points.length;
+		while (i--) {
+			point = points[i];
+			start = point.barX + startAngleRad;
+			point.shapeType = 'path';
+			point.shapeArgs = {
+				d: renderer.symbols.arc(
+					center[0],
+					center[1],
+					len - point.plotY,
+					null, 
+					{
+						start: start,
+						end: start + point.pointWidth,
+						innerR: len - pick(point.yBottom, len)
+					}
+				)
+			};
+			this.toXY(point); // provide correct plotX, plotY for tooltip
+		}
+	}
+});
+
+
+/**
+ * Align column data labels outside the columns. #1199.
+ */
+wrap(colProto, 'alignDataLabel', function (proceed, point, dataLabel, options, alignTo, isNew) {
+	
+	if (this.chart.polar) {
+		var angle = point.rectPlotX / Math.PI * 180,
+			align,
+			verticalAlign;
+		
+		// Align nicely outside the perimeter of the columns
+		if (options.align === null) {
+			if (angle > 20 && angle < 160) {
+				align = 'left'; // right hemisphere
+			} else if (angle > 200 && angle < 340) {
+				align = 'right'; // left hemisphere
+			} else {
+				align = 'center'; // top or bottom
+			}
+			options.align = align;
+		}
+		if (options.verticalAlign === null) {
+			if (angle < 45 || angle > 315) {
+				verticalAlign = 'bottom'; // top part
+			} else if (angle > 135 && angle < 225) {
+				verticalAlign = 'top'; // bottom part
+			} else {
+				verticalAlign = 'middle'; // left or right
+			}
+			options.verticalAlign = verticalAlign;
+		}
+		
+		seriesProto.alignDataLabel.call(this, point, dataLabel, options, alignTo, isNew);
+	} else {
+		proceed.call(this, point, dataLabel, options, alignTo, isNew);
+	}
+	
+});
+
+/**
+ * Extend the mouse tracker to return the tooltip position index in terms of
+ * degrees rather than pixels
+ */
+wrap(mouseTrackerProto, 'getIndex', function (proceed, e) {
+	var ret,
+		chart = this.chart,
+		center,
+		x,
+		y;
+	
+	if (chart.polar) {
+		center = chart.xAxis[0].center;
+		x = e.chartX - center[0] - chart.plotLeft;
+		y = e.chartY - center[1] - chart.plotTop;
+		
+		ret = 180 - Math.round(Math.atan2(x, y) / Math.PI * 180);
+	
+	} else {
+	
+		// Run uber method
+		ret = proceed.call(this, e);
+	}
+	return ret;
+});
+
+/**
+ * Extend getMouseCoordinates to prepare for polar axis values
+ */
+wrap(mouseTrackerProto, 'getMouseCoordinates', function (proceed, e) {
+	var chart = this.chart,
+		ret = {
+			xAxis: [],
+			yAxis: []
+		};
+	
+	if (chart.polar) {	
+
+		each(chart.axes, function (axis) {
+			var isXAxis = axis.isXAxis,
+				center = axis.center,
+				x = e.chartX - center[0] - chart.plotLeft,
+				y = e.chartY - center[1] - chart.plotTop;
+			
+			ret[isXAxis ? 'xAxis' : 'yAxis'].push({
+				axis: axis,
+				value: axis.translate(
+					isXAxis ?
+						Math.PI - Math.atan2(x, y) : // angle 
+						Math.sqrt(Math.pow(x, 2) + Math.pow(y, 2)), // distance from center
+					true
+				)
+			});
+		});
+		
+	} else {
+		ret = proceed.call(this, e);
+	}
+	
+	return ret;
+});
+}(Highcharts));