highcharts-js-rails 0.1.9 → 0.1.10

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,24 +1,34 @@
1
1
  /*
2
- Highcharts JS v2.2.5 (2012-06-08)
2
+ Highcharts JS v2.3.2 (2012-08-31)
3
3
 
4
- (c) 2009-2011 Torstein H?nsi
4
+ (c) 2009-2011 Torstein Hønsi
5
5
 
6
6
  License: www.highcharts.com/license
7
7
  */
8
- (function(g,v){var o=g.each,s=g.extend,p=g.merge,w=g.map,j=g.pick,q=g.pInt,i=g.getOptions().plotOptions,k=g.seriesTypes,t=g.Series,m=function(){},r=g.Axis.prototype,l=g.Tick.prototype,x={redraw:function(){this.isDirty=!1},render:function(){this.isDirty=!1},setScale:m,setCategories:m,setTitle:m},u={isRadial:!0,defaultRadialGaugeOptions:{center:["50%","50%"],labels:{align:"center",x:0,y:null},minorGridLineWidth:0,minorTickInterval:"auto",minorTickLength:10,minorTickPosition:"inside",minorTickWidth:1,
9
- plotBands:[],size:["90%"],tickLength:10,tickPosition:"inside",tickWidth:2,title:{rotation:0},zIndex:2},defaultRadialXOptions:{center:["50%","50%"],labels:{align:"center",distance:15,x:0,y:null},maxPadding:0,minPadding:0,size:["90%"]},defaultRadialYOptions:{center:["50%","50%"],labels:{align:"left",x:3,y:-2},size:["90%"],title:{x:-4,text:null}},defaultBackgroundOptions:{shape:"circle",borderWidth:1,borderColor:"silver",backgroundColor:{linearGradient:{x1:0,y1:0,x2:0,y2:1},stops:[[0,"#FFF"],[1,"#DDD"]]},
10
- from:Number.MIN_VALUE,innerRadius:0,to:Number.MAX_VALUE,outerRadius:"105%"},setOptions:function(a){var b=this,c;b.options=c=p(b.defaultOptions,b.isXAxis?{}:b.defaultYAxisOptions,b.defaultRadialOptions,a);o([].concat(g.splat(a.background||{})).reverse(),function(a){a=p(b.defaultBackgroundOptions,a);a.color=a.backgroundColor;c.plotBands.unshift(a)})},getOffset:function(){r.getOffset.call(this);this.chart.axisOffset[this.side]=0;this.center=k.pie.prototype.getCenter.call(this)},getLinePath:function(a){var b=
11
- this.center,a=j(a,b[2]/2-this.offset);return this.chart.renderer.symbols.arc(this.left+b[0],this.top+b[1],a,a,{start:this.startAngleRad,end:this.endAngleRad,open:!0,innerR:0})},setAxisTranslation:function(){r.setAxisTranslation.call(this);if(this.center)this.transA=this.isCircular?(this.endAngleRad-this.startAngleRad)/(this.max-this.min+(this.closestPointRange||0)||1):this.center[2]/2/(this.max-this.min||1),this.minPixelPadding=this.transA*((this.pointRange||0)/2)},setAxisSize:function(){r.setAxisSize.call(this);
12
- 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),j(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,e=this.startAngleRad,
13
- h=d[2]/2,f=[j(c.outerRadius,"100%"),c.innerRadius,j(c.thickness,10)],g=/%$/,n,f=w(f,function(a){g.test(a)&&(a=q(a,10)*h/100);return a});c.shape==="circle"?(a=-Math.PI/2,b=Math.PI*1.5,n=!0):(a=e+this.translate(a),b=e+this.translate(b));return this.chart.renderer.symbols.arc(this.left+d[0],this.top+d[1],f[0],f[0],{start:a,end:b,innerR:j(f[1],f[0]-f[2]),open:n})},getPlotLinePath:function(a){var b=this.center,c=this.chart,d=this.getPosition(a);return this.isCircular?["M",b[0]+c.plotLeft,b[1]+c.plotTop,
14
- "L",d.x,d.y]:u.getLinePath.call(this,this.translate(a))},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}[this.options.title.align]*a[2]+(c.y||0)}}};r.init=function(a){return function(b,c){var d=b.angular,e=b.polar,h=c.isX,f;if(d){if(s(this,h?x:u),f=!h)this.defaultRadialOptions=this.defaultGaugeOptions}else if(e)s(this,u),this.defaultRadialOptions=(f=h)?this.defaultRadialXOptions:this.defaultRadialYOptions;
15
- a.apply(this,arguments);if(d||e)d=this.options,this.startAngleRad=(d.startAngle-90)*Math.PI/180,this.endAngleRad=(d.endAngle-90)*Math.PI/180,this.offset=d.offset||0,this.isCircular=f}}(r.init);l.getPosition=function(a){return function(){var b=this.axis,c=arguments;return b.getPosition?b.getPosition(c[1]):a.apply(this,c)}}(l.getPosition);l.getLabelPosition=function(a){return function(){var b=this.axis,c=b.options.labels,d=this.label,e=c.y,h;b.isRadial?(h=b.getPosition(this.pos,b.center[2]/2+j(c.distance,
16
- -25)),c.rotation==="auto"?d.attr({rotation:(b.translate(this.pos)+b.startAngleRad+Math.PI/2)/Math.PI*180}):e===null&&(e=q(d.styles.lineHeight)*0.9-d.getBBox().height/2),h.x+=c.x,h.y+=e):h=a.apply(this,arguments);return h}}(l.getLabelPosition);l.getMarkPath=function(a){return function(b,c,d){var e=this.axis;e.isRadial?(e=e.getPosition(this.pos,e.center[2]/2+d),e=["M",b,c,"L",e.x,e.y]):e=a.apply(this,arguments);return e}}(l.getMarkPath);i.arearange=p(i.area,{lineWidth:0,threshold:null,tooltip:{pointFormat:'<span style="color:{series.color}">{series.name}</span>: {point.low} - {point.high}'},
17
- trackByArea:!0,dataLabels:{yHigh:-6,yLow:16}});l=g.extendClass(g.Point,{applyOptions:function(a){var b=this.series,c=0;if(typeof a==="object"&&typeof a.length!=="number")s(this,a),this.options=a;else if(a.length){if(a.length===3){if(typeof a[0]==="string")this.name=a[0];else if(typeof a[0]==="number")this.x=a[0];c++}this.low=a[c++];this.high=a[c++]}if(this.high===null)this.low=null;this.y=this.low;if(this.x===v&&b)this.x=b.autoIncrement();return this},toYData:function(){return[this.low,this.high]}});
18
- k.arearange=g.extendClass(k.area,{type:"arearange",valueCount:2,pointClass:l,translate:function(){var a=this.yAxis;k.area.prototype.translate.apply(this);o(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){for(var b=[],c=a.length,d=t.prototype.getSegmentPath,e;c--;)e=a[c],b.push({plotX:e.plotX,plotY:e.plotHigh});a=d.call(this,a);d=d.call(this,b);b=[].concat(a,d);d[0]="L";this.areaPath=this.areaPath.concat(a,d);return b},drawDataLabels:function(){var a=
19
- this.points,b=a.length,c,d=[],e=t.prototype.drawDataLabels,h=this.options.dataLabels,f;for(c=b;c--;)f=a[c],f.y=f.high,f.plotY=f.plotHigh,d[c]=f.dataLabel,f.dataLabel=f.dataLabelUpper,h.y=h.yHigh;e.apply(this,arguments);for(c=b;c--;)f=a[c],f.dataLabelUpper=f.dataLabel,f.dataLabel=d[c],f.y=f.low,f.plotY=f.plotLow,h.y=h.yLow;e.apply(this,arguments)},drawPoints:m});i.gauge=p(i.line,{dataLabels:{enabled:!0,y:30,borderWidth:1,borderColor:"silver",borderRadius:3,style:{fontWeight:"bold"}},dial:{},pivot:{},
20
- tooltip:{headerFormat:""},showInLegend:!1});i={type:"gauge",pointClass:g.extendClass(g.Point,{setState:function(a){this.state=a}}),angular:!0,translate:function(){var a=this,b=a.yAxis,c=b.center;a.generatePoints();o(a.points,function(d){var e=p(a.options.dial,d.dial),h=q(j(e.radius,80))*c[2]/200,f=q(j(e.baseLength,70))*h/100,g=q(j(e.rearLength,10))*h/100,n=e.baseWidth||3,i=e.topWidth||1;d.shapeType="path";d.shapeArgs={d:e.path||["M",-g,-n/2,"L",f,-n/2,h,-i/2,h,i/2,f,n/2,-g,n/2],translateX:c[0],translateY:c[1],
21
- rotation:(b.startAngleRad+b.translate(d.y))*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,e=d.pivot,h=d.dial;o(a.points,function(b){var c=b.graphic,d=b.shapeArgs,e=d.d;c?(c.animate(d),d.d=e):b.graphic=a.chart.renderer[b.shapeType](d).attr({stroke:h.borderColor||"none","stroke-width":h.borderWidth||0,fill:h.backgroundColor||"black"}).add(a.group)});c?c.animate({cx:b[0],cy:b[1]}):a.pivot=a.chart.renderer.circle(b[0],b[1],j(e.radius,
22
- 5)).attr({"stroke-width":e.borderWidth||0,stroke:e.borderColor||"silver",fill:e.backgroundColor||"black"}).add(a.group)},animate:function(){var a=this;o(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.createGroup();k.pie.prototype.render.call(this)},setData:k.pie.prototype.setData,drawTracker:k.column.prototype.drawTracker};k.gauge=g.extendClass(k.line,
23
- i);i=t.prototype;m=k.column.prototype;i.toXY=function(a){var b,c=this.chart;a.rectPlotX=a.plotX;a.rectPlotY=a.plotY;b=this.xAxis.postTranslate(a.plotX,this.yAxis.len-a.plotY);a.plotX=a.polarPlotX=b.x-c.plotLeft;a.plotY=a.polarPlotY=b.y-c.plotTop};i.translate=function(a){return function(){a.apply(this,arguments);if(this.xAxis.getPosition&&this.type!=="column")for(var b=this.points,c=b.length;c--;)this.toXY(b[c])}}(i.translate);m.translate=function(a){return function(){var b=this.xAxis,c=this.yAxis.len,
24
- d=b.center,e=b.startAngleRad,h=this.chart.renderer,f,g;a.apply(this,arguments);if(b.isRadial){b=this.points;for(g=b.length;g--;)f=b[g],f.shapeType="path",f.shapeArgs={d:h.symbols.arc(d[0],d[1],c-f.plotY,null,{start:e+f.barX,end:e+f.barX+f.pointWidth,innerR:c-f.yBottom})},this.toXY(f)}}}(m.translate)})(Highcharts);
8
+ (function(h,t){function z(a,b,c){this.init.call(this,a,b,c)}function A(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 B(a,b){var c=this.chart,d=this.options.animation,f=this.group,e=this.markerGroup,g=this.xAxis.center,i=c.plotLeft,m=c.plotTop;if(c.polar){if(c.renderer.isSVG)if(d===!0&&(d={}),b){if(f.attrSetters.scaleX=f.attrSetters.scaleY=function(a,b){this[b]=a;this.scaleX!==t&&this.scaleY!==
9
+ t&&this.element.setAttribute("transform","translate("+this.translateX+","+this.translateY+") scale("+this.scaleX+","+this.scaleY+")");return!1},c={translateX:g[0]+i,translateY:g[1]+m,scaleX:0,scaleY:0},f.attr(c),e)e.attrSetters=f.attrSetters,e.attr(c)}else c={translateX:i,translateY:m,scaleX:1,scaleY:1},f.animate(c,d),e&&e.animate(c,d),this.animate=null}else a.call(this,b)}var p=h.each,u=h.extend,o=h.merge,D=h.map,n=h.pick,v=h.pInt,j=h.getOptions().plotOptions,k=h.seriesTypes,w=h.extendClass,l=h.wrap,
10
+ q=h.Axis,F=h.Tick,y=h.Series,r=k.column.prototype,s=function(){};u(z.prototype,{init:function(a,b,c){var d=this,f=d.defaultOptions;d.chart=b;if(b.angular)f.background={};d.options=a=o(f,a);(a=a.background)&&p([].concat(h.splat(a)).reverse(),function(a){var b=a.backgroundColor,a=o(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,
11
+ 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 x=q.prototype,q=F.prototype,G={getOffset:s,redraw:function(){this.isDirty=!1},render:function(){this.isDirty=!1},setScale:s,setCategories:s,setTitle:s},E={isRadial:!0,defaultRadialGaugeOptions:{labels:{align:"center",x:0,y:null},minorGridLineWidth:0,minorTickInterval:"auto",minorTickLength:10,minorTickPosition:"inside",
12
+ 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=o(this.defaultOptions,this.defaultRadialOptions,a)},getOffset:function(){x.getOffset.call(this);
13
+ this.chart.axisOffset[this.side]=0;this.center=this.pane.center=k.pie.prototype.getCenter.call(this.pane)},getLinePath:function(a,b){var c=this.center,b=n(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(){x.setAxisTranslation.call(this);if(this.center&&(this.transA=this.isCircular?(this.endAngleRad-this.startAngleRad)/(this.max-this.min||1):this.center[2]/2/
14
+ (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(){x.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=
15
+ this.translate(a),a=this.min;return this.postTranslate(this.translate(a),n(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,f=this.startAngleRad,e=d[2]/2,g=[n(c.outerRadius,"100%"),c.innerRadius,n(c.thickness,10)],i=/%$/,m,C=this.isCircular;this.options.gridLineInterpolation==="polygon"?d=this.getPlotLinePath(a).concat(this.getPlotLinePath(b,
16
+ !0)):(C||(g[0]=this.translate(a),g[1]=this.translate(b)),g=D(g,function(a){i.test(a)&&(a=v(a,10)*e/100);return a}),c.shape==="circle"||!C?(a=-Math.PI/2,b=Math.PI*1.5,m=!0):(a=f+this.translate(a),b=f+this.translate(b)),d=this.chart.renderer.symbols.arc(this.left+d[0],this.top+d[1],g[0],g[0],{start:a,end:b,innerR:n(g[1],g[0]-g[2]),open:m}));return d},getPlotLinePath:function(a,b){var c=this.center,d=this.chart,f=this.getPosition(a),e,g,i;this.isCircular?i=["M",c[0]+d.plotLeft,c[1]+d.plotTop,"L",f.x,
17
+ f.y]:this.options.gridLineInterpolation==="circle"?(a=this.translate(a))&&(i=this.getLinePath(0,a)):(e=d.xAxis[0],i=[],a=this.translate(a),c=e.tickPositions,e.autoConnect&&(c=c.concat([c[0]])),b&&(c=[].concat(c).reverse()),p(c,function(b,c){g=e.getPosition(b,a);i.push(c?"L":"M",g.x,g.y)}));return i},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(x,"init",function(a,
18
+ b,c){var d=this,f=b.angular,e=b.polar,g=c.isX,i=f&&g,m;if(f){if(u(this,i?G:E),m=!g)this.defaultRadialOptions=this.defaultRadialGaugeOptions}else if(e)u(this,E),this.defaultRadialOptions=(m=g)?this.defaultRadialXOptions:o(this.defaultYAxisOptions,this.defaultRadialYOptions);a.call(this,b,c);if(!i&&(f||e)){a=this.options;if(!b.panes)b.panes=D(h.splat(b.options.pane),function(a){return new z(a,b,d)});this.pane=f=b.panes[c.pane||0];e=f.options;b.inverted=!1;b.options.chart.zoomType=null;this.startAngleRad=
19
+ f=(e.startAngle-90)*Math.PI/180;this.endAngleRad=e=(n(e.endAngle,e.startAngle+360)-90)*Math.PI/180;this.offset=a.offset||0;if((this.isCircular=m)&&c.max===t&&e-f===2*Math.PI)this.autoConnect=!0}});l(q,"getPosition",function(a,b,c,d,f){var e=this.axis;return e.getPosition?e.getPosition(c):a.call(this,b,c,d,f)});l(q,"getLabelPosition",function(a,b,c,d,f,e,g,i,m){var h=this.axis,k=e.y,j=e.align,l=(h.translate(this.pos)+h.startAngleRad+Math.PI/2)/Math.PI*180;h.isRadial?(a=h.getPosition(this.pos,h.center[2]/
20
+ 2+n(e.distance,-25)),e.rotation==="auto"?d.attr({rotation:l}):k===null&&(k=v(d.styles.lineHeight)*0.9-d.getBBox().height/2),j===null&&(j=h.isCircular?l>20&&l<160?"left":l>200&&l<340?"right":"center":"center",d.attr({align:j})),a.x+=e.x,a.y+=k):a=a.call(this,b,c,d,f,e,g,i,m);return a});l(q,"getMarkPath",function(a,b,c,d,f,e,g){var i=this.axis;i.isRadial?(a=i.getPosition(this.pos,i.center[2]/2+d),b=["M",b,c,"L",a.x,a.y]):b=a.call(this,b,c,d,f,e,g);return b});j.arearange=o(j.area,{lineWidth:1,marker:null,
21
+ threshold:null,tooltip:{pointFormat:'<span style="color:{series.color}">{series.name}</span>: <b>{point.low}</b> - <b>{point.high}</b><br/>'},trackByArea:!0,dataLabels:{xLow:0,xHigh:0,yLow:16,yHigh:-6},shadow:!1});q=h.extendClass(h.Point,{applyOptions:function(a,b){var c=this.series,d=c.pointArrayMap,f=0,e=0,g=d.length;if(typeof a==="object"&&typeof a.length!=="number")u(this,a),this.options=a;else if(a.length){if(a.length>g){if(typeof a[0]==="string")this.name=a[0];else if(typeof a[0]==="number")this.x=
22
+ a[0];f++}for(;e<g;)this[d[e++]]=a[f++]}this.y=this[c.pointValKey];if(this.x===t&&c)this.x=b===t?c.autoIncrement():b;return this},toYData:function(){return[this.low,this.high]}});k.arearange=h.extendClass(k.area,{type:"arearange",pointArrayMap:["low","high"],pointClass:q,pointValKey:"low",translate:function(){var a=this.yAxis;k.area.prototype.translate.apply(this);p(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){for(var b=
23
+ [],c=a.length,d=y.prototype.getSegmentPath,f;c--;)f=a[c],b.push({plotX:f.plotX,plotY:f.plotHigh});a=d.call(this,a);d=d.call(this,b);b=[].concat(a,d);d[0]="L";this.areaPath=this.areaPath.concat(a,d);return b},drawDataLabels:function(){var a=this.data,b=a.length,c,d=[],f=y.prototype,e=this.options.dataLabels,g,i=this.chart.inverted;if(e.enabled||this._hasPointLabels){for(c=b;c--;)g=a[c],g.y=g.high,g.plotY=g.plotHigh,d[c]=g.dataLabel,g.dataLabel=g.dataLabelUpper,i?(e.align="left",e.x=e.xHigh):e.y=e.yHigh;
24
+ f.drawDataLabels.apply(this,arguments);for(c=b;c--;)g=a[c],g.dataLabelUpper=g.dataLabel,g.dataLabel=d[c],g.y=g.low,g.plotY=g.plotLow,i?(e.align="right",e.x=e.xLow):e.y=e.yLow;f.drawDataLabels.apply(this,arguments)}},getSymbol:k.column.prototype.getSymbol,drawPoints:s});j.areasplinerange=o(j.arearange);k.areasplinerange=w(k.arearange,{type:"areasplinerange",getPointSpline:k.spline.prototype.getPointSpline});j.columnrange=o(j.column,j.arearange,{lineWidth:1,pointRange:null});k.columnrange=w(k.arearange,
25
+ {type:"columnrange",translate:function(){var a=this.yAxis,b;r.translate.apply(this);p(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:s,pointAttrToOptions:r.pointAttrToOptions,drawPoints:r.drawPoints,drawTracker:r.drawTracker,animate:r.animate});j.gauge=o(j.line,{dataLabels:{enabled:!0,y:30,borderWidth:1,borderColor:"silver",borderRadius:3,style:{fontWeight:"bold"}},dial:{},pivot:{},tooltip:{headerFormat:""},
26
+ showInLegend:!1});j={type:"gauge",pointClass:h.extendClass(h.Point,{setState:function(a){this.state=a}}),angular:!0,translate:function(){var a=this,b=a.yAxis,c=b.center;a.generatePoints();p(a.points,function(d){var f=o(a.options.dial,d.dial),e=v(n(f.radius,80))*c[2]/200,g=v(n(f.baseLength,70))*e/100,i=v(n(f.rearLength,10))*e/100,m=f.baseWidth||3,h=f.topWidth||1;d.shapeType="path";d.shapeArgs={d:f.path||["M",-i,-m/2,"L",g,-m/2,e,-h/2,e,h/2,g,m/2,-i,m/2,"z"],translateX:c[0],translateY:c[1],rotation:(b.startAngleRad+
27
+ b.translate(d.y))*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,f=d.pivot,e=d.dial;p(a.points,function(b){var c=b.graphic,d=b.shapeArgs,f=d.d;c?(c.animate(d),d.d=f):b.graphic=a.chart.renderer[b.shapeType](d).attr({stroke:e.borderColor||"none","stroke-width":e.borderWidth||0,fill:e.backgroundColor||"black",rotation:d.rotation}).add(a.group)});c?c.animate({cx:b[0],cy:b[1]}):a.pivot=a.chart.renderer.circle(b[0],b[1],n(f.radius,5)).attr({"stroke-width":f.borderWidth||
28
+ 0,stroke:f.borderColor||"silver",fill:f.backgroundColor||"black"}).add(a.group)},animate:function(){var a=this;p(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);k.pie.prototype.render.call(this);this.group.clip(this.chart.clipRect)},setData:k.pie.prototype.setData,
29
+ drawTracker:k.column.prototype.drawTracker};k.gauge=h.extendClass(k.line,j);j=y.prototype;w=h.MouseTracker.prototype;j.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(k.area.prototype,"init",A);l(k.areaspline.prototype,"init",A);l(k.spline.prototype,"getPointSpline",function(a,b,c,d){var f,e,g,i,h,k,j;if(this.chart.polar){f=
30
+ c.plotX;e=c.plotY;a=b[d-1];g=b[d+1];this.connectEnds&&(a||(a=b[b.length-2]),g||(g=b[1]));if(a&&g)i=a.plotX,h=a.plotY,b=g.plotX,k=g.plotY,i=(1.5*f+i)/2.5,h=(1.5*e+h)/2.5,g=(1.5*f+b)/2.5,j=(1.5*e+k)/2.5,b=Math.sqrt(Math.pow(i-f,2)+Math.pow(h-e,2)),k=Math.sqrt(Math.pow(g-f,2)+Math.pow(j-e,2)),i=Math.atan2(h-e,i-f),h=Math.atan2(j-e,g-f),j=Math.PI/2+(i+h)/2,Math.abs(i-j)>Math.PI/2&&(j-=Math.PI),i=f+Math.cos(j)*b,h=e+Math.sin(j)*b,g=f+Math.cos(Math.PI+j)*k,j=e+Math.sin(Math.PI+j)*k,c.rightContX=g,c.rightContY=
31
+ j;d?(c=["C",a.rightContX||a.plotX,a.rightContY||a.plotY,i||f,h||e,f,e],a.rightContX=a.rightContY=null):c=["M",f,e]}else c=a.call(this,b,c,d);return c});l(j,"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(j,"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,
32
+ b)});l(j,"animate",B);l(r,"animate",B);l(j,"setTooltipPoints",function(a,b){this.chart.polar&&u(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,f=b.startAngleRad,e=this.chart.renderer,g;this.preventPostTranslate=!0;a.call(this);if(b.isRadial){a=this.points;for(g=a.length;g--;)b=a[g],b.shapeType="path",b.shapeArgs={d:e.symbols.arc(d[0],d[1],c-b.plotY,null,{start:f+b.barX,end:f+b.barX+b.pointWidth,innerR:c-
33
+ n(b.yBottom,c)})},this.toXY(b)}});l(w,"getIndex",function(a,b){var c,d=this.chart,f;d.polar?(f=d.xAxis[0].center,c=b.chartX-f[0]-d.plotLeft,d=b.chartY-f[1]-d.plotTop,c=180-Math.round(Math.atan2(c,d)/Math.PI*180)):c=a.call(this,b);return c});l(w,"getMouseCoordinates",function(a,b){var c=this.chart,d={xAxis:[],yAxis:[]};c.polar?p(c.axes,function(a){var e=a.isXAxis,g=a.center,h=b.chartX-g[0]-c.plotLeft,g=b.chartY-g[1]-c.plotTop;d[e?"xAxis":"yAxis"].push({axis:a,value:a.translate(e?Math.PI-Math.atan2(h,
34
+ g):Math.sqrt(Math.pow(h,2)+Math.pow(g,2)),!0)})}):d=a.call(this,b);return d})})(Highcharts);