kendo.dataviz.chart.polar.min.js
28.2 KB
/**
* Kendo UI v2016.1.112 (http://www.telerik.com/kendo-ui)
* Copyright 2016 Telerik AD. All rights reserved.
*
* Kendo UI commercial licenses may be obtained at
* http://www.telerik.com/purchase/license-agreement/kendo-ui-complete
* If you do not own a commercial license, this file shall be governed by the trial license terms.
*/
!function(e,define){define("util/main.min",["kendo.core.min"],e)}(function(){return function(){function e(e){return typeof e!==N}function n(e,n){var i=t(n);return T.round(e*i)/i}function t(e){return e?T.pow(10,e):1}function i(e,n,t){return T.max(T.min(e,t),n)}function r(e){return e*R}function o(e){return e/R}function a(e){return"number"==typeof e&&!isNaN(e)}function s(n,t){return e(n)?n:t}function l(e){return e*e}function u(e){var n,t=[];for(n in e)t.push(n+e[n]);return t.sort().join("")}function c(e){var n,t=2166136261;for(n=0;e.length>n;++n)t+=(t<<1)+(t<<4)+(t<<7)+(t<<8)+(t<<24),t^=e.charCodeAt(n);return t>>>0}function h(e){return c(u(e))}function d(e){var n,t=e.length,i=U,r=O;for(n=0;t>n;n++)r=T.max(r,e[n]),i=T.min(i,e[n]);return{min:i,max:r}}function p(e){return d(e).min}function f(e){return d(e).max}function g(e){return m(e).min}function x(e){return m(e).max}function m(e){var n,t,i,r=U,o=O;for(n=0,t=e.length;t>n;n++)i=e[n],null!==i&&isFinite(i)&&(r=T.min(r,i),o=T.max(o,i));return{min:r===U?void 0:r,max:o===O?void 0:o}}function v(e){return e?e[e.length-1]:void 0}function A(e,n){return e.push.apply(e,n),e}function y(e){return B.template(e,{useWithBlock:!1,paramName:"d"})}function w(n,t){return e(t)&&null!==t?" "+n+"='"+t+"' ":""}function b(e){var n,t="";for(n=0;e.length>n;n++)t+=w(e[n][0],e[n][1]);return t}function C(n){var t,i,r="";for(t=0;n.length>t;t++)i=n[t][1],e(i)&&(r+=n[t][0]+":"+i+";");return""!==r?r:void 0}function L(e){return"string"!=typeof e&&(e+="px"),e}function k(e){var n,t,i=[];if(e)for(n=B.toHyphens(e).split("-"),t=0;n.length>t;t++)i.push("k-pos-"+n[t]);return i.join(" ")}function S(n){return""===n||null===n||"none"===n||"transparent"===n||!e(n)}function _(e){for(var n={1:"i",10:"x",100:"c",2:"ii",20:"xx",200:"cc",3:"iii",30:"xxx",300:"ccc",4:"iv",40:"xl",400:"cd",5:"v",50:"l",500:"d",6:"vi",60:"lx",600:"dc",7:"vii",70:"lxx",700:"dcc",8:"viii",80:"lxxx",800:"dccc",9:"ix",90:"xc",900:"cm",1e3:"m"},t=[1e3,900,800,700,600,500,400,300,200,100,90,80,70,60,50,40,30,20,10,9,8,7,6,5,4,3,2,1],i="";e>0;)t[0]>e?t.shift():(i+=n[t[0]],e-=t[0]);return i}function j(e){var n,t,i,r,o;for(e=e.toLowerCase(),n={i:1,v:5,x:10,l:50,c:100,d:500,m:1e3},t=0,i=0,r=0;e.length>r;++r){if(o=n[e.charAt(r)],!o)return null;t+=o,o>i&&(t-=2*i),i=o}return t}function G(e){var n=Object.create(null);return function(){var t,i="";for(t=arguments.length;--t>=0;)i+=":"+arguments[t];return i in n?n[i]:e.apply(this,arguments)}}function P(e){for(var n,t,i=[],r=0,o=e.length;o>r;)n=e.charCodeAt(r++),n>=55296&&56319>=n&&o>r?(t=e.charCodeAt(r++),56320==(64512&t)?i.push(((1023&n)<<10)+(1023&t)+65536):(i.push(n),r--)):i.push(n);return i}function M(e){return e.map(function(e){var n="";return e>65535&&(e-=65536,n+=String.fromCharCode(e>>>10&1023|55296),e=56320|1023&e),n+=String.fromCharCode(e)}).join("")}var T=Math,B=window.kendo,V=B.deepExtend,R=T.PI/180,U=Number.MAX_VALUE,O=-Number.MAX_VALUE,N="undefined",z=Date.now;z||(z=function(){return(new Date).getTime()}),V(B,{util:{MAX_NUM:U,MIN_NUM:O,append:A,arrayLimits:d,arrayMin:p,arrayMax:f,defined:e,deg:o,hashKey:c,hashObject:h,isNumber:a,isTransparent:S,last:v,limitValue:i,now:z,objectKey:u,round:n,rad:r,renderAttr:w,renderAllAttr:b,renderPos:k,renderSize:L,renderStyle:C,renderTemplate:y,sparseArrayLimits:m,sparseArrayMin:g,sparseArrayMax:x,sqr:l,valueOrDefault:s,romanToArabic:j,arabicToRoman:_,memoize:G,ucs2encode:M,ucs2decode:P}}),B.drawing.util=B.util,B.dataviz.util=B.util}(),window.kendo},"function"==typeof define&&define.amd?define:function(e,n,t){(t||n)()}),function(e,define){define("util/text-metrics",["kendo.core","util/main"],e)}(function(){!function(e){function n(e,n,t){return u.current.measure(e,n,t)}var t=document,i=window.kendo,r=i.Class,o=i.util,a=o.defined,s=r.extend({init:function(e){this._size=e,this._length=0,this._map={}},put:function(e,n){var t=this,i=t._map,r={key:e,value:n};i[e]=r,t._head?(t._tail.newer=r,r.older=t._tail,t._tail=r):t._head=t._tail=r,t._length>=t._size?(i[t._head.key]=null,t._head=t._head.newer,t._head.older=null):t._length++},get:function(e){var n=this,t=n._map[e];return t?(t===n._head&&t!==n._tail&&(n._head=t.newer,n._head.older=null),t!==n._tail&&(t.older&&(t.older.newer=t.newer,t.newer.older=t.older),t.older=n._tail,t.newer=null,n._tail.newer=t,n._tail=t),t.value):void 0}}),l=e("<div style='position: absolute !important; top: -4000px !important; width: auto !important; height: auto !important;padding: 0 !important; margin: 0 !important; border: 0 !important;line-height: normal !important; visibility: hidden !important; white-space: nowrap!important;' />")[0],u=r.extend({init:function(e){this._cache=new s(1e3),this._initOptions(e)},options:{baselineMarkerSize:1},measure:function(n,i,r){var s,u,c,h,d,p=o.objectKey(i),f=o.hashKey(n+p),g=this._cache.get(f);if(g)return g;s={width:0,height:0,baseline:0},u=r?r:l,c=this._baselineMarker().cloneNode(!1);for(h in i)d=i[h],a(d)&&(u.style[h]=d);return e(u).text(n),u.appendChild(c),t.body.appendChild(u),(n+"").length&&(s.width=u.offsetWidth-this.options.baselineMarkerSize,s.height=u.offsetHeight,s.baseline=c.offsetTop+this.options.baselineMarkerSize),s.width>0&&s.height>0&&this._cache.put(f,s),u.parentNode.removeChild(u),s},_baselineMarker:function(){return e("<div class='k-baseline-marker' style='display: inline-block; vertical-align: baseline;width: "+this.options.baselineMarkerSize+"px; height: "+this.options.baselineMarkerSize+"px;overflow: hidden;' />")[0]}});u.current=new u,i.util.TextMetrics=u,i.util.LRUCache=s,i.util.measureText=n}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,n,t){(t||n)()}),function(e,define){define("util/base64.min",["util/main.min"],e)}(function(){return function(){function e(e){var t,i,r,a,s,l,u,c="",h=0;for(e=n(e);e.length>h;)t=e.charCodeAt(h++),i=e.charCodeAt(h++),r=e.charCodeAt(h++),a=t>>2,s=(3&t)<<4|i>>4,l=(15&i)<<2|r>>6,u=63&r,isNaN(i)?l=u=64:isNaN(r)&&(u=64),c=c+o.charAt(a)+o.charAt(s)+o.charAt(l)+o.charAt(u);return c}function n(e){var n,t,i="";for(n=0;e.length>n;n++)t=e.charCodeAt(n),128>t?i+=r(t):2048>t?(i+=r(192|t>>>6),i+=r(128|63&t)):65536>t&&(i+=r(224|t>>>12),i+=r(128|t>>>6&63),i+=r(128|63&t));return i}var t=window.kendo,i=t.deepExtend,r=String.fromCharCode,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";i(t.util,{encodeBase64:e,encodeUTF8:n})}(),window.kendo},"function"==typeof define&&define.amd?define:function(e,n,t){(t||n)()}),function(e,define){define("mixins/observers.min",["kendo.core.min"],e)}(function(){return function(e){var n=Math,t=window.kendo,i=t.deepExtend,r=e.inArray,o={observers:function(){return this._observers=this._observers||[]},addObserver:function(e){return this._observers?this._observers.push(e):this._observers=[e],this},removeObserver:function(e){var n=this.observers(),t=r(e,n);return-1!=t&&n.splice(t,1),this},trigger:function(e,n){var t,i,r=this._observers;if(r&&!this._suspended)for(i=0;r.length>i;i++)t=r[i],t[e]&&t[e](n);return this},optionsChange:function(e){this.trigger("optionsChange",e)},geometryChange:function(e){this.trigger("geometryChange",e)},suspend:function(){return this._suspended=(this._suspended||0)+1,this},resume:function(){return this._suspended=n.max((this._suspended||0)-1,0),this},_observerField:function(e,n){this[e]&&this[e].removeObserver(this),this[e]=n,n.addObserver(this)}};i(t,{mixins:{ObserversMixin:o}})}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,n,t){(t||n)()}),function(e,define){define("kendo.dataviz.chart.polar.min",["kendo.dataviz.chart.min","kendo.drawing.min"],e)}(function(){return function(e,n){function t(e,n){return e.value.x-n.value.x}function i(e,n){return 180-L.abs(L.abs(e-n)-180)}var r,o,a,s,l,u,c,h,d,p,f,g,x,m,v,A,y,w,b,C,L=Math,k=window.kendo,S=k.deepExtend,_=k.util,j=_.append,G=k.drawing,P=k.geometry,M=k.dataviz,T=M.AreaSegment,B=M.Axis,V=M.AxisGroupRangeTracker,R=M.BarChart,U=M.Box2D,O=M.CategoryAxis,N=M.CategoricalChart,z=M.CategoricalPlotArea,I=M.ChartElement,D=M.CurveProcessor,E=M.DonutSegment,X=M.LineChart,F=M.LineSegment,K=M.LogarithmicAxis,Y=M.NumericAxis,q=M.PlotAreaBase,Q=M.PlotAreaFactory,H=M.Point2D,W=M.Ring,J=M.ScatterChart,Z=M.ScatterLineChart,$=M.SeriesBinder,ee=M.ShapeBuilder,ne=M.SplineSegment,te=M.SplineAreaSegment,ie=M.getSpacing,re=M.filterSeriesByType,oe=_.limitValue,ae=M.round,se="arc",le="#000",ue=M.COORD_PRECISION,ce=.15,he=L.PI/180,de="gap",pe="interpolate",fe="log",ge="plotAreaClick",xe="polarArea",me="polarLine",ve="polarScatter",Ae="radarArea",ye="radarColumn",we="radarLine",be="smooth",Ce="x",Le="y",ke="zero",Se=[xe,me,ve],_e=[Ae,ye,we],je={createGridLines:function(e){var n,t,i=this,r=i.options,o=L.abs(i.box.center().y-e.lineBox().y1),a=!1,s=[];return r.majorGridLines.visible&&(n=i.majorGridLineAngles(e),a=!0,s=i.renderMajorGridLines(n,o,r.majorGridLines)),r.minorGridLines.visible&&(t=i.minorGridLineAngles(e,a),j(s,i.renderMinorGridLines(t,o,r.minorGridLines,e,a))),s},renderMajorGridLines:function(e,n,t){return this.renderGridLines(e,n,t)},renderMinorGridLines:function(e,n,t,i,r){var o=this.radiusCallback&&this.radiusCallback(n,i,r);return this.renderGridLines(e,n,t,o)},renderGridLines:function(e,n,t,i){var r,o,a={stroke:{width:t.width,color:t.color,dashType:t.dashType}},s=this.box.center(),l=new P.Circle([s.x,s.y],n),u=this.gridLinesVisual();for(r=0;e.length>r;r++)o=new G.Path(a),i&&(l.radius=i(e[r])),o.moveTo(l.center).lineTo(l.pointAt(e[r])),u.append(o);return u.children},gridLineAngles:function(t,i,r,o,a){var s=this,l=s.intervals(i,r,o,a),u=t.options,c=u.visible&&(u.line||{}).visible!==!1;return e.map(l,function(e){var t=s.intervalAngle(e);return c&&90===t?n:t})}},Ge=O.extend({options:{startAngle:90,labels:{margin:ie(10)},majorGridLines:{visible:!0},justified:!0},range:function(){return{min:0,max:this.options.categories.length}},reflow:function(e){this.box=e,this.reflowLabels()},lineBox:function(){return this.box},reflowLabels:function(){var e,n,t=this,i=t.options.labels,r=i.skip||0,o=i.step||1,a=new U,s=t.labels;for(n=0;s.length>n;n++)s[n].reflow(a),e=s[n].box,s[n].reflow(t.getSlot(r+n*o).adjacentBox(0,e.width(),e.height()))},intervals:function(e,n,t,i){var r,o=this,a=o.options,s=a.categories.length,l=0,u=s/e||1,c=360/u,h=[];for(n=n||0,t=t||1,r=n;u>r;r+=t)l=a.reverse?360-r*c:r*c,l=ae(l,ue)%360,i&&M.inArray(l,i)||h.push(l);return h},majorIntervals:function(){return this.intervals(1)},minorIntervals:function(){return this.intervals(.5)},intervalAngle:function(e){return(360+e+this.options.startAngle)%360},majorAngles:function(){return e.map(this.majorIntervals(),e.proxy(this.intervalAngle,this))},createLine:function(){return[]},majorGridLineAngles:function(e){var n=this.options.majorGridLines;return this.gridLineAngles(e,1,n.skip,n.step)},minorGridLineAngles:function(e,n){var t=this.options,i=t.minorGridLines,r=t.majorGridLines,o=n?this.intervals(1,r.skip,r.step):null;return this.gridLineAngles(e,.5,i.skip,i.step,o)},radiusCallback:function(e,t,i){var r,o,a,s;return t.options.type!==se?(r=360/(2*this.options.categories.length),o=L.cos(r*he)*e,a=this.majorAngles(),s=function(n){return!i&&M.inArray(n,a)?e:o}):n},createPlotBands:function(){var e,n,t,i,r,o,a,s=this,l=s.options,u=l.plotBands||[],c=this._plotbandGroup=new G.Group({zIndex:-1});for(e=0;u.length>e;e++)n=u[e],t=s.plotBandSlot(n),i=s.getSlot(n.from),r=n.from-L.floor(n.from),t.startAngle+=r*i.angle,o=L.ceil(n.to)-n.to,t.angle-=(o+r)*i.angle,a=ee.current.createRing(t,{fill:{color:n.color,opacity:n.opacity},stroke:{opacity:n.opacity}}),c.append(a);s.appendVisual(c)},plotBandSlot:function(e){return this.getSlot(e.from,e.to-1)},getSlot:function(e,n){var t,i,r,o=this,a=o.options,s=a.justified,l=o.box,u=o.majorAngles(),c=u.length,h=360/c;return a.reverse&&!s&&(e=(e+1)%c),e=oe(L.floor(e),0,c-1),i=u[e],s&&(i-=h/2,0>i&&(i+=360)),n=oe(L.ceil(n||e),e,c-1),t=n-e+1,r=h*t,new W(l.center(),0,l.height()/2,i,r)},slot:function(e,n){var t=this.getSlot(e,n),i=t.startAngle+180,r=i+t.angle;return new P.Arc([t.c.x,t.c.y],{startAngle:i,endAngle:r,radiusX:t.r,radiusY:t.r})},pointCategoryIndex:function(e){var n,t,i=this,r=null,o=i.options.categories.length;for(n=0;o>n;n++)if(t=i.getSlot(n),t.containsPoint(e)){r=n;break}return r}});S(Ge.fn,je),r={options:{majorGridLines:{visible:!0}},createPlotBands:function(){var e,n,t,i,r,o,a=this,s=a.options,l=s.plotBands||[],u=s.majorGridLines.type,c=a.plotArea.polarAxis,h=c.majorAngles(),d=c.box.center(),p=this._plotbandGroup=new G.Group({zIndex:-1});for(e=0;l.length>e;e++)n=l[e],t={fill:{color:n.color,opacity:n.opacity},stroke:{opacity:n.opacity}},i=a.getSlot(n.from,n.to,!0),r=new W(d,d.y-i.y2,d.y-i.y1,0,360),o=u===se?ee.current.createRing(r,t):G.Path.fromPoints(a.plotBandPoints(r,h),t).close(),p.append(o);a.appendVisual(p)},plotBandPoints:function(e,n){var t,i=[],r=[],o=[e.c.x,e.c.y],a=new P.Circle(o,e.ir),s=new P.Circle(o,e.r);for(t=0;n.length>t;t++)i.push(a.pointAt(n[t])),r.push(s.pointAt(n[t]));return i.reverse(),i.push(i[0]),r.push(r[0]),r.concat(i)},createGridLines:function(e){var n,t=this,i=t.options,r=t.radarMajorGridLinePositions(),o=e.majorAngles(),a=e.box.center(),s=[];return i.majorGridLines.visible&&(s=t.renderGridLines(a,r,o,i.majorGridLines)),i.minorGridLines.visible&&(n=t.radarMinorGridLinePositions(),j(s,t.renderGridLines(a,n,o,i.minorGridLines))),s},renderGridLines:function(e,n,t,i){var r,o,a,s,l,u={stroke:{width:i.width,color:i.color,dashType:i.dashType}},c=this.gridLinesVisual();for(o=0;n.length>o;o++)if(r=e.y-n[o],r>0)if(s=new P.Circle([e.x,e.y],r),i.type===se)c.append(new G.Circle(s,u));else{for(l=new G.Path(u),a=0;t.length>a;a++)l.lineTo(s.pointAt(t[a]));l.close(),c.append(l)}return c.children},getValue:function(e){var n,t,r,o,a,s,l,u=this,c=u.options,h=u.lineBox(),d=u.plotArea.polarAxis,p=d.majorAngles(),f=d.box.center(),g=e.distanceTo(f),x=g;return c.majorGridLines.type!==se&&p.length>1&&(n=e.x-f.x,t=e.y-f.y,r=(L.atan2(t,n)/he+540)%360,p.sort(function(e,n){return i(e,r)-i(n,r)}),o=i(p[0],p[1])/2,a=i(r,p[0]),s=90-o,l=180-a-s,x=g*(L.sin(l*he)/L.sin(s*he))),u.axisType().fn.getValue.call(u,new H(h.x1,h.y2-x))}},o=Y.extend({radarMajorGridLinePositions:function(){return this.getTickPositions(this.options.majorUnit)},radarMinorGridLinePositions:function(){var e=this,n=e.options,t=0;return n.majorGridLines.visible&&(t=n.majorUnit),e.getTickPositions(n.minorUnit,t)},axisType:function(){return Y}}),S(o.fn,r),a=K.extend({radarMajorGridLinePositions:function(){var e=this,n=[];return e.traverseMajorTicksPositions(function(e){n.push(e)},e.options.majorGridLines),n},radarMinorGridLinePositions:function(){var e=this,n=[];return e.traverseMinorTicksPositions(function(e){n.push(e)},e.options.minorGridLines),n},axisType:function(){return K}}),S(a.fn,r),s=B.extend({init:function(e){var n=this;B.fn.init.call(n,e),e=n.options,e.minorUnit=e.minorUnit||n.options.majorUnit/2},options:{type:"polar",startAngle:0,reverse:!1,majorUnit:60,min:0,max:360,labels:{margin:ie(10)},majorGridLines:{color:le,visible:!0,width:1},minorGridLines:{color:"#aaa"}},getDivisions:function(e){return Y.fn.getDivisions.call(this,e)-1},reflow:function(e){this.box=e,this.reflowLabels()},reflowLabels:function(){var e,n,t=this,i=t.options,r=i.labels,o=r.skip||0,a=r.step||1,s=new U,l=t.intervals(i.majorUnit,o,a),u=t.labels;for(n=0;u.length>n;n++)u[n].reflow(s),e=u[n].box,u[n].reflow(t.getSlot(l[n]).adjacentBox(0,e.width(),e.height()))},lineBox:function(){return this.box},intervals:function(e,n,t,i){var r,o,a=this,s=a.options,l=a.getDivisions(e),u=s.min,c=[];for(n=n||0,t=t||1,o=n;l>o;o+=t)r=(360+u+o*e)%360,i&&M.inArray(r,i)||c.push(r);return c},majorIntervals:function(){return this.intervals(this.options.majorUnit)},minorIntervals:function(){return this.intervals(this.options.minorUnit)},intervalAngle:function(e){return(540-e-this.options.startAngle)%360},majorAngles:Ge.fn.majorAngles,createLine:function(){return[]},majorGridLineAngles:function(e){var n=this.options.majorGridLines;return this.gridLineAngles(e,this.options.majorUnit,n.skip,n.step)},minorGridLineAngles:function(e,n){var t=this.options,i=t.minorGridLines,r=t.majorGridLines,o=n?this.intervals(t.majorUnit,r.skip,r.step):null;return this.gridLineAngles(e,this.options.minorUnit,i.skip,i.step,o)},createPlotBands:Ge.fn.createPlotBands,plotBandSlot:function(e){return this.getSlot(e.from,e.to)},getSlot:function(e,n){var t,i=this,r=i.options,o=r.startAngle,a=i.box;return e=oe(e,r.min,r.max),n=oe(n||e,e,r.max),r.reverse&&(e*=-1,n*=-1),e=(540-e-o)%360,n=(540-n-o)%360,e>n&&(t=e,e=n,n=t),new W(a.center(),0,a.height()/2,e,n-e)},slot:function(e,n){var t,i,r,o,a=this.options,s=360-a.startAngle,l=this.getSlot(e,n);return M.util.defined(n)||(n=e),r=L.min(e,n),o=L.max(e,n),a.reverse?(t=r,i=o):(t=360-o,i=360-r),t=(t+s)%360,i=(i+s)%360,new P.Arc([l.c.x,l.c.y],{startAngle:t,endAngle:i,radiusX:l.r,radiusY:l.r})},getValue:function(e){var n=this,t=n.options,i=n.box.center(),r=e.x-i.x,o=e.y-i.y,a=L.round(L.atan2(o,r)/he),s=t.startAngle;return t.reverse||(a*=-1,s*=-1),(a+s+360)%360},range:Y.fn.range,labelsCount:Y.fn.labelsCount,createAxisLabel:Y.fn.createAxisLabel}),S(s.fn,je),l=I.extend({options:{gap:1,spacing:0},reflow:function(e){var n,t,i=this,r=i.options,o=i.children,a=r.gap,s=r.spacing,l=o.length,u=l+a+s*(l-1),c=e.angle/u,h=e.startAngle+c*(a/2);for(t=0;l>t;t++)n=e.clone(),n.startAngle=h,n.angle=c,o[t].sector&&(n.r=o[t].sector.r),o[t].reflow(n),o[t].sector=n,h+=c+c*s}}),u=I.extend({reflow:function(e){var n,t,i=this,r=i.options.isReversed,o=i.children,a=o.length,s=r?a-1:0,l=r?-1:1;for(i.box=new U,t=s;t>=0&&a>t;t+=l)n=o[t].sector,n.startAngle=e.startAngle,n.angle=e.angle}}),c=E.extend({init:function(e,n){E.fn.init.call(this,e,null,n)},options:{overlay:{gradient:null},labels:{distance:10}}}),h=R.extend({pointType:function(){return c},clusterType:function(){return l},stackType:function(){return u},categorySlot:function(e,n){return e.getSlot(n)},pointSlot:function(e,n){var t=e.clone(),i=e.c.y;return t.r=i-n.y1,t.ir=i-n.y2,t},reflow:N.fn.reflow,reflowPoint:function(e,n){e.sector=n,e.reflow()},options:{clip:!1,animation:{type:"pie"}},createAnimation:function(){this.options.animation.center=this.box.toRect().center(),R.fn.createAnimation.call(this)}}),d=X.extend({options:{clip:!1},pointSlot:function(e,n){var t=e.c.y-n.y1,i=H.onCircle(e.c,e.middle(),t);return new U(i.x,i.y,i.x,i.y)},createSegment:function(e,n,t){var i,r,o=n.style;return r=o==be?ne:F,i=new r(e,n,t),e.length===n.data.length&&(i.options.closed=!0),i}}),p=T.extend({points:function(){return F.fn.points.call(this,this.stackPoints)}}),f=te.extend({closeFill:e.noop}),g=d.extend({createSegment:function(e,n,t,i){var r,o,a=this,s=a.options,l=s.isStacked,u=(n.line||{}).style;return u===be?(o=new f(e,i,l,n,t),o.options.closed=!0):(l&&t>0&&i&&(r=i.linePoints.slice(0).reverse()),e.push(e[0]),o=new p(e,r,n,t)),o},seriesMissingValues:function(e){return e.missingValues||ke}}),x=J.extend({pointSlot:function(e,n){var t=e.c.y-n.y1,i=H.onCircle(e.c,e.startAngle,t);return new U(i.x,i.y,i.x,i.y)},options:{clip:!1}}),m=Z.extend({pointSlot:x.fn.pointSlot,options:{clip:!1}}),v=T.extend({points:function(){var e=this,n=e.parent,t=n.plotArea,i=t.polarAxis,r=i.box.center(),o=e.stackPoints,a=F.fn.points.call(e,o);return a.unshift([r.x,r.y]),a.push([r.x,r.y]),a}}),A=te.extend({closeFill:function(e){var n=this._polarAxisCenter();e.lineTo(n.x,n.y)},_polarAxisCenter:function(){var e=this.parent,n=e.plotArea,t=n.polarAxis,i=t.box.center();return i},strokeSegments:function(){var e,n,t,i=this._strokeSegments;return i||(e=this._polarAxisCenter(),n=new D(!1),t=F.fn.points.call(this),t.push(e),i=this._strokeSegments=n.process(t),i.pop()),i}}),y=m.extend({createSegment:function(e,n,t){var i,r=(n.line||{}).style;return i=r==be?new A(e,null,!1,n,t):new v(e,[],n,t)},createMissingValue:function(e,n){var t;return M.hasValue(e.x)&&n!=pe&&(t={x:e.x,y:e.y},n==ke&&(t.y=0)),t},seriesMissingValues:function(e){return e.missingValues||ke},_hasMissingValuesGap:function(){var e,n=this.options.series;for(e=0;n.length>e;e++)if(this.seriesMissingValues(n[e])===de)return!0},sortPoints:function(e){var n,i,r;if(e.sort(t),this._hasMissingValuesGap())for(r=0;e.length>r;r++)i=e[r],i&&(n=i.value,M.hasValue(n.y)||this.seriesMissingValues(i.series)!==de||delete e[r]);return e}}),w=q.extend({init:function(e,n){var t=this;t.valueAxisRangeTracker=new V,q.fn.init.call(t,e,n)},render:function(){var e=this;e.addToLegend(e.series),e.createPolarAxis(),e.createCharts(),e.createValueAxis()},alignAxes:function(){var e=this.valueAxis,n=e.range(),t=e.options.reverse?n.max:n.min,i=e.getSlot(t),r=this.polarAxis.getSlot(0).c,o=e.box.translate(r.x-i.x1,r.y-i.y1);e.reflow(o)},createValueAxis:function(){var e,n,t,i,r=this,s=r.valueAxisRangeTracker,l=s.query(),u=r.valueAxisOptions({roundToMajorUnit:!1,zIndex:-1});u.type===fe?(t=a,i={min:.1,max:1}):(t=o,i={min:0,max:1}),e=s.query(name)||l||i,e&&l&&(e.min=L.min(e.min,l.min),e.max=L.max(e.max,l.max)),n=new t(e.min,e.max,u),r.valueAxis=n,r.appendAxis(n)},reflowAxes:function(){var e,n=this,t=n.options.plotArea,i=n.valueAxis,r=n.polarAxis,o=n.box,a=L.min(o.width(),o.height())*ce,s=ie(t.padding||{},a),l=o.clone().unpad(s),u=l.clone().shrink(0,l.height()/2);r.reflow(l),i.reflow(u),e=i.lineBox().height()-i.box.height(),i.reflow(i.box.unpad({top:e})),n.axisBox=l,n.alignAxes(l)},backgroundBox:function(){return this.box}}),b=w.extend({options:{categoryAxis:{categories:[]},valueAxis:{}},createPolarAxis:function(){var e,n=this;e=new Ge(n.options.categoryAxis),n.polarAxis=e,n.categoryAxis=e,n.appendAxis(e)},valueAxisOptions:function(e){var n=this;return n._hasBarCharts&&S(e,{majorGridLines:{type:se},minorGridLines:{type:se}}),n._isStacked100&&S(e,{roundToMajorUnit:!1,labels:{format:"P0"}}),S(e,n.options.valueAxis)},appendChart:z.fn.appendChart,createCharts:function(){var e=this,n=e.filterVisibleSeries(e.series),t=e.panes[0];e.createAreaChart(re(n,[Ae]),t),e.createLineChart(re(n,[we]),t),e.createBarChart(re(n,[ye]),t)},chartOptions:function(e){var n,t,i={series:e},r=e[0];return r&&(n=this.filterVisibleSeries(e),t=r.stack,i.isStacked=t&&n.length>1,i.isStacked100=t&&"100%"===t.type&&n.length>1,i.isStacked100&&(this._isStacked100=!0)),i},createAreaChart:function(e,n){if(0!==e.length){var t=new g(this,this.chartOptions(e));this.appendChart(t,n)}},createLineChart:function(e,n){if(0!==e.length){var t=new d(this,this.chartOptions(e));this.appendChart(t,n)}},createBarChart:function(e,n){var t,i,r;0!==e.length&&(t=e[0],i=this.chartOptions(e),i.gap=t.gap,i.spacing=t.spacing,r=new h(this,i),this.appendChart(r,n),this._hasBarCharts=!0)},seriesCategoryAxis:function(){return this.categoryAxis},click:function(n,t){var i,r,o=this,a=n._eventCoordinates(t),s=new H(a.x,a.y);i=o.categoryAxis.getCategory(s),r=o.valueAxis.getValue(s),null!==i&&null!==r&&n.trigger(ge,{element:e(t.target),category:i,value:r})},createCrosshairs:e.noop}),C=w.extend({options:{xAxis:{},yAxis:{}},createPolarAxis:function(){var e,n=this;e=new s(n.options.xAxis),n.polarAxis=e,n.axisX=e,n.appendAxis(e)},valueAxisOptions:function(e){var n=this;return S(e,{majorGridLines:{type:se},minorGridLines:{type:se}},n.options.yAxis)},createValueAxis:function(){var e=this;w.fn.createValueAxis.call(e),e.axisY=e.valueAxis},appendChart:function(e,n){var t=this;t.valueAxisRangeTracker.update(e.yAxisRanges),q.fn.appendChart.call(t,e,n)},createCharts:function(){var e=this,n=e.filterVisibleSeries(e.series),t=e.panes[0];e.createLineChart(re(n,[me]),t),e.createScatterChart(re(n,[ve]),t),e.createAreaChart(re(n,[xe]),t)},createLineChart:function(e,n){if(0!==e.length){var t=this,i=new m(t,{series:e});t.appendChart(i,n)}},createScatterChart:function(e,n){if(0!==e.length){var t=this,i=new x(t,{series:e});t.appendChart(i,n)}},createAreaChart:function(e,n){if(0!==e.length){var t=this,i=new y(t,{series:e});t.appendChart(i,n)}},click:function(n,t){var i,r,o=this,a=n._eventCoordinates(t),s=new H(a.x,a.y);i=o.axisX.getValue(s),r=o.axisY.getValue(s),null!==i&&null!==r&&n.trigger(ge,{element:e(t.target),x:i,y:r})},createCrosshairs:e.noop}),Q.current.register(C,Se),Q.current.register(b,_e),$.current.register(Se,[Ce,Le],["color"]),$.current.register(_e,["value"],["color"]),M.DefaultAggregates.current.register(_e,{value:"max",color:"first"}),S(M,{PolarAreaChart:y,PolarAxis:s,PolarLineChart:m,PolarPlotArea:C,RadarAreaChart:g,RadarBarChart:h,RadarCategoryAxis:Ge,RadarClusterLayout:l,RadarLineChart:d,RadarNumericAxis:o,RadarPlotArea:b,SplinePolarAreaSegment:A,SplineRadarAreaSegment:f,RadarStackLayout:u})}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,n,t){(t||n)()});
//# sourceMappingURL=kendo.dataviz.chart.polar.min.js.map