mesa-fab-approval/Fab2ApprovalSystem/Scripts/kendo/kendo.dataviz.chart.polar.min.js
Jonathan Ouellette 580e90f6a2 initial add
2022-09-27 14:10:30 -07:00

10 lines
14 KiB
JavaScript

/*
* Kendo UI Complete v2013.3.1119 (http://kendoui.com)
* Copyright 2013 Telerik AD. All rights reserved.
*
* Kendo UI Complete commercial licenses may be obtained at
* https://www.kendoui.com/purchase/license-agreement/kendo-ui-complete-commercial.aspx
* If you do not own a commercial license, this file shall be governed by the trial license terms.
*/
!function(define){return define(["./kendo.dataviz.chart.min"],function(){!function(e){function n(e,n){return e.value.x-n.value.x}function t(e,n){return 180-C.abs(C.abs(e-n)-180)}var r,i,o,a,s,l,c,u,h,p,f,g,d,x,m,A,v,y,C=Math,L=window.kendo,w=L.deepExtend,S=L.dataviz,b=S.AreaSegment,j=S.Axis,P=S.AxisGroupRangeTracker,k=S.BarChart,B=S.Box2D,G=S.CategoryAxis,V=S.CategoricalChart,R=S.CategoricalPlotArea,I=S.ChartElement,T=S.CurveProcessor,U=S.DonutSegment,O=S.LineChart,E=S.LineSegment,D=S.NumericAxis,z=S.PlotAreaBase,_=S.PlotAreaFactory,M=S.Point2D,N=S.Ring,q=S.ScatterChart,W=S.ScatterLineChart,X=S.SeriesBinder,Y=S.SplineSegment,F=S.SplineAreaSegment,Q=S.append,H=S.getSpacing,J=S.filterSeriesByType,K=S.limitValue,Z=S.round,$="arc",en="#000",nn=S.COORD_PRECISION,tn=.15,rn=C.PI/180,on="plotAreaClick",an="polarArea",sn="polarLine",ln="polarScatter",cn="radarArea",un="radarColumn",hn="radarLine",pn="smooth",fn="x",gn="y",dn="zero",xn=[an,sn,ln],mn=[cn,un,hn],An={renderGridLines:function(e,n){var t,r,i=this,o=i.options,a=C.abs(i.box.center().y-n.lineBox().y1),s=!1,l=[];return o.majorGridLines.visible&&(t=i.majorGridLineAngles(n),s=!0,l=i.gridLineElements(e,t,a,o.majorGridLines)),o.minorGridLines.visible&&(r=i.minorGridLineAngles(n,s),Q(l,i.gridLineElements(e,r,a,o.minorGridLines))),l},gridLineElements:function(e,n,t,r){var i,o,a,s=this,l=s.box.center(),c=s.plotArea.options.modelId,u=[];for(a={data:{modelId:c},zIndex:-1,strokeWidth:r.width,stroke:r.color,dashType:r.dashType},i=0;i<n.length;i++)o=M.onCircle(l,n[i],t),u.push(e.createLine(l.x,l.y,o.x,o.y,a));return u},gridLineAngles:function(n,t,r){var i=this,o=i.intervals(t,r);return e.map(o,function(e){var t=i.intervalAngle(e);return n.options.visible&&90===t?undefined:t})}},vn=G.extend({options:{startAngle:90,labels:{margin:H(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,r=new B,i=t.labels;for(n=0;n<i.length;n++)i[n].reflow(r),e=i[n].box,i[n].reflow(t.getSlot(n).adjacentBox(0,e.width(),e.height()))},intervals:function(e,n){var t,r=this,i=r.options,o=i.categories.length,a=0,s=0,l=o/e||1,c=360/l,u=[];for(n&&(s=360/(o/n)),t=0;l>t;t++)a=Z(a,nn),0!==a%s&&u.push(a%360),i.reverse?a=360+a-c:a+=c;return u},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))},renderLine:function(){return[]},majorGridLineAngles:function(e){return this.gridLineAngles(e,1)},minorGridLineAngles:function(e,n){return this.gridLineAngles(e,.5,n?1:0)},renderPlotBands:function(e){var n,t,r,i,o,a,s=this,l=s.options,c=l.plotBands||[],u=[];for(n=0;n<c.length;n++)t=c[n],r=s.plotBandSlot(t),i=s.getSlot(t.from),o=t.from-C.floor(t.from),r.startAngle+=o*i.angle,a=C.ceil(t.to)-t.to,r.angle-=(a+o)*i.angle,u.push(e.createSector(r,{fill:t.color,fillOpacity:t.opacity,strokeOpacity:t.opacity,zIndex:-1}));return u},plotBandSlot:function(e){return this.getSlot(e.from,e.to-1)},getSlot:function(e,n){var t,r,i,o=this,a=o.options,s=a.justified,l=o.box,c=o.majorAngles(),u=c.length,h=360/u;return a.reverse&&!s&&(e=(e+1)%u),e=K(C.floor(e),0,u-1),r=c[e],s&&(r-=h/2,0>r&&(r+=360)),n=K(C.ceil(n||e),e,u-1),t=n-e+1,i=h*t,new N(l.center(),0,l.height()/2,r,i)},pointCategoryIndex:function(e){var n,t,r=this,i=null,o=r.options.categories.length;for(n=0;o>n;n++)if(t=r.getSlot(n),t.containsPoint(e)){i=n;break}return i}});w(vn.fn,An),r=D.extend({options:{majorGridLines:{visible:!0}},renderPlotBands:function(e){var n,t,r,i,o,a=this,s=a.options,l=s.plotBands||[],c=[],u=s.majorGridLines.type,h=a.plotArea.polarAxis,p=h.majorAngles(),f=h.box.center();for(n=0;n<l.length;n++)t=l[n],r={fill:t.color,fillOpacity:t.opacity,strokeOpacity:t.opacity,zIndex:-1},i=a.getSlot(t.from,t.to),o=new N(f,f.y-i.y2,f.y-i.y1,0,360),c.push(u===$?e.createRing(o,r):e.createPolyline(a.plotBandPoints(o,p),!0,r));return c},plotBandPoints:function(e,n){var t,r=[],i=[];for(t=0;t<n.length;t++)r.push(M.onCircle(e.c,n[t],e.ir)),i.push(M.onCircle(e.c,n[t],e.r));return r.reverse(),r.push(r[0]),i.push(i[0]),i.concat(r)},renderGridLines:function(e,n){var t,r=this,i=r.options,o=r.getTickPositions(i.majorUnit),a=n.majorAngles(),s=0,l=n.box.center(),c=[];return i.majorGridLines.visible&&(s=i.majorUnit,c=r.gridLineElements(e,l,o,a,i.majorGridLines)),i.minorGridLines.visible&&(t=r.getTickPositions(i.minorUnit,s),Q(c,r.gridLineElements(e,l,t,a,i.minorGridLines))),c},gridLineElements:function(e,n,t,r,i){var o,a,s,l,c,u=this,h=u.plotArea.options.modelId,p=[];for(o={data:{modelId:h},zIndex:-1,strokeWidth:i.width,stroke:i.color,dashType:i.dashType},l=0;l<t.length;l++)if(s=n.y-t[l],s>0)if(i.type===$)p.push(e.createCircle(n,s,o));else{for(a=[],c=0;c<r.length;c++)a.push(M.onCircle(n,r[c],s));p.push(e.createPolyline(a,!0,o))}return p},getValue:function(e){var n,r,i,o,a,s,l,c=this,u=c.options,h=c.lineBox(),p=c.plotArea.polarAxis,f=p.majorAngles(),g=p.box.center(),d=e.distanceTo(g),x=d;return u.majorGridLines.type!==$&&f.length>1&&(n=e.x-g.x,r=e.y-g.y,i=(C.atan2(r,n)/rn+540)%360,f.sort(function(e,n){return t(e,i)-t(n,i)}),o=t(f[0],f[1])/2,a=t(i,f[0]),s=90-o,l=180-a-s,x=d*(C.sin(l*rn)/C.sin(s*rn))),D.fn.getValue.call(c,new M(h.x1,h.y2-x))}}),i=j.extend({init:function(e){var n=this;j.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:H(10)},majorGridLines:{color:en,visible:!0},minorGridLines:{color:"#aaa"}},getDivisions:function(e){return D.fn.getDivisions.call(this,e)-1},reflow:function(e){this.box=e,this.reflowLabels()},reflowLabels:function(){var e,n,t=this,r=new B,i=t.majorIntervals(),o=t.labels;for(n=0;n<o.length;n++)o[n].reflow(r),e=o[n].box,o[n].reflow(t.getSlot(i[n]).adjacentBox(0,e.width(),e.height()))},lineBox:function(){return this.box},intervals:function(e,n){var t,r=this,i=r.options,o=r.getDivisions(e),a=i.min,s=[];for(n&&(n/=e),t=0;o>t;t++)0!==t%n&&s.push((360+a)%360),a+=e;return s},majorIntervals:function(){return this.intervals(this.options.majorUnit)},minorIntervals:function(){return this.intervals(this.options.minorUnit)},intervalAngle:function(e){return(360+e-this.options.startAngle)%360},majorAngles:vn.fn.majorAngles,renderLine:function(){return[]},majorGridLineAngles:function(e){return this.gridLineAngles(e,this.options.majorUnit)},minorGridLineAngles:function(e,n){return this.gridLineAngles(e,this.options.minorUnit,n?this.options.majorUnit:0)},renderPlotBands:vn.fn.renderPlotBands,plotBandSlot:function(e){return this.getSlot(e.from,e.to)},getSlot:function(e,n){var t,r=this,i=r.options,o=i.startAngle,a=r.box;return e=K(e,i.min,i.max),n=K(n||e,e,i.max),i.reverse&&(e*=-1,n*=-1),e=(540-e-o)%360,n=(540-n-o)%360,e>n&&(t=e,e=n,n=t),new N(a.center(),0,a.height()/2,e,n-e)},getValue:function(e){var n=this,t=n.options,r=n.box.center(),i=e.x-r.x,o=e.y-r.y,a=C.round(C.atan2(o,i)/rn),s=t.startAngle;return t.reverse||(a*=-1,s*=-1),(a+s+360)%360},labelsCount:D.fn.labelsCount,createAxisLabel:D.fn.createAxisLabel}),w(i.fn,An),o=I.extend({options:{gap:1,spacing:0},reflow:function(e){var n,t,r=this,i=r.options,o=r.children,a=i.gap,s=i.spacing,l=o.length,c=l+a+s*(l-1),u=e.angle/c,h=e.startAngle+u*(a/2);for(t=0;l>t;t++)n=e.clone(),n.startAngle=h,n.angle=u,o[t].sector&&(n.r=o[t].sector.r),o[t].reflow(n),o[t].sector=n,h+=u+u*s}}),a=I.extend({reflow:function(e){var n,t,r,i=this,o=i.options.isReversed,a=i.children,s=a.length,l=o?s-1:0,c=o?-1:1;for(i.box=new B,r=l;r>=0&&s>r;r+=c)n=a[r].sector,n.startAngle=e.startAngle,n.angle=e.angle,r!==l&&(t=a[o?r+1:r-1].sector,n.ir=t.r,n.r+=n.ir)}}),s=U.extend({init:function(e,n){U.fn.init.call(this,e,null,n)},options:{overlay:{gradient:null},labels:{distance:10}}}),l=k.extend({pointType:function(){return s},clusterType:function(){return o},stackType:function(){return a},valueSlot:function(e,n){return e.getSlot(n)},categorySlot:function(e,n){return e.getSlot(n)},pointSlot:function(e,n){var t=e.clone(),r=e.c.y-n.y1;return t.r=r,t},reflow:V.fn.reflow,reflowPoint:function(e,n){e.sector=n,e.reflow()}}),c=O.extend({pointSlot:function(e,n){var t=e.c.y-n.y1,r=M.onCircle(e.c,e.middle(),t);return new B(r.x,r.y,r.x,r.y)},createSegment:function(e,n,t){var r,i,o=n.style;return i=o==pn?Y:E,r=new i(e,n,t),e.length===n.data.length&&(r.options.closed=!0),r}}),u=b.extend({points:function(){return E.fn.points.call(this,this.stackPoints)}}),h=F.extend({areaPoints:function(){return[]}}),p=c.extend({createSegment:function(e,n,t,r){var i,o,a=this,s=a.options,l=s.isStacked,c=(n.line||{}).style;return c===pn?(o=new h(e,r,l,n,t),o.options.closed=!0):(l&&t>0&&r&&(i=r.linePoints.slice(0).reverse()),e.push(e[0]),o=new u(e,i,n,t)),o},seriesMissingValues:function(e){return e.missingValues||dn}}),f=q.extend({pointSlot:function(e,n){var t=e.c.y-n.y1,r=M.onCircle(e.c,e.startAngle,t);return new B(r.x,r.y,r.x,r.y)}}),g=W.extend({pointSlot:f.fn.pointSlot}),d=b.extend({points:function(){var e=this,n=e.parent,t=n.plotArea,r=t.polarAxis,i=r.box.center(),o=e.stackPoints,a=E.fn.points.call(e,o);return a.unshift(i),a.push(i),a}}),x=F.extend({areaPoints:function(){var e=this,n=e.parent,t=n.plotArea,r=t.polarAxis,i=r.box.center();return[i]},points:function(){var e,n=this,t=n.parent,r=t.plotArea,i=r.polarAxis,o=i.box.center(),a=new T(!1),s=E.fn.points.call(this);return s.push(o),e=a.process(s),e.splice(e.length-3,e.length-1),n.curvePoints=e,e}}),m=g.extend({createSegment:function(e,n,t){var r,i=(n.line||{}).style;return r=i==pn?new x(e,null,!1,n,t):new d(e,[],n,t)},seriesMissingValues:function(e){return e.missingValues||dn},sortPoints:function(e){return e.sort(n)}}),A=z.extend({init:function(e,n){var t=this;t.valueAxisRangeTracker=new P,z.fn.init.call(t,e,n)},render:function(){var e=this;e.addToLegend(e.series),e.createPolarAxis(),e.createCharts(),e.createValueAxis()},createValueAxis:function(){var e,n,t=this,i=t.valueAxisRangeTracker,o=i.query();e=i.query(name)||o||{min:0,max:1},e&&o&&(e.min=C.min(e.min,o.min),e.max=C.max(e.max,o.max)),n=new r(e.min,e.max,t.valueAxisOptions({roundToMajorUnit:!1})),t.valueAxis=n,t.appendAxis(n)},reflowAxes:function(){var e,n=this,t=n.options.plotArea,r=n.valueAxis,i=n.polarAxis,o=n.box,a=C.min(o.width(),o.height())*tn,s=H(t.padding||{},a),l=o.clone().unpad(s),c=l.clone().shrink(0,l.height()/2);i.reflow(l),r.reflow(c),e=r.lineBox().height()-r.box.height(),r.reflow(r.box.unpad({top:e})),n.axisBox=l,n.alignAxes(l)},alignAxes:function(){var e=this,n=e.valueAxis,t=n.getSlot(n.options.min),r=n.options.reverse?2:1,i=e.polarAxis.getSlot(0).c,o=n.box.translate(i.x-t[fn+r],i.y-t[gn+r]);n.reflow(o)},backgroundBox:function(){return this.box}}),v=A.extend({options:{categoryAxis:{categories:[]},valueAxis:{}},createPolarAxis:function(){var e,n=this;e=new vn(n.options.categoryAxis),n.polarAxis=e,n.categoryAxis=e,n.appendAxis(e)},valueAxisOptions:function(e){var n=this;return n._hasBarCharts&&w(e,{majorGridLines:{type:$},minorGridLines:{type:$}}),w(e,n.options.valueAxis)},appendChart:R.fn.appendChart,createCharts:function(){var e=this,n=e.filterVisibleSeries(e.series),t=e.panes[0];e.createAreaChart(J(n,[cn]),t),e.createLineChart(J(n,[hn]),t),e.createBarChart(J(n,[un]),t)},createAreaChart:function(e,n){if(0!==e.length){var t=this,r=e[0],i=t.filterVisibleSeries(e),o=new p(t,{isStacked:r.stack&&i.length>1,series:e});t.appendChart(o,n)}},createLineChart:function(e,n){if(0!==e.length){var t=this,r=e[0],i=t.filterVisibleSeries(e),o=new c(t,{isStacked:r.stack&&i.length>1,series:e});t.appendChart(o,n)}},createBarChart:function(e,n){if(0!==e.length){var t=this,r=e[0],i=t.filterVisibleSeries(e),o=new l(t,{isStacked:r.stack&&i.length>1,series:e,gap:r.gap,spacing:r.spacing});t._hasBarCharts=!0,t.appendChart(o,n)}},seriesCategoryAxis:function(){return this.categoryAxis},click:function(n,t){var r,i,o=this,a=n._eventCoordinates(t),s=new M(a.x,a.y);r=o.categoryAxis.getCategory(s),i=o.valueAxis.getValue(s),null!==r&&null!==i&&n.trigger(on,{element:e(t.target),category:r,value:i})}}),y=A.extend({options:{xAxis:{},yAxis:{}},createPolarAxis:function(){var e,n=this;e=new i(n.options.xAxis),n.polarAxis=e,n.axisX=e,n.appendAxis(e)},valueAxisOptions:function(e){var n=this;return w(e,{majorGridLines:{type:$},minorGridLines:{type:$}},n.options.yAxis)},createValueAxis:function(){var e=this;A.fn.createValueAxis.call(e),e.axisY=e.valueAxis},appendChart:function(e,n){var t=this;t.valueAxisRangeTracker.update(e.yAxisRanges),z.fn.appendChart.call(t,e,n)},createCharts:function(){var e=this,n=e.filterVisibleSeries(e.series),t=e.panes[0];e.createLineChart(J(n,[sn]),t),e.createScatterChart(J(n,[ln]),t),e.createAreaChart(J(n,[an]),t)},createLineChart:function(e,n){if(0!==e.length){var t=this,r=new g(t,{series:e});t.appendChart(r,n)}},createScatterChart:function(e,n){if(0!==e.length){var t=this,r=new f(t,{series:e});t.appendChart(r,n)}},createAreaChart:function(e,n){if(0!==e.length){var t=this,r=new m(t,{series:e});t.appendChart(r,n)}},click:function(n,t){var r,i,o=this,a=n._eventCoordinates(t),s=new M(a.x,a.y);r=o.axisX.getValue(s),i=o.axisY.getValue(s),null!==r&&null!==i&&n.trigger(on,{element:e(t.target),x:r,y:i})}}),_.current.register(y,xn),_.current.register(v,mn),X.current.register(xn,[fn,gn],["color"]),X.current.register(mn,["value"],["color"]),S.DefaultAggregates.current.register(mn,{value:"max",color:"first"}),w(S,{PolarAreaChart:m,PolarAxis:i,PolarLineChart:g,PolarPlotArea:y,RadarAreaChart:p,RadarBarChart:l,RadarCategoryAxis:vn,RadarClusterLayout:o,RadarLineChart:c,RadarNumericAxis:r,RadarPlotArea:v,SplinePolarAreaSegment:x,SplineRadarAreaSegment:h,RadarStackLayout:a})}(window.kendo.jQuery)})}("function"==typeof define&&define.amd?define:function(e,n){return n()});
//@ sourceMappingURL=kendo.dataviz.chart.polar.min.js.map