New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@grapecity/wijmo.chart.radar

Package Overview
Dependencies
Maintainers
1
Versions
1293
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@grapecity/wijmo.chart.radar - npm Package Compare versions

Comparing version

to
5.20183.595-nightly.d20190405.t210807

15

es2015-commonjs.js

@@ -1,1 +0,14 @@

"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const wijmo_1=require("@grapecity/wijmo"),wijmo_chart_1=require("@grapecity/wijmo.chart"),selfModule=require("@grapecity/wijmo.chart.radar");class FlexRadarSeries extends wijmo_chart_1.SeriesBase{get chartType(){return this._finChartType}set chartType(t){(t=wijmo_1.asEnum(t,RadarChartType,!0))!=this._finChartType&&(this._finChartType=t,this._invalidate())}_getChartType(){var t;switch(this.chartType){case RadarChartType.Area:t=wijmo_chart_1.ChartType.Area;break;case RadarChartType.Line:t=wijmo_chart_1.ChartType.Line;break;case RadarChartType.Column:t=wijmo_chart_1.ChartType.Column;break;case RadarChartType.LineSymbols:t=wijmo_chart_1.ChartType.LineSymbols;break;case RadarChartType.Scatter:t=wijmo_chart_1.ChartType.Scatter}return t}}exports.FlexRadarSeries=FlexRadarSeries;class _RadarLinePlotter extends wijmo_chart_1._LinePlotter{constructor(){super(...arguments),this.isArea=!1}_getLabelPoint(t,a){var e=t._getAxisX(),r=t._getAxisY(),i=e.convert(a.dataX),s=r.convert(a.dataY);return this.chart._convertPoint(s,i)}plotSeries(t,a,e,r,i,s,h){var _=wijmo_1.asType(r,wijmo_chart_1.SeriesBase),l=this.chart,n=_._getChartType()||l._getChartType(),o=l.series.indexOf(r),c=r.getValues(0),u=r.getValues(1);if(!c)return;u||(u=this.dataInfo.getXVals());var d=wijmo_chart_1._BasePlotter.cloneStyle(r.style,["fill"]),g=c.length,m=!0;u?g=Math.min(g,u.length):(m=!1,u=new Array(g));var p=this._DEFAULT_WIDTH,v=_._getSymbolFill(o),x=_._getAltSymbolFill(o)||v,y=_._getSymbolStroke(o),w=_._getAltSymbolStroke(o)||y,A=_._getSymbolSize();t.stroke=y,t.strokeWidth=p,t.fill=v;var T=new Array,P=new Array,j=e.actualMax,C=this.stacking!=wijmo_chart_1.Stacking.None&&!_._isCustomAxisY(),L=this.stacking==wijmo_chart_1.Stacking.Stacked100pc&&!_._isCustomAxisY();void 0!==_._getChartType()&&(C=L=!1);var M=_.interpolateNulls,f=!1;let b=this.getItemFormatter(r);for(var S=0;S<g;S++){var k=m?u[S]:S,R=null==c[S]?0:c[S];if(wijmo_chart_1._DataInfo.isValid(k)&&wijmo_chart_1._DataInfo.isValid(R)){if(C){if(L)R/=this.dataInfo.getStackedAbsSum(k);if(R>=0){var I=isNaN(this.stackPos[k])?0:this.stackPos[k];R=this.stackPos[k]=I+R}else{I=isNaN(this.stackNeg[k])?0:this.stackNeg[k];R=this.stackNeg[k]=I+R}}var N;R=Math.min(R,j),N=new wijmo_chart_1._DataPoint(o,S,k,R);var F=a.convert(k),X=e.convert(R),D=this.chart._convertPoint(X,F);if(k=D.x,R=D.y,isNaN(k)||isNaN(R))f=!0,!0!==M&&(T.push(void 0),P.push(void 0));else{T.push(k),P.push(R);var V=new wijmo_chart_1._CircleArea(new wijmo_1.Point(k,R),.5*A);V.tag=N,this.hitTester.add(V,o)}}else f=!0,!0!==M&&(T.push(void 0),P.push(void 0))}var G=0;if(this.hasLines)if(this.isArea?t.fill=v||i._getColorLight(o):t.fill="none",f&&!0!==M){var Y=[],E=[];for(S=0;S<g;S++)void 0===T[S]?(Y.push(void 0),E.push(0)):(Y.push(T[S]),E.push(P[S]));Y.length>1&&(l._isPolar&&n!==wijmo_chart_1.ChartType.Area?this._drawLines(t,Y,E,null,d,this.chart._plotrectId):(l.totalAngle<360&&(Y.push(l._center.x),E.push(l._center.y)),t.drawPolygon(Y,E,null,d,this.chart._plotrectId)),this.hitTester.add(new wijmo_chart_1._LinesArea(Y,E),o),G++)}else l._isPolar&&n!==wijmo_chart_1.ChartType.Area?this._drawLines(t,T,P,null,d,this.chart._plotrectId):(l.totalAngle<360&&(T.push(l._center.x),P.push(l._center.y)),t.drawPolygon(T,P,null,d,this.chart._plotrectId)),this.hitTester.add(new wijmo_chart_1._LinesArea(T,P),o),G++;t.fill=v;for(S=0;S<g;S++){k=T[S],R=P[S];!1===this.hasLines&&(t.fill=c[S]>0?v:x,t.stroke=c[S]>0?y:w),this.isValid(k,R,a,e)&&((this.hasSymbols||b)&&A>0&&this._drawSymbol(t,k,R,A,_,S,b),r._setPointIndex(S,G),G++)}}}exports._RadarLinePlotter=_RadarLinePlotter;class _RadarBarPlotter extends wijmo_chart_1._BarPlotter{adjustLimits(t,a){this.dataInfo=t;var e=t.getMinX(),r=t.getMinY(),i=t.getMaxX(),s=t.getMaxY(),h=t.getDeltaX();return h<=0&&(h=1),this.chart.totalAngle<360&&(h=0),this.unload(),this.chart.axisY._getLogBase()||(this.origin>s?s=this.origin:this.origin<r&&(r=this.origin)),new wijmo_1.Rect(e,r,i-e+h,s-r)}_getLabelPoint(t,a){var e=t._getAxisX(),r=t._getAxisY(),i=e.convert(a.dataX),s=r.convert(a.dataY);return this.chart._convertPoint(s,i)}plotSeries(t,a,e,r,i,s,h){var _=this.chart.series.indexOf(r),l=wijmo_1.asType(r,wijmo_chart_1.SeriesBase),n=(this.chart._options,this.width),o=this.chart,c=-90*Math.PI/180;s=s||0;var u,d=l._getAxisY()._uniqueId,g=(this.stackNegMap[d],this.stackPosMap[d]),m=this.stacking!=wijmo_chart_1.Stacking.None,p=this.stacking==wijmo_chart_1.Stacking.Stacked100pc,v=r.getValues(0),x=r.getValues(1);if(v){var y;x||(x=this.dataInfo.getXVals()),(y=x?o.totalAngle/x.length:o.totalAngle/(a.actualMax-a.actualMin))>0&&(n=m?y*n*Math.PI/180:y*Math.pow(n,s+1)*Math.PI/180);var w=l._getSymbolFill(_),A=l._getAltSymbolFill(_)||w,T=l._getSymbolStroke(_),P=l._getAltSymbolStroke(_)||T,j=v.length;null!=x&&(j=Math.min(j,x.length));var C,L,M=this.origin,f=0;void 0!==l._getChartType()&&(m=p=!1),M<e.actualMin?M=e.actualMin:M>e.actualMax&&(M=e.actualMax);e.convert(M);var b=a.actualMin,S=a.actualMax,k=e.actualMax;l._isCustomAxisY()&&(m=p=!1),o._areas[_]||(o._areas[_]=[]);for(var R=0;R<j;R++){var I=x?x[R]:R,N=null==v[R]?0:v[R];if(this._getSymbolOrigin&&e.convert(this._getSymbolOrigin(M,R,j)),this._getSymbolStyles){var F=this._getSymbolStyles(R,j);w=F&&F.fill?F.fill:w,A=F&&F.fill?F.fill:A,T=F&&F.stroke?F.stroke:T,P=F&&F.stroke?F.stroke:P}if(C=N>0?w:A,L=N>0?T:P,t.fill=C,t.stroke=L,wijmo_chart_1._DataInfo.isValid(I)&&wijmo_chart_1._DataInfo.isValid(N)){if(m){var X,D,V=I-.5*n,G=I+.5*n;if(V<b&&G<b||V>S&&G>S)continue;if(V=a.convert(V),G=a.convert(G),!wijmo_chart_1._DataInfo.isValid(V)||!wijmo_chart_1._DataInfo.isValid(G))continue;if(p)N/=this.dataInfo.getStackedAbsSum(I);var Y=isNaN(g[I])?0:g[I];X=Y,D=Y+N,g[I]=Y+N;var E=a.convert(I),B=e.convert(X),O=e.convert(D);E-=n/2,t.drawDonutSegment(o._center.x,o._center.y,O,B,E+c,n,null,l.symbolStyle),(u=new wijmo_chart_1._DonutSegment(new wijmo_1.Point(o._center.x,o._center.y),O,B,E+c,n,o.startAngle||0)).tag=new wijmo_chart_1._DataPoint(_,R,I,Y+N),this.hitTester.add(u,_)}else{E=a.convert(I);var W=e.convert(Math.min(N,k));o._convertPoint(W,E);E-=n/2,t.drawPieSegment(o._center.x,o._center.y,W,E+c,n,null,l.symbolStyle),(u=new wijmo_chart_1._PieSegment(new wijmo_1.Point(o._center.x,o._center.y),W,E+c,n,o.startAngle)).tag=new wijmo_chart_1._DataPoint(_,R,I,N),this.hitTester.add(u,_)}o._areas[_].push(u),r._setPointIndex(R,f),f++}}}}}var RadarChartType;exports._RadarBarPlotter=_RadarBarPlotter,function(t){t[t.Column=0]="Column",t[t.Scatter=1]="Scatter",t[t.Line=2]="Line",t[t.LineSymbols=3]="LineSymbols",t[t.Area=4]="Area"}(RadarChartType=exports.RadarChartType||(exports.RadarChartType={}));class FlexRadar extends wijmo_chart_1.FlexChartCore{constructor(t,a){super(t,a),this._chartType=RadarChartType.Line,this._startAngle=0,this._totalAngle=360,this._reversed=!1,this._areas=[]}get _radarLinePlotter(){return null==this.__radarLinePlotter&&(this.__radarLinePlotter=new _RadarLinePlotter,this._initPlotter(this.__radarLinePlotter)),this.__radarLinePlotter}get _radarColumnPlotter(){return null==this.__radarColumnPlotter&&(this.__radarColumnPlotter=new _RadarBarPlotter,this._initPlotter(this.__radarColumnPlotter)),this.__radarColumnPlotter}_initAxes(){super._initAxes(),this.axes.pop(),this.axes.pop(),this.axisX=new FlexRadarAxis(wijmo_chart_1.Position.Bottom),this.axisX.majorGrid=!0,this.axisY=new FlexRadarAxis(wijmo_chart_1.Position.Left),this.axisY.majorTickMarks=wijmo_chart_1.TickMark.Outside,this.axes.push(this.axisX),this.axes.push(this.axisY)}_layout(t,a,e){super._layout(t,a,e);var r=this.axisX._height;this._plotRect.top+=r/2;var i=this._plotRect;this._radius=Math.min(i.width,i.height)/2,this._center=new wijmo_1.Point(i.left+i.width/2,i.top+i.height/2)}get chartType(){return this._chartType}set chartType(t){(t=wijmo_1.asEnum(t,RadarChartType))!=this._chartType&&(this._chartType=t,this.invalidate())}get startAngle(){return this._startAngle}set startAngle(t){t!=this._startAngle&&(this._startAngle=wijmo_1.asNumber(t,!0),this.invalidate())}get totalAngle(){return this._totalAngle}set totalAngle(t){t!=this._totalAngle&&t>=0&&(this._totalAngle=wijmo_1.asNumber(t,!0),this._totalAngle<=0&&(wijmo_1.assert(!1,"totalAngle must be greater than 0."),this._totalAngle=0),this._totalAngle>360&&(wijmo_1.assert(!1,"totalAngle must be less than or equal to 360."),this._totalAngle=360),this.invalidate())}get reversed(){return this._reversed}set reversed(t){t!=this._reversed&&(this._reversed=wijmo_1.asBoolean(t,!0),this.invalidate())}get stacking(){return this._stacking}set stacking(t){(t=wijmo_1.asEnum(t,wijmo_chart_1.Stacking))!=this._stacking&&(this._stacking=t,this.invalidate())}_getChartType(){var t=wijmo_chart_1.ChartType.Line;switch(this.chartType){case RadarChartType.Area:t=wijmo_chart_1.ChartType.Area;break;case RadarChartType.Line:t=wijmo_chart_1.ChartType.Line;break;case RadarChartType.Column:t=wijmo_chart_1.ChartType.Column;break;case RadarChartType.LineSymbols:t=wijmo_chart_1.ChartType.LineSymbols;break;case RadarChartType.Scatter:t=wijmo_chart_1.ChartType.Scatter}return t}_getPlotter(t){var a=this.chartType,e=null;if(t){var r=t.chartType;null!=r&&r!=a&&(a=r,!0)}switch(a){case RadarChartType.Line:this._radarLinePlotter.hasSymbols=!1,this._radarLinePlotter.hasLines=!0,this._radarLinePlotter.isArea=!1,e=this._radarLinePlotter;break;case RadarChartType.LineSymbols:this._radarLinePlotter.hasSymbols=!0,this._radarLinePlotter.hasLines=!0,this._radarLinePlotter.isArea=!1,e=this._radarLinePlotter;break;case RadarChartType.Area:this._radarLinePlotter.hasSymbols=!1,this._radarLinePlotter.hasLines=!0,this._radarLinePlotter.isArea=!0,e=this._radarLinePlotter;break;case RadarChartType.Scatter:this._radarLinePlotter.hasSymbols=!0,this._radarLinePlotter.hasLines=!1,this._radarLinePlotter.isArea=!1,e=this._radarLinePlotter;break;case RadarChartType.Column:this._radarColumnPlotter.isVolume=!1,this._radarColumnPlotter.width=.8,e=this._radarColumnPlotter;break;default:e=super._getPlotter(t)}return e}_convertPoint(t,a){var e=new wijmo_1.Point,r=this._center;return e.x=r.x+t*Math.sin(a),e.y=r.y-t*Math.cos(a),e}_createSeries(){return new FlexRadarSeries}_clearCachedValues(){super._clearCachedValues(),this._isPolar=!1,this._areas=[]}_performBind(){if(this._xDataType=null,this._xlabels.splice(0),this._xvals.splice(0),this._cv){var t=this._cv.items;if(t){for(var a=t.length,e=0;e<a;e++){var r=t[e];let a=this.bindingX?new wijmo_1.Binding(this.bindingX):null;if(a){var i=a.getValue(r);wijmo_1.isNumber(i)?(this._xvals.push(wijmo_1.asNumber(i)),this._xDataType=wijmo_1.DataType.Number):wijmo_1.isDate(i)&&(this._xDataType=wijmo_1.DataType.Date),this._xlabels.push(i)}}this._xvals.length==a?this._xlabels.splice(0):this._xvals.splice(0)}}this._xDataType===wijmo_1.DataType.Number&&(this._isPolar=!0)}_prepareRender(){super._prepareRender(),this._areas=[]}}exports.FlexRadar=FlexRadar;class FlexRadarAxis extends wijmo_chart_1.Axis{constructor(){super(...arguments),this._points=[],this._axisLabels=[]}_render(t){if(this._hasVisibileSeries()){super._render(t);var a=this._axisLabels;if(a.length){var e=()=>{var r=this.axisType==wijmo_chart_1.AxisType.X?"wj-axis-x-labels "+wijmo_chart_1.FlexChart._CSS_AXIS_X:"wj-axis-y-labels "+wijmo_chart_1.FlexChart._CSS_AXIS_Y;t.startGroup(r),a.forEach(a=>{var e=a.labelAngle;e>0?wijmo_chart_1.FlexChart._renderRotatedText(t,a.text,a.pos,a.align,a.vAlign,a.pos,e,a.class):e<0?wijmo_chart_1.FlexChart._renderRotatedText(t,a.text,a.pos,a.align,a.vAlign,a.pos,e,a.class):this._renderLabel(t,a.val,a.text,a.pos,a.align,a.vAlign,a.class)}),t.endGroup(),this._axisLabels=[],this._chart.rendered.removeHandler(e)};this._chart.rendered.addHandler(e,this)}}}_getHeight(t,a){var e=super._getHeight(t,a);return this._axisType==wijmo_chart_1.AxisType.Y&&(e=4),this._height=2*e,2*e}_getActualRange(){return this._isTimeAxis&&null!=this.__actualMax&&null!=this.__actualMin?this.__actualMax-this.__actualMin:super._getActualRange()}_updateActualLimits(t,a,e,r=null,i=null){super._updateActualLimits(t,a,e,r,i);var s,h=this._chart,_=this._lbls,l=this.actualMin.valueOf?this.actualMin.valueOf():this.actualMin,n=this.actualMax.valueOf?this.actualMax.valueOf():this.actualMax;this._lbls&&this===h.axisX&&(h._angles=[],this._isTimeAxis&&0===this._lbls.length&&this._values.forEach(t=>{_.push(this._formatValue(t))}),s=_.length,h.totalAngle<360&&(s-=1),_.forEach((t,a)=>{var e=l+a/s*(n-l),r=h.startAngle+a/s*h.totalAngle;isNaN(r)||isNaN(e)||h._angles.push({value:this.convert(e),angle:r}),this._isTimeAxis?((null==this.__actualMin||this.__actualMin>t)&&(this.__actualMin=t),(null==this.__actualMax||this.__actualMax<t)&&(this.__actualMax=t)):null==this.__actualMin&&null==this.__actualMax||(this.__actualMin=null,this.__actualMax=null)}),this._isTimeAxis&&this._lbls.length>0&&(this._updateAutoFormat(0),this._lbls=_.map(t=>{let a=wijmo_1.asDate(t).valueOf();return this._formatValue(a)})))}_updateActualLimitsByChartType(t,a,e){var r=this._chart;if(r._getChartType()!=wijmo_chart_1.ChartType.Column&&360===r.totalAngle&&this.axisType===wijmo_chart_1.AxisType.X)if(this._isTimeAxis){var i=(r._xlabels.length||r._xvals.length)-1;e+=(e-a)/(i=i<1?1:i)}else r._isPolar||(e+=1);return{min:a,max:e}}convert(t,a,e){var r=null==a?this.actualMax:a,i=null==e?this.actualMin:e,s=this._chart;if(!s)return NaN;if(r==i)return 0;if(this.axisType===wijmo_chart_1.AxisType.X)return s.reversed?(s.startAngle-(t-i)/(r-i)*s.totalAngle)*Math.PI/180:(s.startAngle+(t-i)/(r-i)*s.totalAngle)*Math.PI/180;if(this._getLogBase()){if(t<=0)return NaN;var h=Math.log(r/i);return Math.log(t/i)/h*s._radius}return(t-i)/(r-i)*s._radius}_renderLineAndTitle(t){var a=this._chart,e=wijmo_chart_1.FlexChart._CSS_LINE,r=(a.startAngle-90)*Math.PI/180,i=a.totalAngle*Math.PI/180,s=a._radius;this.axisType===wijmo_chart_1.AxisType.X&&this.axisLine&&(t.stroke=wijmo_chart_1.FlexChart._FG,a._isPolar?(r=a.reversed?r-i:r,t.drawPieSegment(a._center.x,a._center.y,s,r,i,e)):this._renderPolygon(t,s,e))}_renderPolygon(t,a,e){var r=this._chart,i=r._angles,s=i.length,h=r.axisX.minorGrid,_=[],l=[];if(i.forEach((t,e)=>{if(h&&e>0){var s=r._convertPoint(a,t.value-(t.value-i[e-1].value)/2);_.push(s.x),l.push(s.y)}var n=r._convertPoint(a,t.value);_.push(n.x),l.push(n.y)}),r.totalAngle<360)_.push(r._center.x),l.push(r._center.y);else if(h&&s>=2){var n=r._convertPoint(a,i[s-1].value-(i[s-2].value-i[s-1].value)/2);_.push(n.x),l.push(n.y)}t.drawPolygon(_,l,e)}_renderMinors(t,a,e,r){var i,s=this._chart,h=wijmo_chart_1.FlexChart._CSS_GRIDLINE_MINOR,_=this.minorGrid,l=s._angles,n=l.length,o=s.axisX.minorGrid,c=wijmo_chart_1.FlexChart._FG,u=this._GRIDLINE_WIDTH,d=(s.startAngle,Math.PI,s.totalAngle,Math.PI,this._TICK_OVERLAP),g=this.minorTickMarks,m=!0;this._vals.minor=a,g==wijmo_chart_1.TickMark.Outside?d=1:g==wijmo_chart_1.TickMark.Inside?d=-1:g==wijmo_chart_1.TickMark.Cross?d=0:m=!1,this.axisType==wijmo_chart_1.AxisType.Y?(t.stroke=c,t.strokeWidth=u,a.forEach(a=>{var e=this.convert(a);if(_&&this._renderYGridLine(t,s,e,h),m&&(l.forEach((a,r)=>{if(o&&r>0){i=a.value-(a.value-l[r-1].value)/2;var h=s._convertPoint(e,i);this._drawMinorTickLength(t,d,i,h)}i=a.value;var _=s._convertPoint(e,i);this._drawMinorTickLength(t,d,i,_)}),o&&n>=2)){i=l[n-1].value-(l[n-2].value-l[n-1].value)/2;var r=s._convertPoint(e,i);this._drawMinorTickLength(t,d,i,r)}})):(t.stroke=c,t.strokeWidth=u,a.forEach(a=>{var e=this.convert(a);_&&(this._renderXGridLine(t,s,e,h),m&&this._drawMinorTickLength(t,d,e-Math.PI/2,s._convertPoint(s._radius,e)))}))}_drawMinorTickLength(t,a,e,r){var i=this._TICK_HEIGHT,s=wijmo_chart_1.FlexChart._CSS_TICK_MINOR,h=.5*(a-1)*i*Math.cos(e),_=.5*(1+a)*i*Math.cos(e),l=.5*(a-1)*i*Math.sin(e),n=.5*(1+a)*i*Math.sin(e);t.drawLine(r.x+h,r.y+l,r.x+_,r.y+n,s)}_renderLabelsAndTicks(t,a,e,r,i,s,h,_,l){this._points=[],i=this.labelAngle||0;var n,o=this._chart,c=this.labelPadding||2,u=wijmo_chart_1.FlexChart._CSS_LABEL,d=wijmo_chart_1.FlexChart._CSS_GRIDLINE,g=wijmo_chart_1.FlexChart._CSS_TICK,m=wijmo_chart_1.FlexChart._FG,p=this._TICK_WIDTH,v=this.majorGrid,x=wijmo_chart_1.FlexChart._FG,y=this._GRIDLINE_WIDTH,w=o.startAngle*Math.PI/180,A=(o.totalAngle,Math.PI,1);if(this.axisType==wijmo_chart_1.AxisType.Y){v=e!=this.actualMin&&v&&e!=this.actualMax;var T=this.convert(e),P=o._convertPoint(T,w);if(v&&(t.stroke=x,t.strokeWidth=y,this._renderYGridLine(t,o,T,d)),t.stroke=m,t.strokeWidth=p,h){(n=(o.startAngle%360+360)%360)<=90&&n>=75||n>=270&&n<=285?A=2:(n>90&&n<=105||n<270&&n>=255)&&(A=0);var j=new wijmo_1.Point(P.x-c-Math.abs(_-l),P.y);this._axisLabels.push({val:e,text:r,pos:j,align:2,vAlign:A,labelAngle:i,class:u})}s!=wijmo_chart_1.TickMark.None&&t.drawLine(P.x-l*Math.cos(w),P.y-l*Math.sin(w),P.x-_*Math.cos(w),P.y-_*Math.sin(w),g)}else{var C=this.convert(e);if(v&&(t.stroke=x,t.strokeWidth=y,this._renderXGridLine(t,o,C,d)),t.stroke=m,t.strokeWidth=p,h){var L,M,f;j=o._convertPoint(o._radius+c,C);L=o._angles&&o._angles.length?o._angles[a].angle:o.startAngle+(e-this.actualMin)*o.totalAngle/(this.actualMax-this.actualMin),L=(L%=360)>=0?L:L+360,M=this._getXLabelVAlign(L),f=this._getXLabelAlign(L),o._isPolar&&(r=this._formatValue(L)),i>0?wijmo_chart_1.FlexChart._renderRotatedText(t,r,j,f,M,j,i,u):i<0?wijmo_chart_1.FlexChart._renderRotatedText(t,r,j,f,M,j,i,u):this._renderLabel(t,e,r,j,f,M,u)}s!=wijmo_chart_1.TickMark.None&&this._renderXTick(t,o,C,g,_,l)}return!0}_renderXGridLine(t,a,e,r){var i=a._center,s=a._convertPoint(a._radius,e);t.drawLine(i.x,i.y,s.x,s.y,r)}_renderXTick(t,a,e,r,i,s){var h,_;a._center;h=a._convertPoint(a._radius+i,e),_=a._convertPoint(a._radius+s,e),t.drawLine(h.x,h.y,_.x,_.y,r)}_renderYGridLine(t,a,e,r){a._angles;var i=a._center,s=a.startAngle*Math.PI/180,h=a.totalAngle*Math.PI/180;a._isPolar?(s=(a.startAngle-90)*Math.PI/180,s=a.reversed?s-h:s,t.drawPieSegment(i.x,i.y,e,s,h,r)):this._renderPolygon(t,e,r)}_getXLabelVAlign(t){var a=1,e=this._chart,r=e.startAngle;return e.reversed&&(t=(360+r+(r%360-t%360))%360),0===t?a=2:180===t&&(a=0),a}_getXLabelAlign(t){var a=0,e=this._chart,r=e.startAngle;return e.reversed&&(t=(360+r+(r%360-t%360))%360),t>0&&t<180?a=-1:t>180&&t<360&&(a=1),a+1}_createTimeLabels(t,a,e,r){if(this._axisType==wijmo_chart_1.AxisType.Y)super._createTimeLabels(t,a,e,r);else{var i=this._values;this.format;if(!i||0===i.length)return;i.forEach(t=>{e.push(t),r.push(this._formatValue(t))})}}_niceNumber(t,a,e){var r=this._chart,i=this.actualMax-this.actualMin,s=r.totalAngle;return s>360&&(s%=360),r._isPolar?s%8==0?i/8:s%6==0?i/6:s%4==0?i/4:s%3==0?i/3:s%2==0?i/2:super._niceNumber(t,a,e):super._niceNumber(t,a,e)}}exports.FlexRadarAxis=FlexRadarAxis,wijmo_1._registerModule("wijmo.chart.radar",selfModule);
/*!
*
* Wijmo Library 5.20183.595-nightly.d20190405.t210807
* http://wijmo.com/
*
* Copyright(c) GrapeCity, Inc. All rights reserved.
*
* Licensed under the GrapeCity Commercial License.
* sales@wijmo.com
* wijmo.com/products/wijmo-5/license/
*
*/
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const wijmo_1=require("@grapecity/wijmo"),wijmo_chart_1=require("@grapecity/wijmo.chart"),selfModule=require("@grapecity/wijmo.chart.radar");class FlexRadarSeries extends wijmo_chart_1.SeriesBase{get chartType(){return this._finChartType}set chartType(t){(t=wijmo_1.asEnum(t,RadarChartType,!0))!=this._finChartType&&(this._finChartType=t,this._invalidate())}_getChartType(){var t;switch(this.chartType){case RadarChartType.Area:t=wijmo_chart_1.ChartType.Area;break;case RadarChartType.Line:t=wijmo_chart_1.ChartType.Line;break;case RadarChartType.Column:t=wijmo_chart_1.ChartType.Column;break;case RadarChartType.LineSymbols:t=wijmo_chart_1.ChartType.LineSymbols;break;case RadarChartType.Scatter:t=wijmo_chart_1.ChartType.Scatter}return t}}exports.FlexRadarSeries=FlexRadarSeries;class _RadarLinePlotter extends wijmo_chart_1._LinePlotter{constructor(){super(...arguments),this.isArea=!1}_getLabelPoint(t,a){var e=t._getAxisX(),r=t._getAxisY(),i=e.convert(a.dataX),s=r.convert(a.dataY);return this.chart._convertPoint(s,i)}plotSeries(t,a,e,r,i,s,h){var _=wijmo_1.asType(r,wijmo_chart_1.SeriesBase),l=this.chart,n=_._getChartType()||l._getChartType(),o=l.series.indexOf(r),c=r.getValues(0),u=r.getValues(1);if(!c)return;u||(u=this.dataInfo.getXVals());var d=wijmo_chart_1._BasePlotter.cloneStyle(r.style,["fill"]),g=c.length,m=!0;u?g=Math.min(g,u.length):(m=!1,u=new Array(g));var p=this._DEFAULT_WIDTH,v=_._getSymbolFill(o),x=_._getAltSymbolFill(o)||v,y=_._getSymbolStroke(o),w=_._getAltSymbolStroke(o)||y,A=_._getSymbolSize();t.stroke=y,t.strokeWidth=p,t.fill=v;var T=new Array,P=new Array,j=e.actualMax,C=this.stacking!=wijmo_chart_1.Stacking.None&&!_._isCustomAxisY(),L=this.stacking==wijmo_chart_1.Stacking.Stacked100pc&&!_._isCustomAxisY();void 0!==_._getChartType()&&(C=L=!1);var M=_.interpolateNulls,f=!1;let b=this.getItemFormatter(r);for(var S=0;S<g;S++){var k=m?u[S]:S,R=null==c[S]?0:c[S];if(wijmo_chart_1._DataInfo.isValid(k)&&wijmo_chart_1._DataInfo.isValid(R)){if(C){if(L)R/=this.dataInfo.getStackedAbsSum(k);if(R>=0){var I=isNaN(this.stackPos[k])?0:this.stackPos[k];R=this.stackPos[k]=I+R}else{I=isNaN(this.stackNeg[k])?0:this.stackNeg[k];R=this.stackNeg[k]=I+R}}var N;R=Math.min(R,j),N=new wijmo_chart_1._DataPoint(o,S,k,R);var F=a.convert(k),X=e.convert(R),D=this.chart._convertPoint(X,F);if(k=D.x,R=D.y,isNaN(k)||isNaN(R))f=!0,!0!==M&&(T.push(void 0),P.push(void 0));else{T.push(k),P.push(R);var V=new wijmo_chart_1._CircleArea(new wijmo_1.Point(k,R),.5*A);V.tag=N,this.hitTester.add(V,o)}}else f=!0,!0!==M&&(T.push(void 0),P.push(void 0))}var G=0;if(this.hasLines)if(this.isArea?t.fill=v||i._getColorLight(o):t.fill="none",f&&!0!==M){var Y=[],E=[];for(S=0;S<g;S++)void 0===T[S]?(Y.push(void 0),E.push(0)):(Y.push(T[S]),E.push(P[S]));Y.length>1&&(l._isPolar&&n!==wijmo_chart_1.ChartType.Area?this._drawLines(t,Y,E,null,d,this.chart._plotrectId):(l.totalAngle<360&&(Y.push(l._center.x),E.push(l._center.y)),t.drawPolygon(Y,E,null,d,this.chart._plotrectId)),this.hitTester.add(new wijmo_chart_1._LinesArea(Y,E),o),G++)}else l._isPolar&&n!==wijmo_chart_1.ChartType.Area?this._drawLines(t,T,P,null,d,this.chart._plotrectId):(l.totalAngle<360&&(T.push(l._center.x),P.push(l._center.y)),t.drawPolygon(T,P,null,d,this.chart._plotrectId)),this.hitTester.add(new wijmo_chart_1._LinesArea(T,P),o),G++;t.fill=v;for(S=0;S<g;S++){k=T[S],R=P[S];!1===this.hasLines&&(t.fill=c[S]>0?v:x,t.stroke=c[S]>0?y:w),this.isValid(k,R,a,e)&&((this.hasSymbols||b)&&A>0&&this._drawSymbol(t,k,R,A,_,S,b),r._setPointIndex(S,G),G++)}}}exports._RadarLinePlotter=_RadarLinePlotter;class _RadarBarPlotter extends wijmo_chart_1._BarPlotter{adjustLimits(t,a){this.dataInfo=t;var e=t.getMinX(),r=t.getMinY(),i=t.getMaxX(),s=t.getMaxY(),h=t.getDeltaX();return h<=0&&(h=1),this.chart.totalAngle<360&&(h=0),this.unload(),this.chart.axisY._getLogBase()||(this.origin>s?s=this.origin:this.origin<r&&(r=this.origin)),new wijmo_1.Rect(e,r,i-e+h,s-r)}_getLabelPoint(t,a){var e=t._getAxisX(),r=t._getAxisY(),i=e.convert(a.dataX),s=r.convert(a.dataY);return this.chart._convertPoint(s,i)}plotSeries(t,a,e,r,i,s,h){var _=this.chart.series.indexOf(r),l=wijmo_1.asType(r,wijmo_chart_1.SeriesBase),n=(this.chart._options,this.width),o=this.chart,c=-90*Math.PI/180;s=s||0;var u,d=l._getAxisY()._uniqueId,g=(this.stackNegMap[d],this.stackPosMap[d]),m=this.stacking!=wijmo_chart_1.Stacking.None,p=this.stacking==wijmo_chart_1.Stacking.Stacked100pc,v=r.getValues(0),x=r.getValues(1);if(v){var y;x||(x=this.dataInfo.getXVals()),(y=x?o.totalAngle/x.length:o.totalAngle/(a.actualMax-a.actualMin))>0&&(n=m?y*n*Math.PI/180:y*Math.pow(n,s+1)*Math.PI/180);var w=l._getSymbolFill(_),A=l._getAltSymbolFill(_)||w,T=l._getSymbolStroke(_),P=l._getAltSymbolStroke(_)||T,j=v.length;null!=x&&(j=Math.min(j,x.length));var C,L,M=this.origin,f=0;void 0!==l._getChartType()&&(m=p=!1),M<e.actualMin?M=e.actualMin:M>e.actualMax&&(M=e.actualMax);e.convert(M);var b=a.actualMin,S=a.actualMax,k=e.actualMax;l._isCustomAxisY()&&(m=p=!1),o._areas[_]||(o._areas[_]=[]);for(var R=0;R<j;R++){var I=x?x[R]:R,N=null==v[R]?0:v[R];if(this._getSymbolOrigin&&e.convert(this._getSymbolOrigin(M,R,j)),this._getSymbolStyles){var F=this._getSymbolStyles(R,j);w=F&&F.fill?F.fill:w,A=F&&F.fill?F.fill:A,T=F&&F.stroke?F.stroke:T,P=F&&F.stroke?F.stroke:P}if(C=N>0?w:A,L=N>0?T:P,t.fill=C,t.stroke=L,wijmo_chart_1._DataInfo.isValid(I)&&wijmo_chart_1._DataInfo.isValid(N)){if(m){var X,D,V=I-.5*n,G=I+.5*n;if(V<b&&G<b||V>S&&G>S)continue;if(V=a.convert(V),G=a.convert(G),!wijmo_chart_1._DataInfo.isValid(V)||!wijmo_chart_1._DataInfo.isValid(G))continue;if(p)N/=this.dataInfo.getStackedAbsSum(I);var Y=isNaN(g[I])?0:g[I];X=Y,D=Y+N,g[I]=Y+N;var E=a.convert(I),B=e.convert(X),O=e.convert(D);E-=n/2,t.drawDonutSegment(o._center.x,o._center.y,O,B,E+c,n,null,l.symbolStyle),(u=new wijmo_chart_1._DonutSegment(new wijmo_1.Point(o._center.x,o._center.y),O,B,E+c,n,o.startAngle||0)).tag=new wijmo_chart_1._DataPoint(_,R,I,Y+N),this.hitTester.add(u,_)}else{E=a.convert(I);var W=e.convert(Math.min(N,k));o._convertPoint(W,E);E-=n/2,t.drawPieSegment(o._center.x,o._center.y,W,E+c,n,null,l.symbolStyle),(u=new wijmo_chart_1._PieSegment(new wijmo_1.Point(o._center.x,o._center.y),W,E+c,n,o.startAngle)).tag=new wijmo_chart_1._DataPoint(_,R,I,N),this.hitTester.add(u,_)}o._areas[_].push(u),r._setPointIndex(R,f),f++}}}}}var RadarChartType;exports._RadarBarPlotter=_RadarBarPlotter,function(t){t[t.Column=0]="Column",t[t.Scatter=1]="Scatter",t[t.Line=2]="Line",t[t.LineSymbols=3]="LineSymbols",t[t.Area=4]="Area"}(RadarChartType=exports.RadarChartType||(exports.RadarChartType={}));class FlexRadar extends wijmo_chart_1.FlexChartCore{constructor(t,a){super(t,a),this._chartType=RadarChartType.Line,this._startAngle=0,this._totalAngle=360,this._reversed=!1,this._areas=[]}get _radarLinePlotter(){return null==this.__radarLinePlotter&&(this.__radarLinePlotter=new _RadarLinePlotter,this._initPlotter(this.__radarLinePlotter)),this.__radarLinePlotter}get _radarColumnPlotter(){return null==this.__radarColumnPlotter&&(this.__radarColumnPlotter=new _RadarBarPlotter,this._initPlotter(this.__radarColumnPlotter)),this.__radarColumnPlotter}_initAxes(){super._initAxes(),this.axes.pop(),this.axes.pop(),this.axisX=new FlexRadarAxis(wijmo_chart_1.Position.Bottom),this.axisX.majorGrid=!0,this.axisY=new FlexRadarAxis(wijmo_chart_1.Position.Left),this.axisY.majorTickMarks=wijmo_chart_1.TickMark.Outside,this.axes.push(this.axisX),this.axes.push(this.axisY)}_layout(t,a,e){super._layout(t,a,e);var r=this.axisX._height;this._plotRect.top+=r/2;var i=this._plotRect;this._radius=Math.min(i.width,i.height)/2,this._center=new wijmo_1.Point(i.left+i.width/2,i.top+i.height/2)}get chartType(){return this._chartType}set chartType(t){(t=wijmo_1.asEnum(t,RadarChartType))!=this._chartType&&(this._chartType=t,this.invalidate())}get startAngle(){return this._startAngle}set startAngle(t){t!=this._startAngle&&(this._startAngle=wijmo_1.asNumber(t,!0),this.invalidate())}get totalAngle(){return this._totalAngle}set totalAngle(t){t!=this._totalAngle&&t>=0&&(this._totalAngle=wijmo_1.asNumber(t,!0),this._totalAngle<=0&&(wijmo_1.assert(!1,"totalAngle must be greater than 0."),this._totalAngle=0),this._totalAngle>360&&(wijmo_1.assert(!1,"totalAngle must be less than or equal to 360."),this._totalAngle=360),this.invalidate())}get reversed(){return this._reversed}set reversed(t){t!=this._reversed&&(this._reversed=wijmo_1.asBoolean(t,!0),this.invalidate())}get stacking(){return this._stacking}set stacking(t){(t=wijmo_1.asEnum(t,wijmo_chart_1.Stacking))!=this._stacking&&(this._stacking=t,this.invalidate())}_getChartType(){var t=wijmo_chart_1.ChartType.Line;switch(this.chartType){case RadarChartType.Area:t=wijmo_chart_1.ChartType.Area;break;case RadarChartType.Line:t=wijmo_chart_1.ChartType.Line;break;case RadarChartType.Column:t=wijmo_chart_1.ChartType.Column;break;case RadarChartType.LineSymbols:t=wijmo_chart_1.ChartType.LineSymbols;break;case RadarChartType.Scatter:t=wijmo_chart_1.ChartType.Scatter}return t}_getPlotter(t){var a=this.chartType,e=null;if(t){var r=t.chartType;null!=r&&r!=a&&(a=r,!0)}switch(a){case RadarChartType.Line:this._radarLinePlotter.hasSymbols=!1,this._radarLinePlotter.hasLines=!0,this._radarLinePlotter.isArea=!1,e=this._radarLinePlotter;break;case RadarChartType.LineSymbols:this._radarLinePlotter.hasSymbols=!0,this._radarLinePlotter.hasLines=!0,this._radarLinePlotter.isArea=!1,e=this._radarLinePlotter;break;case RadarChartType.Area:this._radarLinePlotter.hasSymbols=!1,this._radarLinePlotter.hasLines=!0,this._radarLinePlotter.isArea=!0,e=this._radarLinePlotter;break;case RadarChartType.Scatter:this._radarLinePlotter.hasSymbols=!0,this._radarLinePlotter.hasLines=!1,this._radarLinePlotter.isArea=!1,e=this._radarLinePlotter;break;case RadarChartType.Column:this._radarColumnPlotter.isVolume=!1,this._radarColumnPlotter.width=.8,e=this._radarColumnPlotter;break;default:e=super._getPlotter(t)}return e}_convertPoint(t,a){var e=new wijmo_1.Point,r=this._center;return e.x=r.x+t*Math.sin(a),e.y=r.y-t*Math.cos(a),e}_createSeries(){return new FlexRadarSeries}_clearCachedValues(){super._clearCachedValues(),this._isPolar=!1,this._areas=[]}_performBind(){if(this._xDataType=null,this._xlabels.splice(0),this._xvals.splice(0),this._cv){var t=this._cv.items;if(t){for(var a=t.length,e=0;e<a;e++){var r=t[e];let a=this.bindingX?new wijmo_1.Binding(this.bindingX):null;if(a){var i=a.getValue(r);wijmo_1.isNumber(i)?(this._xvals.push(wijmo_1.asNumber(i)),this._xDataType=wijmo_1.DataType.Number):wijmo_1.isDate(i)&&(this._xDataType=wijmo_1.DataType.Date),this._xlabels.push(i)}}this._xvals.length==a?this._xlabels.splice(0):this._xvals.splice(0)}}this._xDataType===wijmo_1.DataType.Number&&(this._isPolar=!0)}_prepareRender(){super._prepareRender(),this._areas=[]}}exports.FlexRadar=FlexRadar;class FlexRadarAxis extends wijmo_chart_1.Axis{constructor(){super(...arguments),this._points=[],this._axisLabels=[]}_render(t){if(this._hasVisibileSeries()){super._render(t);var a=this._axisLabels;if(a.length){var e=()=>{var r=this.axisType==wijmo_chart_1.AxisType.X?"wj-axis-x-labels "+wijmo_chart_1.FlexChart._CSS_AXIS_X:"wj-axis-y-labels "+wijmo_chart_1.FlexChart._CSS_AXIS_Y;t.startGroup(r),a.forEach(a=>{var e=a.labelAngle;e>0?wijmo_chart_1.FlexChart._renderRotatedText(t,a.text,a.pos,a.align,a.vAlign,a.pos,e,a.class):e<0?wijmo_chart_1.FlexChart._renderRotatedText(t,a.text,a.pos,a.align,a.vAlign,a.pos,e,a.class):this._renderLabel(t,a.val,a.text,a.pos,a.align,a.vAlign,a.class)}),t.endGroup(),this._axisLabels=[],this._chart.rendered.removeHandler(e)};this._chart.rendered.addHandler(e,this)}}}_getHeight(t,a){var e=super._getHeight(t,a);return this._axisType==wijmo_chart_1.AxisType.Y&&(e=4),this._height=2*e,2*e}_getActualRange(){return this._isTimeAxis&&null!=this.__actualMax&&null!=this.__actualMin?this.__actualMax-this.__actualMin:super._getActualRange()}_updateActualLimits(t,a,e,r=null,i=null){super._updateActualLimits(t,a,e,r,i);var s,h=this._chart,_=this._lbls,l=this.actualMin.valueOf?this.actualMin.valueOf():this.actualMin,n=this.actualMax.valueOf?this.actualMax.valueOf():this.actualMax;this._lbls&&this===h.axisX&&(h._angles=[],this._isTimeAxis&&0===this._lbls.length&&this._values.forEach(t=>{_.push(this._formatValue(t))}),s=_.length,h.totalAngle<360&&(s-=1),_.forEach((t,a)=>{var e=l+a/s*(n-l),r=h.startAngle+a/s*h.totalAngle;isNaN(r)||isNaN(e)||h._angles.push({value:this.convert(e),angle:r}),this._isTimeAxis?((null==this.__actualMin||this.__actualMin>t)&&(this.__actualMin=t),(null==this.__actualMax||this.__actualMax<t)&&(this.__actualMax=t)):null==this.__actualMin&&null==this.__actualMax||(this.__actualMin=null,this.__actualMax=null)}),this._isTimeAxis&&this._lbls.length>0&&(this._updateAutoFormat(0),this._lbls=_.map(t=>{let a=wijmo_1.asDate(t).valueOf();return this._formatValue(a)})))}_updateActualLimitsByChartType(t,a,e){var r=this._chart;if(r._getChartType()!=wijmo_chart_1.ChartType.Column&&360===r.totalAngle&&this.axisType===wijmo_chart_1.AxisType.X)if(this._isTimeAxis){var i=(r._xlabels.length||r._xvals.length)-1;e+=(e-a)/(i=i<1?1:i)}else r._isPolar||(e+=1);return{min:a,max:e}}convert(t,a,e){var r=null==a?this.actualMax:a,i=null==e?this.actualMin:e,s=this._chart;if(!s)return NaN;if(r==i)return 0;if(this.axisType===wijmo_chart_1.AxisType.X)return s.reversed?(s.startAngle-(t-i)/(r-i)*s.totalAngle)*Math.PI/180:(s.startAngle+(t-i)/(r-i)*s.totalAngle)*Math.PI/180;if(this._getLogBase()){if(t<=0)return NaN;var h=Math.log(r/i);return Math.log(t/i)/h*s._radius}return(t-i)/(r-i)*s._radius}_renderLineAndTitle(t){var a=this._chart,e=wijmo_chart_1.FlexChart._CSS_LINE,r=(a.startAngle-90)*Math.PI/180,i=a.totalAngle*Math.PI/180,s=a._radius;this.axisType===wijmo_chart_1.AxisType.X&&this.axisLine&&(t.stroke=wijmo_chart_1.FlexChart._FG,a._isPolar?(r=a.reversed?r-i:r,t.drawPieSegment(a._center.x,a._center.y,s,r,i,e)):this._renderPolygon(t,s,e))}_renderPolygon(t,a,e){var r=this._chart,i=r._angles,s=i.length,h=r.axisX.minorGrid,_=[],l=[];if(i.forEach((t,e)=>{if(h&&e>0){var s=r._convertPoint(a,t.value-(t.value-i[e-1].value)/2);_.push(s.x),l.push(s.y)}var n=r._convertPoint(a,t.value);_.push(n.x),l.push(n.y)}),r.totalAngle<360)_.push(r._center.x),l.push(r._center.y);else if(h&&s>=2){var n=r._convertPoint(a,i[s-1].value-(i[s-2].value-i[s-1].value)/2);_.push(n.x),l.push(n.y)}t.drawPolygon(_,l,e)}_renderMinors(t,a,e,r){var i,s=this._chart,h=wijmo_chart_1.FlexChart._CSS_GRIDLINE_MINOR,_=this.minorGrid,l=s._angles,n=l.length,o=s.axisX.minorGrid,c=wijmo_chart_1.FlexChart._FG,u=this._GRIDLINE_WIDTH,d=(s.startAngle,Math.PI,s.totalAngle,Math.PI,this._TICK_OVERLAP),g=this.minorTickMarks,m=!0;this._vals.minor=a,g==wijmo_chart_1.TickMark.Outside?d=1:g==wijmo_chart_1.TickMark.Inside?d=-1:g==wijmo_chart_1.TickMark.Cross?d=0:m=!1,this.axisType==wijmo_chart_1.AxisType.Y?(t.stroke=c,t.strokeWidth=u,a.forEach(a=>{var e=this.convert(a);if(_&&this._renderYGridLine(t,s,e,h),m&&(l.forEach((a,r)=>{if(o&&r>0){i=a.value-(a.value-l[r-1].value)/2;var h=s._convertPoint(e,i);this._drawMinorTickLength(t,d,i,h)}i=a.value;var _=s._convertPoint(e,i);this._drawMinorTickLength(t,d,i,_)}),o&&n>=2)){i=l[n-1].value-(l[n-2].value-l[n-1].value)/2;var r=s._convertPoint(e,i);this._drawMinorTickLength(t,d,i,r)}})):(t.stroke=c,t.strokeWidth=u,a.forEach(a=>{var e=this.convert(a);_&&(this._renderXGridLine(t,s,e,h),m&&this._drawMinorTickLength(t,d,e-Math.PI/2,s._convertPoint(s._radius,e)))}))}_drawMinorTickLength(t,a,e,r){var i=this._TICK_HEIGHT,s=wijmo_chart_1.FlexChart._CSS_TICK_MINOR,h=.5*(a-1)*i*Math.cos(e),_=.5*(1+a)*i*Math.cos(e),l=.5*(a-1)*i*Math.sin(e),n=.5*(1+a)*i*Math.sin(e);t.drawLine(r.x+h,r.y+l,r.x+_,r.y+n,s)}_renderLabelsAndTicks(t,a,e,r,i,s,h,_,l){this._points=[],i=this.labelAngle||0;var n,o=this._chart,c=this.labelPadding||2,u=wijmo_chart_1.FlexChart._CSS_LABEL,d=wijmo_chart_1.FlexChart._CSS_GRIDLINE,g=wijmo_chart_1.FlexChart._CSS_TICK,m=wijmo_chart_1.FlexChart._FG,p=this._TICK_WIDTH,v=this.majorGrid,x=wijmo_chart_1.FlexChart._FG,y=this._GRIDLINE_WIDTH,w=o.startAngle*Math.PI/180,A=(o.totalAngle,Math.PI,1);if(this.axisType==wijmo_chart_1.AxisType.Y){v=e!=this.actualMin&&v&&e!=this.actualMax;var T=this.convert(e),P=o._convertPoint(T,w);if(v&&(t.stroke=x,t.strokeWidth=y,this._renderYGridLine(t,o,T,d)),t.stroke=m,t.strokeWidth=p,h){(n=(o.startAngle%360+360)%360)<=90&&n>=75||n>=270&&n<=285?A=2:(n>90&&n<=105||n<270&&n>=255)&&(A=0);var j=new wijmo_1.Point(P.x-c-Math.abs(_-l),P.y);this._axisLabels.push({val:e,text:r,pos:j,align:2,vAlign:A,labelAngle:i,class:u})}s!=wijmo_chart_1.TickMark.None&&t.drawLine(P.x-l*Math.cos(w),P.y-l*Math.sin(w),P.x-_*Math.cos(w),P.y-_*Math.sin(w),g)}else{var C=this.convert(e);if(v&&(t.stroke=x,t.strokeWidth=y,this._renderXGridLine(t,o,C,d)),t.stroke=m,t.strokeWidth=p,h){var L,M,f;j=o._convertPoint(o._radius+c,C);L=o._angles&&o._angles.length?o._angles[a].angle:o.startAngle+(e-this.actualMin)*o.totalAngle/(this.actualMax-this.actualMin),L=(L%=360)>=0?L:L+360,M=this._getXLabelVAlign(L),f=this._getXLabelAlign(L),o._isPolar&&(r=this._formatValue(L)),i>0?wijmo_chart_1.FlexChart._renderRotatedText(t,r,j,f,M,j,i,u):i<0?wijmo_chart_1.FlexChart._renderRotatedText(t,r,j,f,M,j,i,u):this._renderLabel(t,e,r,j,f,M,u)}s!=wijmo_chart_1.TickMark.None&&this._renderXTick(t,o,C,g,_,l)}return!0}_renderXGridLine(t,a,e,r){var i=a._center,s=a._convertPoint(a._radius,e);t.drawLine(i.x,i.y,s.x,s.y,r)}_renderXTick(t,a,e,r,i,s){var h,_;a._center;h=a._convertPoint(a._radius+i,e),_=a._convertPoint(a._radius+s,e),t.drawLine(h.x,h.y,_.x,_.y,r)}_renderYGridLine(t,a,e,r){a._angles;var i=a._center,s=a.startAngle*Math.PI/180,h=a.totalAngle*Math.PI/180;a._isPolar?(s=(a.startAngle-90)*Math.PI/180,s=a.reversed?s-h:s,t.drawPieSegment(i.x,i.y,e,s,h,r)):this._renderPolygon(t,e,r)}_getXLabelVAlign(t){var a=1,e=this._chart,r=e.startAngle;return e.reversed&&(t=(360+r+(r%360-t%360))%360),0===t?a=2:180===t&&(a=0),a}_getXLabelAlign(t){var a=0,e=this._chart,r=e.startAngle;return e.reversed&&(t=(360+r+(r%360-t%360))%360),t>0&&t<180?a=-1:t>180&&t<360&&(a=1),a+1}_createTimeLabels(t,a,e,r){if(this._axisType==wijmo_chart_1.AxisType.Y)super._createTimeLabels(t,a,e,r);else{var i=this._values;this.format;if(!i||0===i.length)return;i.forEach(t=>{e.push(t),r.push(this._formatValue(t))})}}_niceNumber(t,a,e){var r=this._chart,i=this.actualMax-this.actualMin,s=r.totalAngle;return s>360&&(s%=360),r._isPolar?s%8==0?i/8:s%6==0?i/6:s%4==0?i/4:s%3==0?i/3:s%2==0?i/2:super._niceNumber(t,a,e):super._niceNumber(t,a,e)}}exports.FlexRadarAxis=FlexRadarAxis,wijmo_1._registerModule("wijmo.chart.radar",selfModule);

@@ -1,1 +0,14 @@

import{Point,Rect,asType,asEnum,DataType,isDate,isNumber,asNumber,asBoolean,assert,Binding,asDate,_registerModule}from"@grapecity/wijmo";import{_BarPlotter,_DataInfo,_DataPoint,SeriesBase,Stacking,_PieSegment,_DonutSegment,_LinePlotter,_BasePlotter,_LinesArea,ChartType,_CircleArea,FlexChartCore,Position,TickMark,Axis,AxisType,FlexChart}from"@grapecity/wijmo.chart";import*as selfModule from"@grapecity/wijmo.chart.radar";export class FlexRadarSeries extends SeriesBase{get chartType(){return this._finChartType}set chartType(t){(t=asEnum(t,RadarChartType,!0))!=this._finChartType&&(this._finChartType=t,this._invalidate())}_getChartType(){var t;switch(this.chartType){case RadarChartType.Area:t=ChartType.Area;break;case RadarChartType.Line:t=ChartType.Line;break;case RadarChartType.Column:t=ChartType.Column;break;case RadarChartType.LineSymbols:t=ChartType.LineSymbols;break;case RadarChartType.Scatter:t=ChartType.Scatter}return t}};export class _RadarLinePlotter extends _LinePlotter{constructor(){super(...arguments),this.isArea=!1}_getLabelPoint(t,e){var a=t._getAxisX(),r=t._getAxisY(),i=a.convert(e.dataX),s=r.convert(e.dataY);return this.chart._convertPoint(s,i)}plotSeries(t,e,a,r,i,s,l){var n=asType(r,SeriesBase),h=this.chart,o=n._getChartType()||h._getChartType(),_=h.series.indexOf(r),c=r.getValues(0),u=r.getValues(1);if(!c)return;u||(u=this.dataInfo.getXVals());var d=_BasePlotter.cloneStyle(r.style,["fill"]),g=c.length,p=!0;u?g=Math.min(g,u.length):(p=!1,u=new Array(g));var v=this._DEFAULT_WIDTH,x=n._getSymbolFill(_),y=n._getAltSymbolFill(_)||x,T=n._getSymbolStroke(_),A=n._getAltSymbolStroke(_)||T,m=n._getSymbolSize();t.stroke=T,t.strokeWidth=v,t.fill=x;var P=new Array,C=new Array,L=a.actualMax,M=this.stacking!=Stacking.None&&!n._isCustomAxisY(),f=this.stacking==Stacking.Stacked100pc&&!n._isCustomAxisY();void 0!==n._getChartType()&&(M=f=!1);var k=n.interpolateNulls,S=!1;let b=this.getItemFormatter(r);for(var I=0;I<g;I++){var w=p?u[I]:I,R=null==c[I]?0:c[I];if(_DataInfo.isValid(w)&&_DataInfo.isValid(R)){if(M){if(f)R/=this.dataInfo.getStackedAbsSum(w);if(R>=0){var N=isNaN(this.stackPos[w])?0:this.stackPos[w];R=this.stackPos[w]=N+R}else{N=isNaN(this.stackNeg[w])?0:this.stackNeg[w];R=this.stackNeg[w]=N+R}}var D;R=Math.min(R,L),D=new _DataPoint(_,I,w,R);var F=e.convert(w),X=a.convert(R),V=this.chart._convertPoint(X,F);if(w=V.x,R=V.y,isNaN(w)||isNaN(R))S=!0,!0!==k&&(P.push(void 0),C.push(void 0));else{P.push(w),C.push(R);var G=new _CircleArea(new Point(w,R),.5*m);G.tag=D,this.hitTester.add(G,_)}}else S=!0,!0!==k&&(P.push(void 0),C.push(void 0))}var Y=0;if(this.hasLines)if(this.isArea?t.fill=x||i._getColorLight(_):t.fill="none",S&&!0!==k){var E=[],B=[];for(I=0;I<g;I++)void 0===P[I]?(E.push(void 0),B.push(0)):(E.push(P[I]),B.push(C[I]));E.length>1&&(h._isPolar&&o!==ChartType.Area?this._drawLines(t,E,B,null,d,this.chart._plotrectId):(h.totalAngle<360&&(E.push(h._center.x),B.push(h._center.y)),t.drawPolygon(E,B,null,d,this.chart._plotrectId)),this.hitTester.add(new _LinesArea(E,B),_),Y++)}else h._isPolar&&o!==ChartType.Area?this._drawLines(t,P,C,null,d,this.chart._plotrectId):(h.totalAngle<360&&(P.push(h._center.x),C.push(h._center.y)),t.drawPolygon(P,C,null,d,this.chart._plotrectId)),this.hitTester.add(new _LinesArea(P,C),_),Y++;t.fill=x;for(I=0;I<g;I++){w=P[I],R=C[I];!1===this.hasLines&&(t.fill=c[I]>0?x:y,t.stroke=c[I]>0?T:A),this.isValid(w,R,e,a)&&((this.hasSymbols||b)&&m>0&&this._drawSymbol(t,w,R,m,n,I,b),r._setPointIndex(I,Y),Y++)}}};export class _RadarBarPlotter extends _BarPlotter{adjustLimits(t,e){this.dataInfo=t;var a=t.getMinX(),r=t.getMinY(),i=t.getMaxX(),s=t.getMaxY(),l=t.getDeltaX();return l<=0&&(l=1),this.chart.totalAngle<360&&(l=0),this.unload(),this.chart.axisY._getLogBase()||(this.origin>s?s=this.origin:this.origin<r&&(r=this.origin)),new Rect(a,r,i-a+l,s-r)}_getLabelPoint(t,e){var a=t._getAxisX(),r=t._getAxisY(),i=a.convert(e.dataX),s=r.convert(e.dataY);return this.chart._convertPoint(s,i)}plotSeries(t,e,a,r,i,s,l){var n=this.chart.series.indexOf(r),h=asType(r,SeriesBase),o=(this.chart._options,this.width),_=this.chart,c=-90*Math.PI/180;s=s||0;var u,d=h._getAxisY()._uniqueId,g=(this.stackNegMap[d],this.stackPosMap[d]),p=this.stacking!=Stacking.None,v=this.stacking==Stacking.Stacked100pc,x=r.getValues(0),y=r.getValues(1);if(x){var T;y||(y=this.dataInfo.getXVals()),(T=y?_.totalAngle/y.length:_.totalAngle/(e.actualMax-e.actualMin))>0&&(o=p?T*o*Math.PI/180:T*Math.pow(o,s+1)*Math.PI/180);var A=h._getSymbolFill(n),m=h._getAltSymbolFill(n)||A,P=h._getSymbolStroke(n),C=h._getAltSymbolStroke(n)||P,L=x.length;null!=y&&(L=Math.min(L,y.length));var M,f,k=this.origin,S=0;void 0!==h._getChartType()&&(p=v=!1),k<a.actualMin?k=a.actualMin:k>a.actualMax&&(k=a.actualMax);a.convert(k);var b=e.actualMin,I=e.actualMax,w=a.actualMax;h._isCustomAxisY()&&(p=v=!1),_._areas[n]||(_._areas[n]=[]);for(var R=0;R<L;R++){var N=y?y[R]:R,D=null==x[R]?0:x[R];if(this._getSymbolOrigin&&a.convert(this._getSymbolOrigin(k,R,L)),this._getSymbolStyles){var F=this._getSymbolStyles(R,L);A=F&&F.fill?F.fill:A,m=F&&F.fill?F.fill:m,P=F&&F.stroke?F.stroke:P,C=F&&F.stroke?F.stroke:C}if(M=D>0?A:m,f=D>0?P:C,t.fill=M,t.stroke=f,_DataInfo.isValid(N)&&_DataInfo.isValid(D)){if(p){var X,V,G=N-.5*o,Y=N+.5*o;if(G<b&&Y<b||G>I&&Y>I)continue;if(G=e.convert(G),Y=e.convert(Y),!_DataInfo.isValid(G)||!_DataInfo.isValid(Y))continue;if(v)D/=this.dataInfo.getStackedAbsSum(N);var E=isNaN(g[N])?0:g[N];X=E,V=E+D,g[N]=E+D;var B=e.convert(N),O=a.convert(X),W=a.convert(V);B-=o/2,t.drawDonutSegment(_._center.x,_._center.y,W,O,B+c,o,null,h.symbolStyle),(u=new _DonutSegment(new Point(_._center.x,_._center.y),W,O,B+c,o,_.startAngle||0)).tag=new _DataPoint(n,R,N,E+D),this.hitTester.add(u,n)}else{B=e.convert(N);var j=a.convert(Math.min(D,w));_._convertPoint(j,B);B-=o/2,t.drawPieSegment(_._center.x,_._center.y,j,B+c,o,null,h.symbolStyle),(u=new _PieSegment(new Point(_._center.x,_._center.y),j,B+c,o,_.startAngle)).tag=new _DataPoint(n,R,N,D),this.hitTester.add(u,n)}_._areas[n].push(u),r._setPointIndex(R,S),S++}}}}};export var RadarChartType;!function(t){t[t.Column=0]="Column",t[t.Scatter=1]="Scatter",t[t.Line=2]="Line",t[t.LineSymbols=3]="LineSymbols",t[t.Area=4]="Area"}(RadarChartType||(RadarChartType={}));export class FlexRadar extends FlexChartCore{constructor(t,e){super(t,e),this._chartType=RadarChartType.Line,this._startAngle=0,this._totalAngle=360,this._reversed=!1,this._areas=[]}get _radarLinePlotter(){return null==this.__radarLinePlotter&&(this.__radarLinePlotter=new _RadarLinePlotter,this._initPlotter(this.__radarLinePlotter)),this.__radarLinePlotter}get _radarColumnPlotter(){return null==this.__radarColumnPlotter&&(this.__radarColumnPlotter=new _RadarBarPlotter,this._initPlotter(this.__radarColumnPlotter)),this.__radarColumnPlotter}_initAxes(){super._initAxes(),this.axes.pop(),this.axes.pop(),this.axisX=new FlexRadarAxis(Position.Bottom),this.axisX.majorGrid=!0,this.axisY=new FlexRadarAxis(Position.Left),this.axisY.majorTickMarks=TickMark.Outside,this.axes.push(this.axisX),this.axes.push(this.axisY)}_layout(t,e,a){super._layout(t,e,a);var r=this.axisX._height;this._plotRect.top+=r/2;var i=this._plotRect;this._radius=Math.min(i.width,i.height)/2,this._center=new Point(i.left+i.width/2,i.top+i.height/2)}get chartType(){return this._chartType}set chartType(t){(t=asEnum(t,RadarChartType))!=this._chartType&&(this._chartType=t,this.invalidate())}get startAngle(){return this._startAngle}set startAngle(t){t!=this._startAngle&&(this._startAngle=asNumber(t,!0),this.invalidate())}get totalAngle(){return this._totalAngle}set totalAngle(t){t!=this._totalAngle&&t>=0&&(this._totalAngle=asNumber(t,!0),this._totalAngle<=0&&(assert(!1,"totalAngle must be greater than 0."),this._totalAngle=0),this._totalAngle>360&&(assert(!1,"totalAngle must be less than or equal to 360."),this._totalAngle=360),this.invalidate())}get reversed(){return this._reversed}set reversed(t){t!=this._reversed&&(this._reversed=asBoolean(t,!0),this.invalidate())}get stacking(){return this._stacking}set stacking(t){(t=asEnum(t,Stacking))!=this._stacking&&(this._stacking=t,this.invalidate())}_getChartType(){var t=ChartType.Line;switch(this.chartType){case RadarChartType.Area:t=ChartType.Area;break;case RadarChartType.Line:t=ChartType.Line;break;case RadarChartType.Column:t=ChartType.Column;break;case RadarChartType.LineSymbols:t=ChartType.LineSymbols;break;case RadarChartType.Scatter:t=ChartType.Scatter}return t}_getPlotter(t){var e=this.chartType,a=null;if(t){var r=t.chartType;null!=r&&r!=e&&(e=r,!0)}switch(e){case RadarChartType.Line:this._radarLinePlotter.hasSymbols=!1,this._radarLinePlotter.hasLines=!0,this._radarLinePlotter.isArea=!1,a=this._radarLinePlotter;break;case RadarChartType.LineSymbols:this._radarLinePlotter.hasSymbols=!0,this._radarLinePlotter.hasLines=!0,this._radarLinePlotter.isArea=!1,a=this._radarLinePlotter;break;case RadarChartType.Area:this._radarLinePlotter.hasSymbols=!1,this._radarLinePlotter.hasLines=!0,this._radarLinePlotter.isArea=!0,a=this._radarLinePlotter;break;case RadarChartType.Scatter:this._radarLinePlotter.hasSymbols=!0,this._radarLinePlotter.hasLines=!1,this._radarLinePlotter.isArea=!1,a=this._radarLinePlotter;break;case RadarChartType.Column:this._radarColumnPlotter.isVolume=!1,this._radarColumnPlotter.width=.8,a=this._radarColumnPlotter;break;default:a=super._getPlotter(t)}return a}_convertPoint(t,e){var a=new Point,r=this._center;return a.x=r.x+t*Math.sin(e),a.y=r.y-t*Math.cos(e),a}_createSeries(){return new FlexRadarSeries}_clearCachedValues(){super._clearCachedValues(),this._isPolar=!1,this._areas=[]}_performBind(){if(this._xDataType=null,this._xlabels.splice(0),this._xvals.splice(0),this._cv){var t=this._cv.items;if(t){for(var e=t.length,a=0;a<e;a++){var r=t[a];let e=this.bindingX?new Binding(this.bindingX):null;if(e){var i=e.getValue(r);isNumber(i)?(this._xvals.push(asNumber(i)),this._xDataType=DataType.Number):isDate(i)&&(this._xDataType=DataType.Date),this._xlabels.push(i)}}this._xvals.length==e?this._xlabels.splice(0):this._xvals.splice(0)}}this._xDataType===DataType.Number&&(this._isPolar=!0)}_prepareRender(){super._prepareRender(),this._areas=[]}};export class FlexRadarAxis extends Axis{constructor(){super(...arguments),this._points=[],this._axisLabels=[]}_render(t){if(this._hasVisibileSeries()){super._render(t);var e=this._axisLabels;if(e.length){var a=()=>{var r=this.axisType==AxisType.X?"wj-axis-x-labels "+FlexChart._CSS_AXIS_X:"wj-axis-y-labels "+FlexChart._CSS_AXIS_Y;t.startGroup(r),e.forEach(e=>{var a=e.labelAngle;a>0?FlexChart._renderRotatedText(t,e.text,e.pos,e.align,e.vAlign,e.pos,a,e.class):a<0?FlexChart._renderRotatedText(t,e.text,e.pos,e.align,e.vAlign,e.pos,a,e.class):this._renderLabel(t,e.val,e.text,e.pos,e.align,e.vAlign,e.class)}),t.endGroup(),this._axisLabels=[],this._chart.rendered.removeHandler(a)};this._chart.rendered.addHandler(a,this)}}}_getHeight(t,e){var a=super._getHeight(t,e);return this._axisType==AxisType.Y&&(a=4),this._height=2*a,2*a}_getActualRange(){return this._isTimeAxis&&null!=this.__actualMax&&null!=this.__actualMin?this.__actualMax-this.__actualMin:super._getActualRange()}_updateActualLimits(t,e,a,r=null,i=null){super._updateActualLimits(t,e,a,r,i);var s,l=this._chart,n=this._lbls,h=this.actualMin.valueOf?this.actualMin.valueOf():this.actualMin,o=this.actualMax.valueOf?this.actualMax.valueOf():this.actualMax;this._lbls&&this===l.axisX&&(l._angles=[],this._isTimeAxis&&0===this._lbls.length&&this._values.forEach(t=>{n.push(this._formatValue(t))}),s=n.length,l.totalAngle<360&&(s-=1),n.forEach((t,e)=>{var a=h+e/s*(o-h),r=l.startAngle+e/s*l.totalAngle;isNaN(r)||isNaN(a)||l._angles.push({value:this.convert(a),angle:r}),this._isTimeAxis?((null==this.__actualMin||this.__actualMin>t)&&(this.__actualMin=t),(null==this.__actualMax||this.__actualMax<t)&&(this.__actualMax=t)):null==this.__actualMin&&null==this.__actualMax||(this.__actualMin=null,this.__actualMax=null)}),this._isTimeAxis&&this._lbls.length>0&&(this._updateAutoFormat(0),this._lbls=n.map(t=>{let e=asDate(t).valueOf();return this._formatValue(e)})))}_updateActualLimitsByChartType(t,e,a){var r=this._chart;if(r._getChartType()!=ChartType.Column&&360===r.totalAngle&&this.axisType===AxisType.X)if(this._isTimeAxis){var i=(r._xlabels.length||r._xvals.length)-1;a+=(a-e)/(i=i<1?1:i)}else r._isPolar||(a+=1);return{min:e,max:a}}convert(t,e,a){var r=null==e?this.actualMax:e,i=null==a?this.actualMin:a,s=this._chart;if(!s)return NaN;if(r==i)return 0;if(this.axisType===AxisType.X)return s.reversed?(s.startAngle-(t-i)/(r-i)*s.totalAngle)*Math.PI/180:(s.startAngle+(t-i)/(r-i)*s.totalAngle)*Math.PI/180;if(this._getLogBase()){if(t<=0)return NaN;var l=Math.log(r/i);return Math.log(t/i)/l*s._radius}return(t-i)/(r-i)*s._radius}_renderLineAndTitle(t){var e=this._chart,a=FlexChart._CSS_LINE,r=(e.startAngle-90)*Math.PI/180,i=e.totalAngle*Math.PI/180,s=e._radius;this.axisType===AxisType.X&&this.axisLine&&(t.stroke=FlexChart._FG,e._isPolar?(r=e.reversed?r-i:r,t.drawPieSegment(e._center.x,e._center.y,s,r,i,a)):this._renderPolygon(t,s,a))}_renderPolygon(t,e,a){var r=this._chart,i=r._angles,s=i.length,l=r.axisX.minorGrid,n=[],h=[];if(i.forEach((t,a)=>{if(l&&a>0){var s=r._convertPoint(e,t.value-(t.value-i[a-1].value)/2);n.push(s.x),h.push(s.y)}var o=r._convertPoint(e,t.value);n.push(o.x),h.push(o.y)}),r.totalAngle<360)n.push(r._center.x),h.push(r._center.y);else if(l&&s>=2){var o=r._convertPoint(e,i[s-1].value-(i[s-2].value-i[s-1].value)/2);n.push(o.x),h.push(o.y)}t.drawPolygon(n,h,a)}_renderMinors(t,e,a,r){var i,s=this._chart,l=FlexChart._CSS_GRIDLINE_MINOR,n=this.minorGrid,h=s._angles,o=h.length,_=s.axisX.minorGrid,c=FlexChart._FG,u=this._GRIDLINE_WIDTH,d=(s.startAngle,Math.PI,s.totalAngle,Math.PI,this._TICK_OVERLAP),g=this.minorTickMarks,p=!0;this._vals.minor=e,g==TickMark.Outside?d=1:g==TickMark.Inside?d=-1:g==TickMark.Cross?d=0:p=!1,this.axisType==AxisType.Y?(t.stroke=c,t.strokeWidth=u,e.forEach(e=>{var a=this.convert(e);if(n&&this._renderYGridLine(t,s,a,l),p&&(h.forEach((e,r)=>{if(_&&r>0){i=e.value-(e.value-h[r-1].value)/2;var l=s._convertPoint(a,i);this._drawMinorTickLength(t,d,i,l)}i=e.value;var n=s._convertPoint(a,i);this._drawMinorTickLength(t,d,i,n)}),_&&o>=2)){i=h[o-1].value-(h[o-2].value-h[o-1].value)/2;var r=s._convertPoint(a,i);this._drawMinorTickLength(t,d,i,r)}})):(t.stroke=c,t.strokeWidth=u,e.forEach(e=>{var a=this.convert(e);n&&(this._renderXGridLine(t,s,a,l),p&&this._drawMinorTickLength(t,d,a-Math.PI/2,s._convertPoint(s._radius,a)))}))}_drawMinorTickLength(t,e,a,r){var i=this._TICK_HEIGHT,s=FlexChart._CSS_TICK_MINOR,l=.5*(e-1)*i*Math.cos(a),n=.5*(1+e)*i*Math.cos(a),h=.5*(e-1)*i*Math.sin(a),o=.5*(1+e)*i*Math.sin(a);t.drawLine(r.x+l,r.y+h,r.x+n,r.y+o,s)}_renderLabelsAndTicks(t,e,a,r,i,s,l,n,h){this._points=[],i=this.labelAngle||0;var o,_=this._chart,c=this.labelPadding||2,u=FlexChart._CSS_LABEL,d=FlexChart._CSS_GRIDLINE,g=FlexChart._CSS_TICK,p=FlexChart._FG,v=this._TICK_WIDTH,x=this.majorGrid,y=FlexChart._FG,T=this._GRIDLINE_WIDTH,A=_.startAngle*Math.PI/180,m=(_.totalAngle,Math.PI,1);if(this.axisType==AxisType.Y){x=a!=this.actualMin&&x&&a!=this.actualMax;var P=this.convert(a),C=_._convertPoint(P,A);if(x&&(t.stroke=y,t.strokeWidth=T,this._renderYGridLine(t,_,P,d)),t.stroke=p,t.strokeWidth=v,l){(o=(_.startAngle%360+360)%360)<=90&&o>=75||o>=270&&o<=285?m=2:(o>90&&o<=105||o<270&&o>=255)&&(m=0);var L=new Point(C.x-c-Math.abs(n-h),C.y);this._axisLabels.push({val:a,text:r,pos:L,align:2,vAlign:m,labelAngle:i,class:u})}s!=TickMark.None&&t.drawLine(C.x-h*Math.cos(A),C.y-h*Math.sin(A),C.x-n*Math.cos(A),C.y-n*Math.sin(A),g)}else{var M=this.convert(a);if(x&&(t.stroke=y,t.strokeWidth=T,this._renderXGridLine(t,_,M,d)),t.stroke=p,t.strokeWidth=v,l){var f,k,S;L=_._convertPoint(_._radius+c,M);f=_._angles&&_._angles.length?_._angles[e].angle:_.startAngle+(a-this.actualMin)*_.totalAngle/(this.actualMax-this.actualMin),f=(f%=360)>=0?f:f+360,k=this._getXLabelVAlign(f),S=this._getXLabelAlign(f),_._isPolar&&(r=this._formatValue(f)),i>0?FlexChart._renderRotatedText(t,r,L,S,k,L,i,u):i<0?FlexChart._renderRotatedText(t,r,L,S,k,L,i,u):this._renderLabel(t,a,r,L,S,k,u)}s!=TickMark.None&&this._renderXTick(t,_,M,g,n,h)}return!0}_renderXGridLine(t,e,a,r){var i=e._center,s=e._convertPoint(e._radius,a);t.drawLine(i.x,i.y,s.x,s.y,r)}_renderXTick(t,e,a,r,i,s){var l,n;e._center;l=e._convertPoint(e._radius+i,a),n=e._convertPoint(e._radius+s,a),t.drawLine(l.x,l.y,n.x,n.y,r)}_renderYGridLine(t,e,a,r){e._angles;var i=e._center,s=e.startAngle*Math.PI/180,l=e.totalAngle*Math.PI/180;e._isPolar?(s=(e.startAngle-90)*Math.PI/180,s=e.reversed?s-l:s,t.drawPieSegment(i.x,i.y,a,s,l,r)):this._renderPolygon(t,a,r)}_getXLabelVAlign(t){var e=1,a=this._chart,r=a.startAngle;return a.reversed&&(t=(360+r+(r%360-t%360))%360),0===t?e=2:180===t&&(e=0),e}_getXLabelAlign(t){var e=0,a=this._chart,r=a.startAngle;return a.reversed&&(t=(360+r+(r%360-t%360))%360),t>0&&t<180?e=-1:t>180&&t<360&&(e=1),e+1}_createTimeLabels(t,e,a,r){if(this._axisType==AxisType.Y)super._createTimeLabels(t,e,a,r);else{var i=this._values;this.format;if(!i||0===i.length)return;i.forEach(t=>{a.push(t),r.push(this._formatValue(t))})}}_niceNumber(t,e,a){var r=this._chart,i=this.actualMax-this.actualMin,s=r.totalAngle;return s>360&&(s%=360),r._isPolar?s%8==0?i/8:s%6==0?i/6:s%4==0?i/4:s%3==0?i/3:s%2==0?i/2:super._niceNumber(t,e,a):super._niceNumber(t,e,a)}};_registerModule("wijmo.chart.radar",selfModule);
/*!
*
* Wijmo Library 5.20183.595-nightly.d20190405.t210807
* http://wijmo.com/
*
* Copyright(c) GrapeCity, Inc. All rights reserved.
*
* Licensed under the GrapeCity Commercial License.
* sales@wijmo.com
* wijmo.com/products/wijmo-5/license/
*
*/
import{Point,Rect,asType,asEnum,DataType,isDate,isNumber,asNumber,asBoolean,assert,Binding,asDate,_registerModule}from"@grapecity/wijmo";import{_BarPlotter,_DataInfo,_DataPoint,SeriesBase,Stacking,_PieSegment,_DonutSegment,_LinePlotter,_BasePlotter,_LinesArea,ChartType,_CircleArea,FlexChartCore,Position,TickMark,Axis,AxisType,FlexChart}from"@grapecity/wijmo.chart";import*as selfModule from"@grapecity/wijmo.chart.radar";export class FlexRadarSeries extends SeriesBase{get chartType(){return this._finChartType}set chartType(t){(t=asEnum(t,RadarChartType,!0))!=this._finChartType&&(this._finChartType=t,this._invalidate())}_getChartType(){var t;switch(this.chartType){case RadarChartType.Area:t=ChartType.Area;break;case RadarChartType.Line:t=ChartType.Line;break;case RadarChartType.Column:t=ChartType.Column;break;case RadarChartType.LineSymbols:t=ChartType.LineSymbols;break;case RadarChartType.Scatter:t=ChartType.Scatter}return t}};export class _RadarLinePlotter extends _LinePlotter{constructor(){super(...arguments),this.isArea=!1}_getLabelPoint(t,e){var a=t._getAxisX(),r=t._getAxisY(),i=a.convert(e.dataX),s=r.convert(e.dataY);return this.chart._convertPoint(s,i)}plotSeries(t,e,a,r,i,s,l){var n=asType(r,SeriesBase),h=this.chart,o=n._getChartType()||h._getChartType(),_=h.series.indexOf(r),c=r.getValues(0),u=r.getValues(1);if(!c)return;u||(u=this.dataInfo.getXVals());var d=_BasePlotter.cloneStyle(r.style,["fill"]),g=c.length,p=!0;u?g=Math.min(g,u.length):(p=!1,u=new Array(g));var v=this._DEFAULT_WIDTH,x=n._getSymbolFill(_),y=n._getAltSymbolFill(_)||x,T=n._getSymbolStroke(_),A=n._getAltSymbolStroke(_)||T,m=n._getSymbolSize();t.stroke=T,t.strokeWidth=v,t.fill=x;var P=new Array,C=new Array,L=a.actualMax,M=this.stacking!=Stacking.None&&!n._isCustomAxisY(),f=this.stacking==Stacking.Stacked100pc&&!n._isCustomAxisY();void 0!==n._getChartType()&&(M=f=!1);var k=n.interpolateNulls,S=!1;let b=this.getItemFormatter(r);for(var I=0;I<g;I++){var w=p?u[I]:I,R=null==c[I]?0:c[I];if(_DataInfo.isValid(w)&&_DataInfo.isValid(R)){if(M){if(f)R/=this.dataInfo.getStackedAbsSum(w);if(R>=0){var N=isNaN(this.stackPos[w])?0:this.stackPos[w];R=this.stackPos[w]=N+R}else{N=isNaN(this.stackNeg[w])?0:this.stackNeg[w];R=this.stackNeg[w]=N+R}}var D;R=Math.min(R,L),D=new _DataPoint(_,I,w,R);var F=e.convert(w),X=a.convert(R),V=this.chart._convertPoint(X,F);if(w=V.x,R=V.y,isNaN(w)||isNaN(R))S=!0,!0!==k&&(P.push(void 0),C.push(void 0));else{P.push(w),C.push(R);var G=new _CircleArea(new Point(w,R),.5*m);G.tag=D,this.hitTester.add(G,_)}}else S=!0,!0!==k&&(P.push(void 0),C.push(void 0))}var Y=0;if(this.hasLines)if(this.isArea?t.fill=x||i._getColorLight(_):t.fill="none",S&&!0!==k){var E=[],B=[];for(I=0;I<g;I++)void 0===P[I]?(E.push(void 0),B.push(0)):(E.push(P[I]),B.push(C[I]));E.length>1&&(h._isPolar&&o!==ChartType.Area?this._drawLines(t,E,B,null,d,this.chart._plotrectId):(h.totalAngle<360&&(E.push(h._center.x),B.push(h._center.y)),t.drawPolygon(E,B,null,d,this.chart._plotrectId)),this.hitTester.add(new _LinesArea(E,B),_),Y++)}else h._isPolar&&o!==ChartType.Area?this._drawLines(t,P,C,null,d,this.chart._plotrectId):(h.totalAngle<360&&(P.push(h._center.x),C.push(h._center.y)),t.drawPolygon(P,C,null,d,this.chart._plotrectId)),this.hitTester.add(new _LinesArea(P,C),_),Y++;t.fill=x;for(I=0;I<g;I++){w=P[I],R=C[I];!1===this.hasLines&&(t.fill=c[I]>0?x:y,t.stroke=c[I]>0?T:A),this.isValid(w,R,e,a)&&((this.hasSymbols||b)&&m>0&&this._drawSymbol(t,w,R,m,n,I,b),r._setPointIndex(I,Y),Y++)}}};export class _RadarBarPlotter extends _BarPlotter{adjustLimits(t,e){this.dataInfo=t;var a=t.getMinX(),r=t.getMinY(),i=t.getMaxX(),s=t.getMaxY(),l=t.getDeltaX();return l<=0&&(l=1),this.chart.totalAngle<360&&(l=0),this.unload(),this.chart.axisY._getLogBase()||(this.origin>s?s=this.origin:this.origin<r&&(r=this.origin)),new Rect(a,r,i-a+l,s-r)}_getLabelPoint(t,e){var a=t._getAxisX(),r=t._getAxisY(),i=a.convert(e.dataX),s=r.convert(e.dataY);return this.chart._convertPoint(s,i)}plotSeries(t,e,a,r,i,s,l){var n=this.chart.series.indexOf(r),h=asType(r,SeriesBase),o=(this.chart._options,this.width),_=this.chart,c=-90*Math.PI/180;s=s||0;var u,d=h._getAxisY()._uniqueId,g=(this.stackNegMap[d],this.stackPosMap[d]),p=this.stacking!=Stacking.None,v=this.stacking==Stacking.Stacked100pc,x=r.getValues(0),y=r.getValues(1);if(x){var T;y||(y=this.dataInfo.getXVals()),(T=y?_.totalAngle/y.length:_.totalAngle/(e.actualMax-e.actualMin))>0&&(o=p?T*o*Math.PI/180:T*Math.pow(o,s+1)*Math.PI/180);var A=h._getSymbolFill(n),m=h._getAltSymbolFill(n)||A,P=h._getSymbolStroke(n),C=h._getAltSymbolStroke(n)||P,L=x.length;null!=y&&(L=Math.min(L,y.length));var M,f,k=this.origin,S=0;void 0!==h._getChartType()&&(p=v=!1),k<a.actualMin?k=a.actualMin:k>a.actualMax&&(k=a.actualMax);a.convert(k);var b=e.actualMin,I=e.actualMax,w=a.actualMax;h._isCustomAxisY()&&(p=v=!1),_._areas[n]||(_._areas[n]=[]);for(var R=0;R<L;R++){var N=y?y[R]:R,D=null==x[R]?0:x[R];if(this._getSymbolOrigin&&a.convert(this._getSymbolOrigin(k,R,L)),this._getSymbolStyles){var F=this._getSymbolStyles(R,L);A=F&&F.fill?F.fill:A,m=F&&F.fill?F.fill:m,P=F&&F.stroke?F.stroke:P,C=F&&F.stroke?F.stroke:C}if(M=D>0?A:m,f=D>0?P:C,t.fill=M,t.stroke=f,_DataInfo.isValid(N)&&_DataInfo.isValid(D)){if(p){var X,V,G=N-.5*o,Y=N+.5*o;if(G<b&&Y<b||G>I&&Y>I)continue;if(G=e.convert(G),Y=e.convert(Y),!_DataInfo.isValid(G)||!_DataInfo.isValid(Y))continue;if(v)D/=this.dataInfo.getStackedAbsSum(N);var E=isNaN(g[N])?0:g[N];X=E,V=E+D,g[N]=E+D;var B=e.convert(N),O=a.convert(X),W=a.convert(V);B-=o/2,t.drawDonutSegment(_._center.x,_._center.y,W,O,B+c,o,null,h.symbolStyle),(u=new _DonutSegment(new Point(_._center.x,_._center.y),W,O,B+c,o,_.startAngle||0)).tag=new _DataPoint(n,R,N,E+D),this.hitTester.add(u,n)}else{B=e.convert(N);var j=a.convert(Math.min(D,w));_._convertPoint(j,B);B-=o/2,t.drawPieSegment(_._center.x,_._center.y,j,B+c,o,null,h.symbolStyle),(u=new _PieSegment(new Point(_._center.x,_._center.y),j,B+c,o,_.startAngle)).tag=new _DataPoint(n,R,N,D),this.hitTester.add(u,n)}_._areas[n].push(u),r._setPointIndex(R,S),S++}}}}};export var RadarChartType;!function(t){t[t.Column=0]="Column",t[t.Scatter=1]="Scatter",t[t.Line=2]="Line",t[t.LineSymbols=3]="LineSymbols",t[t.Area=4]="Area"}(RadarChartType||(RadarChartType={}));export class FlexRadar extends FlexChartCore{constructor(t,e){super(t,e),this._chartType=RadarChartType.Line,this._startAngle=0,this._totalAngle=360,this._reversed=!1,this._areas=[]}get _radarLinePlotter(){return null==this.__radarLinePlotter&&(this.__radarLinePlotter=new _RadarLinePlotter,this._initPlotter(this.__radarLinePlotter)),this.__radarLinePlotter}get _radarColumnPlotter(){return null==this.__radarColumnPlotter&&(this.__radarColumnPlotter=new _RadarBarPlotter,this._initPlotter(this.__radarColumnPlotter)),this.__radarColumnPlotter}_initAxes(){super._initAxes(),this.axes.pop(),this.axes.pop(),this.axisX=new FlexRadarAxis(Position.Bottom),this.axisX.majorGrid=!0,this.axisY=new FlexRadarAxis(Position.Left),this.axisY.majorTickMarks=TickMark.Outside,this.axes.push(this.axisX),this.axes.push(this.axisY)}_layout(t,e,a){super._layout(t,e,a);var r=this.axisX._height;this._plotRect.top+=r/2;var i=this._plotRect;this._radius=Math.min(i.width,i.height)/2,this._center=new Point(i.left+i.width/2,i.top+i.height/2)}get chartType(){return this._chartType}set chartType(t){(t=asEnum(t,RadarChartType))!=this._chartType&&(this._chartType=t,this.invalidate())}get startAngle(){return this._startAngle}set startAngle(t){t!=this._startAngle&&(this._startAngle=asNumber(t,!0),this.invalidate())}get totalAngle(){return this._totalAngle}set totalAngle(t){t!=this._totalAngle&&t>=0&&(this._totalAngle=asNumber(t,!0),this._totalAngle<=0&&(assert(!1,"totalAngle must be greater than 0."),this._totalAngle=0),this._totalAngle>360&&(assert(!1,"totalAngle must be less than or equal to 360."),this._totalAngle=360),this.invalidate())}get reversed(){return this._reversed}set reversed(t){t!=this._reversed&&(this._reversed=asBoolean(t,!0),this.invalidate())}get stacking(){return this._stacking}set stacking(t){(t=asEnum(t,Stacking))!=this._stacking&&(this._stacking=t,this.invalidate())}_getChartType(){var t=ChartType.Line;switch(this.chartType){case RadarChartType.Area:t=ChartType.Area;break;case RadarChartType.Line:t=ChartType.Line;break;case RadarChartType.Column:t=ChartType.Column;break;case RadarChartType.LineSymbols:t=ChartType.LineSymbols;break;case RadarChartType.Scatter:t=ChartType.Scatter}return t}_getPlotter(t){var e=this.chartType,a=null;if(t){var r=t.chartType;null!=r&&r!=e&&(e=r,!0)}switch(e){case RadarChartType.Line:this._radarLinePlotter.hasSymbols=!1,this._radarLinePlotter.hasLines=!0,this._radarLinePlotter.isArea=!1,a=this._radarLinePlotter;break;case RadarChartType.LineSymbols:this._radarLinePlotter.hasSymbols=!0,this._radarLinePlotter.hasLines=!0,this._radarLinePlotter.isArea=!1,a=this._radarLinePlotter;break;case RadarChartType.Area:this._radarLinePlotter.hasSymbols=!1,this._radarLinePlotter.hasLines=!0,this._radarLinePlotter.isArea=!0,a=this._radarLinePlotter;break;case RadarChartType.Scatter:this._radarLinePlotter.hasSymbols=!0,this._radarLinePlotter.hasLines=!1,this._radarLinePlotter.isArea=!1,a=this._radarLinePlotter;break;case RadarChartType.Column:this._radarColumnPlotter.isVolume=!1,this._radarColumnPlotter.width=.8,a=this._radarColumnPlotter;break;default:a=super._getPlotter(t)}return a}_convertPoint(t,e){var a=new Point,r=this._center;return a.x=r.x+t*Math.sin(e),a.y=r.y-t*Math.cos(e),a}_createSeries(){return new FlexRadarSeries}_clearCachedValues(){super._clearCachedValues(),this._isPolar=!1,this._areas=[]}_performBind(){if(this._xDataType=null,this._xlabels.splice(0),this._xvals.splice(0),this._cv){var t=this._cv.items;if(t){for(var e=t.length,a=0;a<e;a++){var r=t[a];let e=this.bindingX?new Binding(this.bindingX):null;if(e){var i=e.getValue(r);isNumber(i)?(this._xvals.push(asNumber(i)),this._xDataType=DataType.Number):isDate(i)&&(this._xDataType=DataType.Date),this._xlabels.push(i)}}this._xvals.length==e?this._xlabels.splice(0):this._xvals.splice(0)}}this._xDataType===DataType.Number&&(this._isPolar=!0)}_prepareRender(){super._prepareRender(),this._areas=[]}};export class FlexRadarAxis extends Axis{constructor(){super(...arguments),this._points=[],this._axisLabels=[]}_render(t){if(this._hasVisibileSeries()){super._render(t);var e=this._axisLabels;if(e.length){var a=()=>{var r=this.axisType==AxisType.X?"wj-axis-x-labels "+FlexChart._CSS_AXIS_X:"wj-axis-y-labels "+FlexChart._CSS_AXIS_Y;t.startGroup(r),e.forEach(e=>{var a=e.labelAngle;a>0?FlexChart._renderRotatedText(t,e.text,e.pos,e.align,e.vAlign,e.pos,a,e.class):a<0?FlexChart._renderRotatedText(t,e.text,e.pos,e.align,e.vAlign,e.pos,a,e.class):this._renderLabel(t,e.val,e.text,e.pos,e.align,e.vAlign,e.class)}),t.endGroup(),this._axisLabels=[],this._chart.rendered.removeHandler(a)};this._chart.rendered.addHandler(a,this)}}}_getHeight(t,e){var a=super._getHeight(t,e);return this._axisType==AxisType.Y&&(a=4),this._height=2*a,2*a}_getActualRange(){return this._isTimeAxis&&null!=this.__actualMax&&null!=this.__actualMin?this.__actualMax-this.__actualMin:super._getActualRange()}_updateActualLimits(t,e,a,r=null,i=null){super._updateActualLimits(t,e,a,r,i);var s,l=this._chart,n=this._lbls,h=this.actualMin.valueOf?this.actualMin.valueOf():this.actualMin,o=this.actualMax.valueOf?this.actualMax.valueOf():this.actualMax;this._lbls&&this===l.axisX&&(l._angles=[],this._isTimeAxis&&0===this._lbls.length&&this._values.forEach(t=>{n.push(this._formatValue(t))}),s=n.length,l.totalAngle<360&&(s-=1),n.forEach((t,e)=>{var a=h+e/s*(o-h),r=l.startAngle+e/s*l.totalAngle;isNaN(r)||isNaN(a)||l._angles.push({value:this.convert(a),angle:r}),this._isTimeAxis?((null==this.__actualMin||this.__actualMin>t)&&(this.__actualMin=t),(null==this.__actualMax||this.__actualMax<t)&&(this.__actualMax=t)):null==this.__actualMin&&null==this.__actualMax||(this.__actualMin=null,this.__actualMax=null)}),this._isTimeAxis&&this._lbls.length>0&&(this._updateAutoFormat(0),this._lbls=n.map(t=>{let e=asDate(t).valueOf();return this._formatValue(e)})))}_updateActualLimitsByChartType(t,e,a){var r=this._chart;if(r._getChartType()!=ChartType.Column&&360===r.totalAngle&&this.axisType===AxisType.X)if(this._isTimeAxis){var i=(r._xlabels.length||r._xvals.length)-1;a+=(a-e)/(i=i<1?1:i)}else r._isPolar||(a+=1);return{min:e,max:a}}convert(t,e,a){var r=null==e?this.actualMax:e,i=null==a?this.actualMin:a,s=this._chart;if(!s)return NaN;if(r==i)return 0;if(this.axisType===AxisType.X)return s.reversed?(s.startAngle-(t-i)/(r-i)*s.totalAngle)*Math.PI/180:(s.startAngle+(t-i)/(r-i)*s.totalAngle)*Math.PI/180;if(this._getLogBase()){if(t<=0)return NaN;var l=Math.log(r/i);return Math.log(t/i)/l*s._radius}return(t-i)/(r-i)*s._radius}_renderLineAndTitle(t){var e=this._chart,a=FlexChart._CSS_LINE,r=(e.startAngle-90)*Math.PI/180,i=e.totalAngle*Math.PI/180,s=e._radius;this.axisType===AxisType.X&&this.axisLine&&(t.stroke=FlexChart._FG,e._isPolar?(r=e.reversed?r-i:r,t.drawPieSegment(e._center.x,e._center.y,s,r,i,a)):this._renderPolygon(t,s,a))}_renderPolygon(t,e,a){var r=this._chart,i=r._angles,s=i.length,l=r.axisX.minorGrid,n=[],h=[];if(i.forEach((t,a)=>{if(l&&a>0){var s=r._convertPoint(e,t.value-(t.value-i[a-1].value)/2);n.push(s.x),h.push(s.y)}var o=r._convertPoint(e,t.value);n.push(o.x),h.push(o.y)}),r.totalAngle<360)n.push(r._center.x),h.push(r._center.y);else if(l&&s>=2){var o=r._convertPoint(e,i[s-1].value-(i[s-2].value-i[s-1].value)/2);n.push(o.x),h.push(o.y)}t.drawPolygon(n,h,a)}_renderMinors(t,e,a,r){var i,s=this._chart,l=FlexChart._CSS_GRIDLINE_MINOR,n=this.minorGrid,h=s._angles,o=h.length,_=s.axisX.minorGrid,c=FlexChart._FG,u=this._GRIDLINE_WIDTH,d=(s.startAngle,Math.PI,s.totalAngle,Math.PI,this._TICK_OVERLAP),g=this.minorTickMarks,p=!0;this._vals.minor=e,g==TickMark.Outside?d=1:g==TickMark.Inside?d=-1:g==TickMark.Cross?d=0:p=!1,this.axisType==AxisType.Y?(t.stroke=c,t.strokeWidth=u,e.forEach(e=>{var a=this.convert(e);if(n&&this._renderYGridLine(t,s,a,l),p&&(h.forEach((e,r)=>{if(_&&r>0){i=e.value-(e.value-h[r-1].value)/2;var l=s._convertPoint(a,i);this._drawMinorTickLength(t,d,i,l)}i=e.value;var n=s._convertPoint(a,i);this._drawMinorTickLength(t,d,i,n)}),_&&o>=2)){i=h[o-1].value-(h[o-2].value-h[o-1].value)/2;var r=s._convertPoint(a,i);this._drawMinorTickLength(t,d,i,r)}})):(t.stroke=c,t.strokeWidth=u,e.forEach(e=>{var a=this.convert(e);n&&(this._renderXGridLine(t,s,a,l),p&&this._drawMinorTickLength(t,d,a-Math.PI/2,s._convertPoint(s._radius,a)))}))}_drawMinorTickLength(t,e,a,r){var i=this._TICK_HEIGHT,s=FlexChart._CSS_TICK_MINOR,l=.5*(e-1)*i*Math.cos(a),n=.5*(1+e)*i*Math.cos(a),h=.5*(e-1)*i*Math.sin(a),o=.5*(1+e)*i*Math.sin(a);t.drawLine(r.x+l,r.y+h,r.x+n,r.y+o,s)}_renderLabelsAndTicks(t,e,a,r,i,s,l,n,h){this._points=[],i=this.labelAngle||0;var o,_=this._chart,c=this.labelPadding||2,u=FlexChart._CSS_LABEL,d=FlexChart._CSS_GRIDLINE,g=FlexChart._CSS_TICK,p=FlexChart._FG,v=this._TICK_WIDTH,x=this.majorGrid,y=FlexChart._FG,T=this._GRIDLINE_WIDTH,A=_.startAngle*Math.PI/180,m=(_.totalAngle,Math.PI,1);if(this.axisType==AxisType.Y){x=a!=this.actualMin&&x&&a!=this.actualMax;var P=this.convert(a),C=_._convertPoint(P,A);if(x&&(t.stroke=y,t.strokeWidth=T,this._renderYGridLine(t,_,P,d)),t.stroke=p,t.strokeWidth=v,l){(o=(_.startAngle%360+360)%360)<=90&&o>=75||o>=270&&o<=285?m=2:(o>90&&o<=105||o<270&&o>=255)&&(m=0);var L=new Point(C.x-c-Math.abs(n-h),C.y);this._axisLabels.push({val:a,text:r,pos:L,align:2,vAlign:m,labelAngle:i,class:u})}s!=TickMark.None&&t.drawLine(C.x-h*Math.cos(A),C.y-h*Math.sin(A),C.x-n*Math.cos(A),C.y-n*Math.sin(A),g)}else{var M=this.convert(a);if(x&&(t.stroke=y,t.strokeWidth=T,this._renderXGridLine(t,_,M,d)),t.stroke=p,t.strokeWidth=v,l){var f,k,S;L=_._convertPoint(_._radius+c,M);f=_._angles&&_._angles.length?_._angles[e].angle:_.startAngle+(a-this.actualMin)*_.totalAngle/(this.actualMax-this.actualMin),f=(f%=360)>=0?f:f+360,k=this._getXLabelVAlign(f),S=this._getXLabelAlign(f),_._isPolar&&(r=this._formatValue(f)),i>0?FlexChart._renderRotatedText(t,r,L,S,k,L,i,u):i<0?FlexChart._renderRotatedText(t,r,L,S,k,L,i,u):this._renderLabel(t,a,r,L,S,k,u)}s!=TickMark.None&&this._renderXTick(t,_,M,g,n,h)}return!0}_renderXGridLine(t,e,a,r){var i=e._center,s=e._convertPoint(e._radius,a);t.drawLine(i.x,i.y,s.x,s.y,r)}_renderXTick(t,e,a,r,i,s){var l,n;e._center;l=e._convertPoint(e._radius+i,a),n=e._convertPoint(e._radius+s,a),t.drawLine(l.x,l.y,n.x,n.y,r)}_renderYGridLine(t,e,a,r){e._angles;var i=e._center,s=e.startAngle*Math.PI/180,l=e.totalAngle*Math.PI/180;e._isPolar?(s=(e.startAngle-90)*Math.PI/180,s=e.reversed?s-l:s,t.drawPieSegment(i.x,i.y,a,s,l,r)):this._renderPolygon(t,a,r)}_getXLabelVAlign(t){var e=1,a=this._chart,r=a.startAngle;return a.reversed&&(t=(360+r+(r%360-t%360))%360),0===t?e=2:180===t&&(e=0),e}_getXLabelAlign(t){var e=0,a=this._chart,r=a.startAngle;return a.reversed&&(t=(360+r+(r%360-t%360))%360),t>0&&t<180?e=-1:t>180&&t<360&&(e=1),e+1}_createTimeLabels(t,e,a,r){if(this._axisType==AxisType.Y)super._createTimeLabels(t,e,a,r);else{var i=this._values;this.format;if(!i||0===i.length)return;i.forEach(t=>{a.push(t),r.push(this._formatValue(t))})}}_niceNumber(t,e,a){var r=this._chart,i=this.actualMax-this.actualMin,s=r.totalAngle;return s>360&&(s%=360),r._isPolar?s%8==0?i/8:s%6==0?i/6:s%4==0?i/4:s%3==0?i/3:s%2==0?i/2:super._niceNumber(t,e,a):super._niceNumber(t,e,a)}};_registerModule("wijmo.chart.radar",selfModule);

@@ -1,1 +0,14 @@

var __extends=this&&this.__extends||function(){var t=function(e,a){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var a in e)e.hasOwnProperty(a)&&(t[a]=e[a])})(e,a)};return function(e,a){function r(){this.constructor=e}t(e,a),e.prototype=null===a?Object.create(a):(r.prototype=a.prototype,new r)}}();import{Point,Rect,asType,asEnum,DataType,isDate,isNumber,asNumber,asBoolean,assert,Binding,asDate,_registerModule}from"@grapecity/wijmo";import{_BarPlotter,_DataInfo,_DataPoint,SeriesBase,Stacking,_PieSegment,_DonutSegment,_LinePlotter,_BasePlotter,_LinesArea,ChartType,_CircleArea,FlexChartCore,Position,TickMark,Axis,AxisType,FlexChart}from"@grapecity/wijmo.chart";import*as selfModule from"@grapecity/wijmo.chart.radar";var FlexRadarSeries=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return __extends(e,t),Object.defineProperty(e.prototype,"chartType",{get:function(){return this._finChartType},set:function(t){(t=asEnum(t,RadarChartType,!0))!=this._finChartType&&(this._finChartType=t,this._invalidate())},enumerable:!0,configurable:!0}),e.prototype._getChartType=function(){var t;switch(this.chartType){case RadarChartType.Area:t=ChartType.Area;break;case RadarChartType.Line:t=ChartType.Line;break;case RadarChartType.Column:t=ChartType.Column;break;case RadarChartType.LineSymbols:t=ChartType.LineSymbols;break;case RadarChartType.Scatter:t=ChartType.Scatter}return t},e}(SeriesBase);export{FlexRadarSeries};var _RadarLinePlotter=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.isArea=!1,e}return __extends(e,t),e.prototype._getLabelPoint=function(t,e){var a=t._getAxisX(),r=t._getAxisY(),i=a.convert(e.dataX),n=r.convert(e.dataY);return this.chart._convertPoint(n,i)},e.prototype.plotSeries=function(t,e,a,r,i,n,s){var o=asType(r,SeriesBase),l=this.chart,h=o._getChartType()||l._getChartType(),_=l.series.indexOf(r),c=r.getValues(0),u=r.getValues(1);if(c){u||(u=this.dataInfo.getXVals());var p=_BasePlotter.cloneStyle(r.style,["fill"]),d=c.length,g=!0;u?d=Math.min(d,u.length):(g=!1,u=new Array(d));var y=this._DEFAULT_WIDTH,f=o._getSymbolFill(_),v=o._getAltSymbolFill(_)||f,x=o._getSymbolStroke(_),m=o._getAltSymbolStroke(_)||x,A=o._getSymbolSize();t.stroke=x,t.strokeWidth=y,t.fill=f;var P=new Array,T=new Array,b=a.actualMax,C=this.stacking!=Stacking.None&&!o._isCustomAxisY(),L=this.stacking==Stacking.Stacked100pc&&!o._isCustomAxisY();void 0!==o._getChartType()&&(C=L=!1);for(var M=o.interpolateNulls,S=!1,k=this.getItemFormatter(r),w=0;w<d;w++){var I=g?u[w]:w,R=null==c[w]?0:c[w];if(_DataInfo.isValid(I)&&_DataInfo.isValid(R)){if(C){if(L)R/=this.dataInfo.getStackedAbsSum(I);if(R>=0){var N=isNaN(this.stackPos[I])?0:this.stackPos[I];R=this.stackPos[I]=N+R}else{N=isNaN(this.stackNeg[I])?0:this.stackNeg[I];R=this.stackNeg[I]=N+R}}var F;R=Math.min(R,b),F=new _DataPoint(_,w,I,R);var D=e.convert(I),X=a.convert(R),O=this.chart._convertPoint(X,D);if(I=O.x,R=O.y,isNaN(I)||isNaN(R))S=!0,!0!==M&&(P.push(void 0),T.push(void 0));else{P.push(I),T.push(R);var V=new _CircleArea(new Point(I,R),.5*A);V.tag=F,this.hitTester.add(V,_)}}else S=!0,!0!==M&&(P.push(void 0),T.push(void 0))}var G=0;if(this.hasLines)if(this.isArea?t.fill=f||i._getColorLight(_):t.fill="none",S&&!0!==M){var Y=[],B=[];for(w=0;w<d;w++)void 0===P[w]?(Y.push(void 0),B.push(0)):(Y.push(P[w]),B.push(T[w]));Y.length>1&&(l._isPolar&&h!==ChartType.Area?this._drawLines(t,Y,B,null,p,this.chart._plotrectId):(l.totalAngle<360&&(Y.push(l._center.x),B.push(l._center.y)),t.drawPolygon(Y,B,null,p,this.chart._plotrectId)),this.hitTester.add(new _LinesArea(Y,B),_),G++)}else l._isPolar&&h!==ChartType.Area?this._drawLines(t,P,T,null,p,this.chart._plotrectId):(l.totalAngle<360&&(P.push(l._center.x),T.push(l._center.y)),t.drawPolygon(P,T,null,p,this.chart._plotrectId)),this.hitTester.add(new _LinesArea(P,T),_),G++;t.fill=f;for(w=0;w<d;w++){I=P[w],R=T[w];!1===this.hasLines&&(t.fill=c[w]>0?f:v,t.stroke=c[w]>0?x:m),this.isValid(I,R,e,a)&&((this.hasSymbols||k)&&A>0&&this._drawSymbol(t,I,R,A,o,w,k),r._setPointIndex(w,G),G++)}}},e}(_LinePlotter);export{_RadarLinePlotter};var _RadarBarPlotter=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return __extends(e,t),e.prototype.adjustLimits=function(t,e){this.dataInfo=t;var a=t.getMinX(),r=t.getMinY(),i=t.getMaxX(),n=t.getMaxY(),s=t.getDeltaX();return s<=0&&(s=1),this.chart.totalAngle<360&&(s=0),this.unload(),this.chart.axisY._getLogBase()||(this.origin>n?n=this.origin:this.origin<r&&(r=this.origin)),new Rect(a,r,i-a+s,n-r)},e.prototype._getLabelPoint=function(t,e){var a=t._getAxisX(),r=t._getAxisY(),i=a.convert(e.dataX),n=r.convert(e.dataY);return this.chart._convertPoint(n,i)},e.prototype.plotSeries=function(t,e,a,r,i,n,s){var o=this.chart.series.indexOf(r),l=asType(r,SeriesBase),h=(this.chart._options,this.width),_=this.chart,c=-90*Math.PI/180;n=n||0;var u,p=l._getAxisY()._uniqueId,d=(this.stackNegMap[p],this.stackPosMap[p]),g=this.stacking!=Stacking.None,y=this.stacking==Stacking.Stacked100pc,f=r.getValues(0),v=r.getValues(1);if(f){var x;v||(v=this.dataInfo.getXVals()),(x=v?_.totalAngle/v.length:_.totalAngle/(e.actualMax-e.actualMin))>0&&(h=g?x*h*Math.PI/180:x*Math.pow(h,n+1)*Math.PI/180);var m=l._getSymbolFill(o),A=l._getAltSymbolFill(o)||m,P=l._getSymbolStroke(o),T=l._getAltSymbolStroke(o)||P,b=f.length;null!=v&&(b=Math.min(b,v.length));var C,L,M=this.origin,S=0;void 0!==l._getChartType()&&(g=y=!1),M<a.actualMin?M=a.actualMin:M>a.actualMax&&(M=a.actualMax);a.convert(M);var k=e.actualMin,w=e.actualMax,I=a.actualMax;l._isCustomAxisY()&&(g=y=!1),_._areas[o]||(_._areas[o]=[]);for(var R=0;R<b;R++){var N=v?v[R]:R,F=null==f[R]?0:f[R];if(this._getSymbolOrigin&&a.convert(this._getSymbolOrigin(M,R,b)),this._getSymbolStyles){var D=this._getSymbolStyles(R,b);m=D&&D.fill?D.fill:m,A=D&&D.fill?D.fill:A,P=D&&D.stroke?D.stroke:P,T=D&&D.stroke?D.stroke:T}if(C=F>0?m:A,L=F>0?P:T,t.fill=C,t.stroke=L,_DataInfo.isValid(N)&&_DataInfo.isValid(F)){if(g){var X,O,V=N-.5*h,G=N+.5*h;if(V<k&&G<k||V>w&&G>w)continue;if(V=e.convert(V),G=e.convert(G),!_DataInfo.isValid(V)||!_DataInfo.isValid(G))continue;if(y)F/=this.dataInfo.getStackedAbsSum(N);var Y=isNaN(d[N])?0:d[N];X=Y,O=Y+F,d[N]=Y+F;var B=e.convert(N),E=a.convert(X),j=a.convert(O);B-=h/2,t.drawDonutSegment(_._center.x,_._center.y,j,E,B+c,h,null,l.symbolStyle),(u=new _DonutSegment(new Point(_._center.x,_._center.y),j,E,B+c,h,_.startAngle||0)).tag=new _DataPoint(o,R,N,Y+F),this.hitTester.add(u,o)}else{B=e.convert(N);var W=a.convert(Math.min(F,I));_._convertPoint(W,B);B-=h/2,t.drawPieSegment(_._center.x,_._center.y,W,B+c,h,null,l.symbolStyle),(u=new _PieSegment(new Point(_._center.x,_._center.y),W,B+c,h,_.startAngle)).tag=new _DataPoint(o,R,N,F),this.hitTester.add(u,o)}_._areas[o].push(u),r._setPointIndex(R,S),S++}}}},e}(_BarPlotter);export{_RadarBarPlotter};export var RadarChartType;!function(t){t[t.Column=0]="Column",t[t.Scatter=1]="Scatter",t[t.Line=2]="Line",t[t.LineSymbols=3]="LineSymbols",t[t.Area=4]="Area"}(RadarChartType||(RadarChartType={}));var FlexRadar=function(t){function e(e,a){var r=t.call(this,e,a)||this;return r._chartType=RadarChartType.Line,r._startAngle=0,r._totalAngle=360,r._reversed=!1,r._areas=[],r}return __extends(e,t),Object.defineProperty(e.prototype,"_radarLinePlotter",{get:function(){return null==this.__radarLinePlotter&&(this.__radarLinePlotter=new _RadarLinePlotter,this._initPlotter(this.__radarLinePlotter)),this.__radarLinePlotter},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"_radarColumnPlotter",{get:function(){return null==this.__radarColumnPlotter&&(this.__radarColumnPlotter=new _RadarBarPlotter,this._initPlotter(this.__radarColumnPlotter)),this.__radarColumnPlotter},enumerable:!0,configurable:!0}),e.prototype._initAxes=function(){t.prototype._initAxes.call(this),this.axes.pop(),this.axes.pop(),this.axisX=new FlexRadarAxis(Position.Bottom),this.axisX.majorGrid=!0,this.axisY=new FlexRadarAxis(Position.Left),this.axisY.majorTickMarks=TickMark.Outside,this.axes.push(this.axisX),this.axes.push(this.axisY)},e.prototype._layout=function(e,a,r){t.prototype._layout.call(this,e,a,r);var i=this.axisX._height;this._plotRect.top+=i/2;var n=this._plotRect;this._radius=Math.min(n.width,n.height)/2,this._center=new Point(n.left+n.width/2,n.top+n.height/2)},Object.defineProperty(e.prototype,"chartType",{get:function(){return this._chartType},set:function(t){(t=asEnum(t,RadarChartType))!=this._chartType&&(this._chartType=t,this.invalidate())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"startAngle",{get:function(){return this._startAngle},set:function(t){t!=this._startAngle&&(this._startAngle=asNumber(t,!0),this.invalidate())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"totalAngle",{get:function(){return this._totalAngle},set:function(t){t!=this._totalAngle&&t>=0&&(this._totalAngle=asNumber(t,!0),this._totalAngle<=0&&(assert(!1,"totalAngle must be greater than 0."),this._totalAngle=0),this._totalAngle>360&&(assert(!1,"totalAngle must be less than or equal to 360."),this._totalAngle=360),this.invalidate())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"reversed",{get:function(){return this._reversed},set:function(t){t!=this._reversed&&(this._reversed=asBoolean(t,!0),this.invalidate())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"stacking",{get:function(){return this._stacking},set:function(t){(t=asEnum(t,Stacking))!=this._stacking&&(this._stacking=t,this.invalidate())},enumerable:!0,configurable:!0}),e.prototype._getChartType=function(){var t=ChartType.Line;switch(this.chartType){case RadarChartType.Area:t=ChartType.Area;break;case RadarChartType.Line:t=ChartType.Line;break;case RadarChartType.Column:t=ChartType.Column;break;case RadarChartType.LineSymbols:t=ChartType.LineSymbols;break;case RadarChartType.Scatter:t=ChartType.Scatter}return t},e.prototype._getPlotter=function(e){var a=this.chartType,r=null;if(e){var i=e.chartType;null!=i&&i!=a&&(a=i,!0)}switch(a){case RadarChartType.Line:this._radarLinePlotter.hasSymbols=!1,this._radarLinePlotter.hasLines=!0,this._radarLinePlotter.isArea=!1,r=this._radarLinePlotter;break;case RadarChartType.LineSymbols:this._radarLinePlotter.hasSymbols=!0,this._radarLinePlotter.hasLines=!0,this._radarLinePlotter.isArea=!1,r=this._radarLinePlotter;break;case RadarChartType.Area:this._radarLinePlotter.hasSymbols=!1,this._radarLinePlotter.hasLines=!0,this._radarLinePlotter.isArea=!0,r=this._radarLinePlotter;break;case RadarChartType.Scatter:this._radarLinePlotter.hasSymbols=!0,this._radarLinePlotter.hasLines=!1,this._radarLinePlotter.isArea=!1,r=this._radarLinePlotter;break;case RadarChartType.Column:this._radarColumnPlotter.isVolume=!1,this._radarColumnPlotter.width=.8,r=this._radarColumnPlotter;break;default:r=t.prototype._getPlotter.call(this,e)}return r},e.prototype._convertPoint=function(t,e){var a=new Point,r=this._center;return a.x=r.x+t*Math.sin(e),a.y=r.y-t*Math.cos(e),a},e.prototype._createSeries=function(){return new FlexRadarSeries},e.prototype._clearCachedValues=function(){t.prototype._clearCachedValues.call(this),this._isPolar=!1,this._areas=[]},e.prototype._performBind=function(){if(this._xDataType=null,this._xlabels.splice(0),this._xvals.splice(0),this._cv){var t=this._cv.items;if(t){for(var e=t.length,a=0;a<e;a++){var r=t[a],i=this.bindingX?new Binding(this.bindingX):null;if(i){var n=i.getValue(r);isNumber(n)?(this._xvals.push(asNumber(n)),this._xDataType=DataType.Number):isDate(n)&&(this._xDataType=DataType.Date),this._xlabels.push(n)}}this._xvals.length==e?this._xlabels.splice(0):this._xvals.splice(0)}}this._xDataType===DataType.Number&&(this._isPolar=!0)},e.prototype._prepareRender=function(){t.prototype._prepareRender.call(this),this._areas=[]},e}(FlexChartCore);export{FlexRadar};var FlexRadarAxis=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._points=[],e._axisLabels=[],e}return __extends(e,t),e.prototype._render=function(e){var a=this;if(this._hasVisibileSeries()){t.prototype._render.call(this,e);var r=this._axisLabels;if(r.length){var i=function(){var t=a.axisType==AxisType.X?"wj-axis-x-labels "+FlexChart._CSS_AXIS_X:"wj-axis-y-labels "+FlexChart._CSS_AXIS_Y;e.startGroup(t),r.forEach(function(t){var r=t.labelAngle;r>0?FlexChart._renderRotatedText(e,t.text,t.pos,t.align,t.vAlign,t.pos,r,t.class):r<0?FlexChart._renderRotatedText(e,t.text,t.pos,t.align,t.vAlign,t.pos,r,t.class):a._renderLabel(e,t.val,t.text,t.pos,t.align,t.vAlign,t.class)}),e.endGroup(),a._axisLabels=[],a._chart.rendered.removeHandler(i)};this._chart.rendered.addHandler(i,this)}}},e.prototype._getHeight=function(e,a){var r=t.prototype._getHeight.call(this,e,a);return this._axisType==AxisType.Y&&(r=4),this._height=2*r,2*r},e.prototype._getActualRange=function(){return this._isTimeAxis&&null!=this.__actualMax&&null!=this.__actualMin?this.__actualMax-this.__actualMin:t.prototype._getActualRange.call(this)},e.prototype._updateActualLimits=function(e,a,r,i,n){var s=this;void 0===i&&(i=null),void 0===n&&(n=null),t.prototype._updateActualLimits.call(this,e,a,r,i,n);var o,l=this._chart,h=this._lbls,_=this.actualMin.valueOf?this.actualMin.valueOf():this.actualMin,c=this.actualMax.valueOf?this.actualMax.valueOf():this.actualMax;this._lbls&&this===l.axisX&&(l._angles=[],this._isTimeAxis&&0===this._lbls.length&&this._values.forEach(function(t){h.push(s._formatValue(t))}),o=h.length,l.totalAngle<360&&(o-=1),h.forEach(function(t,e){var a=_+e/o*(c-_),r=l.startAngle+e/o*l.totalAngle;isNaN(r)||isNaN(a)||l._angles.push({value:s.convert(a),angle:r}),s._isTimeAxis?((null==s.__actualMin||s.__actualMin>t)&&(s.__actualMin=t),(null==s.__actualMax||s.__actualMax<t)&&(s.__actualMax=t)):null==s.__actualMin&&null==s.__actualMax||(s.__actualMin=null,s.__actualMax=null)}),this._isTimeAxis&&this._lbls.length>0&&(this._updateAutoFormat(0),this._lbls=h.map(function(t){var e=asDate(t).valueOf();return s._formatValue(e)})))},e.prototype._updateActualLimitsByChartType=function(t,e,a){var r=this._chart;if(r._getChartType()!=ChartType.Column&&360===r.totalAngle&&this.axisType===AxisType.X)if(this._isTimeAxis){var i=(r._xlabels.length||r._xvals.length)-1;a+=(a-e)/(i=i<1?1:i)}else r._isPolar||(a+=1);return{min:e,max:a}},e.prototype.convert=function(t,e,a){var r=null==e?this.actualMax:e,i=null==a?this.actualMin:a,n=this._chart;if(!n)return NaN;if(r==i)return 0;if(this.axisType===AxisType.X)return n.reversed?(n.startAngle-(t-i)/(r-i)*n.totalAngle)*Math.PI/180:(n.startAngle+(t-i)/(r-i)*n.totalAngle)*Math.PI/180;if(this._getLogBase()){if(t<=0)return NaN;var s=Math.log(r/i);return Math.log(t/i)/s*n._radius}return(t-i)/(r-i)*n._radius},e.prototype._renderLineAndTitle=function(t){var e=this._chart,a=FlexChart._CSS_LINE,r=(e.startAngle-90)*Math.PI/180,i=e.totalAngle*Math.PI/180,n=e._radius;this.axisType===AxisType.X&&this.axisLine&&(t.stroke=FlexChart._FG,e._isPolar?(r=e.reversed?r-i:r,t.drawPieSegment(e._center.x,e._center.y,n,r,i,a)):this._renderPolygon(t,n,a))},e.prototype._renderPolygon=function(t,e,a){var r=this._chart,i=r._angles,n=i.length,s=r.axisX.minorGrid,o=[],l=[];if(i.forEach(function(t,a){if(s&&a>0){var n=r._convertPoint(e,t.value-(t.value-i[a-1].value)/2);o.push(n.x),l.push(n.y)}var h=r._convertPoint(e,t.value);o.push(h.x),l.push(h.y)}),r.totalAngle<360)o.push(r._center.x),l.push(r._center.y);else if(s&&n>=2){var h=r._convertPoint(e,i[n-1].value-(i[n-2].value-i[n-1].value)/2);o.push(h.x),l.push(h.y)}t.drawPolygon(o,l,a)},e.prototype._renderMinors=function(t,e,a,r){var i,n=this,s=this._chart,o=FlexChart._CSS_GRIDLINE_MINOR,l=this.minorGrid,h=s._angles,_=h.length,c=s.axisX.minorGrid,u=FlexChart._FG,p=this._GRIDLINE_WIDTH,d=(s.startAngle,Math.PI,s.totalAngle,Math.PI,this._TICK_OVERLAP),g=this.minorTickMarks,y=!0;this._vals.minor=e,g==TickMark.Outside?d=1:g==TickMark.Inside?d=-1:g==TickMark.Cross?d=0:y=!1,this.axisType==AxisType.Y?(t.stroke=u,t.strokeWidth=p,e.forEach(function(e){var a=n.convert(e);if(l&&n._renderYGridLine(t,s,a,o),y&&(h.forEach(function(e,r){if(c&&r>0){i=e.value-(e.value-h[r-1].value)/2;var o=s._convertPoint(a,i);n._drawMinorTickLength(t,d,i,o)}i=e.value;var l=s._convertPoint(a,i);n._drawMinorTickLength(t,d,i,l)}),c&&_>=2)){i=h[_-1].value-(h[_-2].value-h[_-1].value)/2;var r=s._convertPoint(a,i);n._drawMinorTickLength(t,d,i,r)}})):(t.stroke=u,t.strokeWidth=p,e.forEach(function(e){var a=n.convert(e);l&&(n._renderXGridLine(t,s,a,o),y&&n._drawMinorTickLength(t,d,a-Math.PI/2,s._convertPoint(s._radius,a)))}))},e.prototype._drawMinorTickLength=function(t,e,a,r){var i=this._TICK_HEIGHT,n=FlexChart._CSS_TICK_MINOR,s=.5*(e-1)*i*Math.cos(a),o=.5*(1+e)*i*Math.cos(a),l=.5*(e-1)*i*Math.sin(a),h=.5*(1+e)*i*Math.sin(a);t.drawLine(r.x+s,r.y+l,r.x+o,r.y+h,n)},e.prototype._renderLabelsAndTicks=function(t,e,a,r,i,n,s,o,l){this._points=[],i=this.labelAngle||0;var h,_=this._chart,c=this.labelPadding||2,u=FlexChart._CSS_LABEL,p=FlexChart._CSS_GRIDLINE,d=FlexChart._CSS_TICK,g=FlexChart._FG,y=this._TICK_WIDTH,f=this.majorGrid,v=FlexChart._FG,x=this._GRIDLINE_WIDTH,m=_.startAngle*Math.PI/180,A=(_.totalAngle,Math.PI,1);if(this.axisType==AxisType.Y){f=a!=this.actualMin&&f&&a!=this.actualMax;var P=this.convert(a),T=_._convertPoint(P,m);if(f&&(t.stroke=v,t.strokeWidth=x,this._renderYGridLine(t,_,P,p)),t.stroke=g,t.strokeWidth=y,s){(h=(_.startAngle%360+360)%360)<=90&&h>=75||h>=270&&h<=285?A=2:(h>90&&h<=105||h<270&&h>=255)&&(A=0);var b=new Point(T.x-c-Math.abs(o-l),T.y);this._axisLabels.push({val:a,text:r,pos:b,align:2,vAlign:A,labelAngle:i,class:u})}n!=TickMark.None&&t.drawLine(T.x-l*Math.cos(m),T.y-l*Math.sin(m),T.x-o*Math.cos(m),T.y-o*Math.sin(m),d)}else{var C=this.convert(a);if(f&&(t.stroke=v,t.strokeWidth=x,this._renderXGridLine(t,_,C,p)),t.stroke=g,t.strokeWidth=y,s){var L,M,S;b=_._convertPoint(_._radius+c,C);L=_._angles&&_._angles.length?_._angles[e].angle:_.startAngle+(a-this.actualMin)*_.totalAngle/(this.actualMax-this.actualMin),L=(L%=360)>=0?L:L+360,M=this._getXLabelVAlign(L),S=this._getXLabelAlign(L),_._isPolar&&(r=this._formatValue(L)),i>0?FlexChart._renderRotatedText(t,r,b,S,M,b,i,u):i<0?FlexChart._renderRotatedText(t,r,b,S,M,b,i,u):this._renderLabel(t,a,r,b,S,M,u)}n!=TickMark.None&&this._renderXTick(t,_,C,d,o,l)}return!0},e.prototype._renderXGridLine=function(t,e,a,r){var i=e._center,n=e._convertPoint(e._radius,a);t.drawLine(i.x,i.y,n.x,n.y,r)},e.prototype._renderXTick=function(t,e,a,r,i,n){var s,o;e._center;s=e._convertPoint(e._radius+i,a),o=e._convertPoint(e._radius+n,a),t.drawLine(s.x,s.y,o.x,o.y,r)},e.prototype._renderYGridLine=function(t,e,a,r){e._angles;var i=e._center,n=e.startAngle*Math.PI/180,s=e.totalAngle*Math.PI/180;e._isPolar?(n=(e.startAngle-90)*Math.PI/180,n=e.reversed?n-s:n,t.drawPieSegment(i.x,i.y,a,n,s,r)):this._renderPolygon(t,a,r)},e.prototype._getXLabelVAlign=function(t){var e=1,a=this._chart,r=a.startAngle;return a.reversed&&(t=(360+r+(r%360-t%360))%360),0===t?e=2:180===t&&(e=0),e},e.prototype._getXLabelAlign=function(t){var e=0,a=this._chart,r=a.startAngle;return a.reversed&&(t=(360+r+(r%360-t%360))%360),t>0&&t<180?e=-1:t>180&&t<360&&(e=1),e+1},e.prototype._createTimeLabels=function(e,a,r,i){var n=this;if(this._axisType==AxisType.Y)t.prototype._createTimeLabels.call(this,e,a,r,i);else{var s=this._values;this.format;if(!s||0===s.length)return;s.forEach(function(t){r.push(t),i.push(n._formatValue(t))})}},e.prototype._niceNumber=function(e,a,r){var i=this._chart,n=this.actualMax-this.actualMin,s=i.totalAngle;return s>360&&(s%=360),i._isPolar?s%8==0?n/8:s%6==0?n/6:s%4==0?n/4:s%3==0?n/3:s%2==0?n/2:t.prototype._niceNumber.call(this,e,a,r):t.prototype._niceNumber.call(this,e,a,r)},e}(Axis);export{FlexRadarAxis};_registerModule("wijmo.chart.radar",selfModule);
/*!
*
* Wijmo Library 5.20183.595-nightly.d20190405.t210807
* http://wijmo.com/
*
* Copyright(c) GrapeCity, Inc. All rights reserved.
*
* Licensed under the GrapeCity Commercial License.
* sales@wijmo.com
* wijmo.com/products/wijmo-5/license/
*
*/
var __extends=this&&this.__extends||function(){var t=function(e,a){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var a in e)e.hasOwnProperty(a)&&(t[a]=e[a])})(e,a)};return function(e,a){function r(){this.constructor=e}t(e,a),e.prototype=null===a?Object.create(a):(r.prototype=a.prototype,new r)}}();import{Point,Rect,asType,asEnum,DataType,isDate,isNumber,asNumber,asBoolean,assert,Binding,asDate,_registerModule}from"@grapecity/wijmo";import{_BarPlotter,_DataInfo,_DataPoint,SeriesBase,Stacking,_PieSegment,_DonutSegment,_LinePlotter,_BasePlotter,_LinesArea,ChartType,_CircleArea,FlexChartCore,Position,TickMark,Axis,AxisType,FlexChart}from"@grapecity/wijmo.chart";import*as selfModule from"@grapecity/wijmo.chart.radar";var FlexRadarSeries=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return __extends(e,t),Object.defineProperty(e.prototype,"chartType",{get:function(){return this._finChartType},set:function(t){(t=asEnum(t,RadarChartType,!0))!=this._finChartType&&(this._finChartType=t,this._invalidate())},enumerable:!0,configurable:!0}),e.prototype._getChartType=function(){var t;switch(this.chartType){case RadarChartType.Area:t=ChartType.Area;break;case RadarChartType.Line:t=ChartType.Line;break;case RadarChartType.Column:t=ChartType.Column;break;case RadarChartType.LineSymbols:t=ChartType.LineSymbols;break;case RadarChartType.Scatter:t=ChartType.Scatter}return t},e}(SeriesBase);export{FlexRadarSeries};var _RadarLinePlotter=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.isArea=!1,e}return __extends(e,t),e.prototype._getLabelPoint=function(t,e){var a=t._getAxisX(),r=t._getAxisY(),i=a.convert(e.dataX),n=r.convert(e.dataY);return this.chart._convertPoint(n,i)},e.prototype.plotSeries=function(t,e,a,r,i,n,s){var o=asType(r,SeriesBase),l=this.chart,h=o._getChartType()||l._getChartType(),_=l.series.indexOf(r),c=r.getValues(0),u=r.getValues(1);if(c){u||(u=this.dataInfo.getXVals());var p=_BasePlotter.cloneStyle(r.style,["fill"]),d=c.length,g=!0;u?d=Math.min(d,u.length):(g=!1,u=new Array(d));var y=this._DEFAULT_WIDTH,f=o._getSymbolFill(_),v=o._getAltSymbolFill(_)||f,x=o._getSymbolStroke(_),m=o._getAltSymbolStroke(_)||x,A=o._getSymbolSize();t.stroke=x,t.strokeWidth=y,t.fill=f;var P=new Array,T=new Array,b=a.actualMax,C=this.stacking!=Stacking.None&&!o._isCustomAxisY(),L=this.stacking==Stacking.Stacked100pc&&!o._isCustomAxisY();void 0!==o._getChartType()&&(C=L=!1);for(var M=o.interpolateNulls,S=!1,k=this.getItemFormatter(r),w=0;w<d;w++){var I=g?u[w]:w,R=null==c[w]?0:c[w];if(_DataInfo.isValid(I)&&_DataInfo.isValid(R)){if(C){if(L)R/=this.dataInfo.getStackedAbsSum(I);if(R>=0){var N=isNaN(this.stackPos[I])?0:this.stackPos[I];R=this.stackPos[I]=N+R}else{N=isNaN(this.stackNeg[I])?0:this.stackNeg[I];R=this.stackNeg[I]=N+R}}var F;R=Math.min(R,b),F=new _DataPoint(_,w,I,R);var D=e.convert(I),X=a.convert(R),O=this.chart._convertPoint(X,D);if(I=O.x,R=O.y,isNaN(I)||isNaN(R))S=!0,!0!==M&&(P.push(void 0),T.push(void 0));else{P.push(I),T.push(R);var V=new _CircleArea(new Point(I,R),.5*A);V.tag=F,this.hitTester.add(V,_)}}else S=!0,!0!==M&&(P.push(void 0),T.push(void 0))}var G=0;if(this.hasLines)if(this.isArea?t.fill=f||i._getColorLight(_):t.fill="none",S&&!0!==M){var Y=[],B=[];for(w=0;w<d;w++)void 0===P[w]?(Y.push(void 0),B.push(0)):(Y.push(P[w]),B.push(T[w]));Y.length>1&&(l._isPolar&&h!==ChartType.Area?this._drawLines(t,Y,B,null,p,this.chart._plotrectId):(l.totalAngle<360&&(Y.push(l._center.x),B.push(l._center.y)),t.drawPolygon(Y,B,null,p,this.chart._plotrectId)),this.hitTester.add(new _LinesArea(Y,B),_),G++)}else l._isPolar&&h!==ChartType.Area?this._drawLines(t,P,T,null,p,this.chart._plotrectId):(l.totalAngle<360&&(P.push(l._center.x),T.push(l._center.y)),t.drawPolygon(P,T,null,p,this.chart._plotrectId)),this.hitTester.add(new _LinesArea(P,T),_),G++;t.fill=f;for(w=0;w<d;w++){I=P[w],R=T[w];!1===this.hasLines&&(t.fill=c[w]>0?f:v,t.stroke=c[w]>0?x:m),this.isValid(I,R,e,a)&&((this.hasSymbols||k)&&A>0&&this._drawSymbol(t,I,R,A,o,w,k),r._setPointIndex(w,G),G++)}}},e}(_LinePlotter);export{_RadarLinePlotter};var _RadarBarPlotter=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return __extends(e,t),e.prototype.adjustLimits=function(t,e){this.dataInfo=t;var a=t.getMinX(),r=t.getMinY(),i=t.getMaxX(),n=t.getMaxY(),s=t.getDeltaX();return s<=0&&(s=1),this.chart.totalAngle<360&&(s=0),this.unload(),this.chart.axisY._getLogBase()||(this.origin>n?n=this.origin:this.origin<r&&(r=this.origin)),new Rect(a,r,i-a+s,n-r)},e.prototype._getLabelPoint=function(t,e){var a=t._getAxisX(),r=t._getAxisY(),i=a.convert(e.dataX),n=r.convert(e.dataY);return this.chart._convertPoint(n,i)},e.prototype.plotSeries=function(t,e,a,r,i,n,s){var o=this.chart.series.indexOf(r),l=asType(r,SeriesBase),h=(this.chart._options,this.width),_=this.chart,c=-90*Math.PI/180;n=n||0;var u,p=l._getAxisY()._uniqueId,d=(this.stackNegMap[p],this.stackPosMap[p]),g=this.stacking!=Stacking.None,y=this.stacking==Stacking.Stacked100pc,f=r.getValues(0),v=r.getValues(1);if(f){var x;v||(v=this.dataInfo.getXVals()),(x=v?_.totalAngle/v.length:_.totalAngle/(e.actualMax-e.actualMin))>0&&(h=g?x*h*Math.PI/180:x*Math.pow(h,n+1)*Math.PI/180);var m=l._getSymbolFill(o),A=l._getAltSymbolFill(o)||m,P=l._getSymbolStroke(o),T=l._getAltSymbolStroke(o)||P,b=f.length;null!=v&&(b=Math.min(b,v.length));var C,L,M=this.origin,S=0;void 0!==l._getChartType()&&(g=y=!1),M<a.actualMin?M=a.actualMin:M>a.actualMax&&(M=a.actualMax);a.convert(M);var k=e.actualMin,w=e.actualMax,I=a.actualMax;l._isCustomAxisY()&&(g=y=!1),_._areas[o]||(_._areas[o]=[]);for(var R=0;R<b;R++){var N=v?v[R]:R,F=null==f[R]?0:f[R];if(this._getSymbolOrigin&&a.convert(this._getSymbolOrigin(M,R,b)),this._getSymbolStyles){var D=this._getSymbolStyles(R,b);m=D&&D.fill?D.fill:m,A=D&&D.fill?D.fill:A,P=D&&D.stroke?D.stroke:P,T=D&&D.stroke?D.stroke:T}if(C=F>0?m:A,L=F>0?P:T,t.fill=C,t.stroke=L,_DataInfo.isValid(N)&&_DataInfo.isValid(F)){if(g){var X,O,V=N-.5*h,G=N+.5*h;if(V<k&&G<k||V>w&&G>w)continue;if(V=e.convert(V),G=e.convert(G),!_DataInfo.isValid(V)||!_DataInfo.isValid(G))continue;if(y)F/=this.dataInfo.getStackedAbsSum(N);var Y=isNaN(d[N])?0:d[N];X=Y,O=Y+F,d[N]=Y+F;var B=e.convert(N),E=a.convert(X),j=a.convert(O);B-=h/2,t.drawDonutSegment(_._center.x,_._center.y,j,E,B+c,h,null,l.symbolStyle),(u=new _DonutSegment(new Point(_._center.x,_._center.y),j,E,B+c,h,_.startAngle||0)).tag=new _DataPoint(o,R,N,Y+F),this.hitTester.add(u,o)}else{B=e.convert(N);var W=a.convert(Math.min(F,I));_._convertPoint(W,B);B-=h/2,t.drawPieSegment(_._center.x,_._center.y,W,B+c,h,null,l.symbolStyle),(u=new _PieSegment(new Point(_._center.x,_._center.y),W,B+c,h,_.startAngle)).tag=new _DataPoint(o,R,N,F),this.hitTester.add(u,o)}_._areas[o].push(u),r._setPointIndex(R,S),S++}}}},e}(_BarPlotter);export{_RadarBarPlotter};export var RadarChartType;!function(t){t[t.Column=0]="Column",t[t.Scatter=1]="Scatter",t[t.Line=2]="Line",t[t.LineSymbols=3]="LineSymbols",t[t.Area=4]="Area"}(RadarChartType||(RadarChartType={}));var FlexRadar=function(t){function e(e,a){var r=t.call(this,e,a)||this;return r._chartType=RadarChartType.Line,r._startAngle=0,r._totalAngle=360,r._reversed=!1,r._areas=[],r}return __extends(e,t),Object.defineProperty(e.prototype,"_radarLinePlotter",{get:function(){return null==this.__radarLinePlotter&&(this.__radarLinePlotter=new _RadarLinePlotter,this._initPlotter(this.__radarLinePlotter)),this.__radarLinePlotter},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"_radarColumnPlotter",{get:function(){return null==this.__radarColumnPlotter&&(this.__radarColumnPlotter=new _RadarBarPlotter,this._initPlotter(this.__radarColumnPlotter)),this.__radarColumnPlotter},enumerable:!0,configurable:!0}),e.prototype._initAxes=function(){t.prototype._initAxes.call(this),this.axes.pop(),this.axes.pop(),this.axisX=new FlexRadarAxis(Position.Bottom),this.axisX.majorGrid=!0,this.axisY=new FlexRadarAxis(Position.Left),this.axisY.majorTickMarks=TickMark.Outside,this.axes.push(this.axisX),this.axes.push(this.axisY)},e.prototype._layout=function(e,a,r){t.prototype._layout.call(this,e,a,r);var i=this.axisX._height;this._plotRect.top+=i/2;var n=this._plotRect;this._radius=Math.min(n.width,n.height)/2,this._center=new Point(n.left+n.width/2,n.top+n.height/2)},Object.defineProperty(e.prototype,"chartType",{get:function(){return this._chartType},set:function(t){(t=asEnum(t,RadarChartType))!=this._chartType&&(this._chartType=t,this.invalidate())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"startAngle",{get:function(){return this._startAngle},set:function(t){t!=this._startAngle&&(this._startAngle=asNumber(t,!0),this.invalidate())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"totalAngle",{get:function(){return this._totalAngle},set:function(t){t!=this._totalAngle&&t>=0&&(this._totalAngle=asNumber(t,!0),this._totalAngle<=0&&(assert(!1,"totalAngle must be greater than 0."),this._totalAngle=0),this._totalAngle>360&&(assert(!1,"totalAngle must be less than or equal to 360."),this._totalAngle=360),this.invalidate())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"reversed",{get:function(){return this._reversed},set:function(t){t!=this._reversed&&(this._reversed=asBoolean(t,!0),this.invalidate())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"stacking",{get:function(){return this._stacking},set:function(t){(t=asEnum(t,Stacking))!=this._stacking&&(this._stacking=t,this.invalidate())},enumerable:!0,configurable:!0}),e.prototype._getChartType=function(){var t=ChartType.Line;switch(this.chartType){case RadarChartType.Area:t=ChartType.Area;break;case RadarChartType.Line:t=ChartType.Line;break;case RadarChartType.Column:t=ChartType.Column;break;case RadarChartType.LineSymbols:t=ChartType.LineSymbols;break;case RadarChartType.Scatter:t=ChartType.Scatter}return t},e.prototype._getPlotter=function(e){var a=this.chartType,r=null;if(e){var i=e.chartType;null!=i&&i!=a&&(a=i,!0)}switch(a){case RadarChartType.Line:this._radarLinePlotter.hasSymbols=!1,this._radarLinePlotter.hasLines=!0,this._radarLinePlotter.isArea=!1,r=this._radarLinePlotter;break;case RadarChartType.LineSymbols:this._radarLinePlotter.hasSymbols=!0,this._radarLinePlotter.hasLines=!0,this._radarLinePlotter.isArea=!1,r=this._radarLinePlotter;break;case RadarChartType.Area:this._radarLinePlotter.hasSymbols=!1,this._radarLinePlotter.hasLines=!0,this._radarLinePlotter.isArea=!0,r=this._radarLinePlotter;break;case RadarChartType.Scatter:this._radarLinePlotter.hasSymbols=!0,this._radarLinePlotter.hasLines=!1,this._radarLinePlotter.isArea=!1,r=this._radarLinePlotter;break;case RadarChartType.Column:this._radarColumnPlotter.isVolume=!1,this._radarColumnPlotter.width=.8,r=this._radarColumnPlotter;break;default:r=t.prototype._getPlotter.call(this,e)}return r},e.prototype._convertPoint=function(t,e){var a=new Point,r=this._center;return a.x=r.x+t*Math.sin(e),a.y=r.y-t*Math.cos(e),a},e.prototype._createSeries=function(){return new FlexRadarSeries},e.prototype._clearCachedValues=function(){t.prototype._clearCachedValues.call(this),this._isPolar=!1,this._areas=[]},e.prototype._performBind=function(){if(this._xDataType=null,this._xlabels.splice(0),this._xvals.splice(0),this._cv){var t=this._cv.items;if(t){for(var e=t.length,a=0;a<e;a++){var r=t[a],i=this.bindingX?new Binding(this.bindingX):null;if(i){var n=i.getValue(r);isNumber(n)?(this._xvals.push(asNumber(n)),this._xDataType=DataType.Number):isDate(n)&&(this._xDataType=DataType.Date),this._xlabels.push(n)}}this._xvals.length==e?this._xlabels.splice(0):this._xvals.splice(0)}}this._xDataType===DataType.Number&&(this._isPolar=!0)},e.prototype._prepareRender=function(){t.prototype._prepareRender.call(this),this._areas=[]},e}(FlexChartCore);export{FlexRadar};var FlexRadarAxis=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._points=[],e._axisLabels=[],e}return __extends(e,t),e.prototype._render=function(e){var a=this;if(this._hasVisibileSeries()){t.prototype._render.call(this,e);var r=this._axisLabels;if(r.length){var i=function(){var t=a.axisType==AxisType.X?"wj-axis-x-labels "+FlexChart._CSS_AXIS_X:"wj-axis-y-labels "+FlexChart._CSS_AXIS_Y;e.startGroup(t),r.forEach(function(t){var r=t.labelAngle;r>0?FlexChart._renderRotatedText(e,t.text,t.pos,t.align,t.vAlign,t.pos,r,t.class):r<0?FlexChart._renderRotatedText(e,t.text,t.pos,t.align,t.vAlign,t.pos,r,t.class):a._renderLabel(e,t.val,t.text,t.pos,t.align,t.vAlign,t.class)}),e.endGroup(),a._axisLabels=[],a._chart.rendered.removeHandler(i)};this._chart.rendered.addHandler(i,this)}}},e.prototype._getHeight=function(e,a){var r=t.prototype._getHeight.call(this,e,a);return this._axisType==AxisType.Y&&(r=4),this._height=2*r,2*r},e.prototype._getActualRange=function(){return this._isTimeAxis&&null!=this.__actualMax&&null!=this.__actualMin?this.__actualMax-this.__actualMin:t.prototype._getActualRange.call(this)},e.prototype._updateActualLimits=function(e,a,r,i,n){var s=this;void 0===i&&(i=null),void 0===n&&(n=null),t.prototype._updateActualLimits.call(this,e,a,r,i,n);var o,l=this._chart,h=this._lbls,_=this.actualMin.valueOf?this.actualMin.valueOf():this.actualMin,c=this.actualMax.valueOf?this.actualMax.valueOf():this.actualMax;this._lbls&&this===l.axisX&&(l._angles=[],this._isTimeAxis&&0===this._lbls.length&&this._values.forEach(function(t){h.push(s._formatValue(t))}),o=h.length,l.totalAngle<360&&(o-=1),h.forEach(function(t,e){var a=_+e/o*(c-_),r=l.startAngle+e/o*l.totalAngle;isNaN(r)||isNaN(a)||l._angles.push({value:s.convert(a),angle:r}),s._isTimeAxis?((null==s.__actualMin||s.__actualMin>t)&&(s.__actualMin=t),(null==s.__actualMax||s.__actualMax<t)&&(s.__actualMax=t)):null==s.__actualMin&&null==s.__actualMax||(s.__actualMin=null,s.__actualMax=null)}),this._isTimeAxis&&this._lbls.length>0&&(this._updateAutoFormat(0),this._lbls=h.map(function(t){var e=asDate(t).valueOf();return s._formatValue(e)})))},e.prototype._updateActualLimitsByChartType=function(t,e,a){var r=this._chart;if(r._getChartType()!=ChartType.Column&&360===r.totalAngle&&this.axisType===AxisType.X)if(this._isTimeAxis){var i=(r._xlabels.length||r._xvals.length)-1;a+=(a-e)/(i=i<1?1:i)}else r._isPolar||(a+=1);return{min:e,max:a}},e.prototype.convert=function(t,e,a){var r=null==e?this.actualMax:e,i=null==a?this.actualMin:a,n=this._chart;if(!n)return NaN;if(r==i)return 0;if(this.axisType===AxisType.X)return n.reversed?(n.startAngle-(t-i)/(r-i)*n.totalAngle)*Math.PI/180:(n.startAngle+(t-i)/(r-i)*n.totalAngle)*Math.PI/180;if(this._getLogBase()){if(t<=0)return NaN;var s=Math.log(r/i);return Math.log(t/i)/s*n._radius}return(t-i)/(r-i)*n._radius},e.prototype._renderLineAndTitle=function(t){var e=this._chart,a=FlexChart._CSS_LINE,r=(e.startAngle-90)*Math.PI/180,i=e.totalAngle*Math.PI/180,n=e._radius;this.axisType===AxisType.X&&this.axisLine&&(t.stroke=FlexChart._FG,e._isPolar?(r=e.reversed?r-i:r,t.drawPieSegment(e._center.x,e._center.y,n,r,i,a)):this._renderPolygon(t,n,a))},e.prototype._renderPolygon=function(t,e,a){var r=this._chart,i=r._angles,n=i.length,s=r.axisX.minorGrid,o=[],l=[];if(i.forEach(function(t,a){if(s&&a>0){var n=r._convertPoint(e,t.value-(t.value-i[a-1].value)/2);o.push(n.x),l.push(n.y)}var h=r._convertPoint(e,t.value);o.push(h.x),l.push(h.y)}),r.totalAngle<360)o.push(r._center.x),l.push(r._center.y);else if(s&&n>=2){var h=r._convertPoint(e,i[n-1].value-(i[n-2].value-i[n-1].value)/2);o.push(h.x),l.push(h.y)}t.drawPolygon(o,l,a)},e.prototype._renderMinors=function(t,e,a,r){var i,n=this,s=this._chart,o=FlexChart._CSS_GRIDLINE_MINOR,l=this.minorGrid,h=s._angles,_=h.length,c=s.axisX.minorGrid,u=FlexChart._FG,p=this._GRIDLINE_WIDTH,d=(s.startAngle,Math.PI,s.totalAngle,Math.PI,this._TICK_OVERLAP),g=this.minorTickMarks,y=!0;this._vals.minor=e,g==TickMark.Outside?d=1:g==TickMark.Inside?d=-1:g==TickMark.Cross?d=0:y=!1,this.axisType==AxisType.Y?(t.stroke=u,t.strokeWidth=p,e.forEach(function(e){var a=n.convert(e);if(l&&n._renderYGridLine(t,s,a,o),y&&(h.forEach(function(e,r){if(c&&r>0){i=e.value-(e.value-h[r-1].value)/2;var o=s._convertPoint(a,i);n._drawMinorTickLength(t,d,i,o)}i=e.value;var l=s._convertPoint(a,i);n._drawMinorTickLength(t,d,i,l)}),c&&_>=2)){i=h[_-1].value-(h[_-2].value-h[_-1].value)/2;var r=s._convertPoint(a,i);n._drawMinorTickLength(t,d,i,r)}})):(t.stroke=u,t.strokeWidth=p,e.forEach(function(e){var a=n.convert(e);l&&(n._renderXGridLine(t,s,a,o),y&&n._drawMinorTickLength(t,d,a-Math.PI/2,s._convertPoint(s._radius,a)))}))},e.prototype._drawMinorTickLength=function(t,e,a,r){var i=this._TICK_HEIGHT,n=FlexChart._CSS_TICK_MINOR,s=.5*(e-1)*i*Math.cos(a),o=.5*(1+e)*i*Math.cos(a),l=.5*(e-1)*i*Math.sin(a),h=.5*(1+e)*i*Math.sin(a);t.drawLine(r.x+s,r.y+l,r.x+o,r.y+h,n)},e.prototype._renderLabelsAndTicks=function(t,e,a,r,i,n,s,o,l){this._points=[],i=this.labelAngle||0;var h,_=this._chart,c=this.labelPadding||2,u=FlexChart._CSS_LABEL,p=FlexChart._CSS_GRIDLINE,d=FlexChart._CSS_TICK,g=FlexChart._FG,y=this._TICK_WIDTH,f=this.majorGrid,v=FlexChart._FG,x=this._GRIDLINE_WIDTH,m=_.startAngle*Math.PI/180,A=(_.totalAngle,Math.PI,1);if(this.axisType==AxisType.Y){f=a!=this.actualMin&&f&&a!=this.actualMax;var P=this.convert(a),T=_._convertPoint(P,m);if(f&&(t.stroke=v,t.strokeWidth=x,this._renderYGridLine(t,_,P,p)),t.stroke=g,t.strokeWidth=y,s){(h=(_.startAngle%360+360)%360)<=90&&h>=75||h>=270&&h<=285?A=2:(h>90&&h<=105||h<270&&h>=255)&&(A=0);var b=new Point(T.x-c-Math.abs(o-l),T.y);this._axisLabels.push({val:a,text:r,pos:b,align:2,vAlign:A,labelAngle:i,class:u})}n!=TickMark.None&&t.drawLine(T.x-l*Math.cos(m),T.y-l*Math.sin(m),T.x-o*Math.cos(m),T.y-o*Math.sin(m),d)}else{var C=this.convert(a);if(f&&(t.stroke=v,t.strokeWidth=x,this._renderXGridLine(t,_,C,p)),t.stroke=g,t.strokeWidth=y,s){var L,M,S;b=_._convertPoint(_._radius+c,C);L=_._angles&&_._angles.length?_._angles[e].angle:_.startAngle+(a-this.actualMin)*_.totalAngle/(this.actualMax-this.actualMin),L=(L%=360)>=0?L:L+360,M=this._getXLabelVAlign(L),S=this._getXLabelAlign(L),_._isPolar&&(r=this._formatValue(L)),i>0?FlexChart._renderRotatedText(t,r,b,S,M,b,i,u):i<0?FlexChart._renderRotatedText(t,r,b,S,M,b,i,u):this._renderLabel(t,a,r,b,S,M,u)}n!=TickMark.None&&this._renderXTick(t,_,C,d,o,l)}return!0},e.prototype._renderXGridLine=function(t,e,a,r){var i=e._center,n=e._convertPoint(e._radius,a);t.drawLine(i.x,i.y,n.x,n.y,r)},e.prototype._renderXTick=function(t,e,a,r,i,n){var s,o;e._center;s=e._convertPoint(e._radius+i,a),o=e._convertPoint(e._radius+n,a),t.drawLine(s.x,s.y,o.x,o.y,r)},e.prototype._renderYGridLine=function(t,e,a,r){e._angles;var i=e._center,n=e.startAngle*Math.PI/180,s=e.totalAngle*Math.PI/180;e._isPolar?(n=(e.startAngle-90)*Math.PI/180,n=e.reversed?n-s:n,t.drawPieSegment(i.x,i.y,a,n,s,r)):this._renderPolygon(t,a,r)},e.prototype._getXLabelVAlign=function(t){var e=1,a=this._chart,r=a.startAngle;return a.reversed&&(t=(360+r+(r%360-t%360))%360),0===t?e=2:180===t&&(e=0),e},e.prototype._getXLabelAlign=function(t){var e=0,a=this._chart,r=a.startAngle;return a.reversed&&(t=(360+r+(r%360-t%360))%360),t>0&&t<180?e=-1:t>180&&t<360&&(e=1),e+1},e.prototype._createTimeLabels=function(e,a,r,i){var n=this;if(this._axisType==AxisType.Y)t.prototype._createTimeLabels.call(this,e,a,r,i);else{var s=this._values;this.format;if(!s||0===s.length)return;s.forEach(function(t){r.push(t),i.push(n._formatValue(t))})}},e.prototype._niceNumber=function(e,a,r){var i=this._chart,n=this.actualMax-this.actualMin,s=i.totalAngle;return s>360&&(s%=360),i._isPolar?s%8==0?n/8:s%6==0?n/6:s%4==0?n/4:s%3==0?n/3:s%2==0?n/2:t.prototype._niceNumber.call(this,e,a,r):t.prototype._niceNumber.call(this,e,a,r)},e}(Axis);export{FlexRadarAxis};_registerModule("wijmo.chart.radar",selfModule);

@@ -0,1 +1,13 @@

/*!
*
* Wijmo Library 5.20183.595-nightly.d20190405.t210807
* http://wijmo.com/
*
* Copyright(c) GrapeCity, Inc. All rights reserved.
*
* Licensed under the GrapeCity Commercial License.
* sales@wijmo.com
* wijmo.com/products/wijmo-5/license/
*
*/
/**

@@ -2,0 +14,0 @@ * {@module wijmo.chart.radar}

@@ -1,1 +0,14 @@

"use strict";var __extends=this&&this.__extends||function(){var t=function(e,a){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var a in e)e.hasOwnProperty(a)&&(t[a]=e[a])})(e,a)};return function(e,a){function r(){this.constructor=e}t(e,a),e.prototype=null===a?Object.create(a):(r.prototype=a.prototype,new r)}}();Object.defineProperty(exports,"__esModule",{value:!0});var wijmo_1=require("@grapecity/wijmo"),wijmo_chart_1=require("@grapecity/wijmo.chart"),selfModule=require("@grapecity/wijmo.chart.radar"),FlexRadarSeries=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return __extends(e,t),Object.defineProperty(e.prototype,"chartType",{get:function(){return this._finChartType},set:function(t){(t=wijmo_1.asEnum(t,RadarChartType,!0))!=this._finChartType&&(this._finChartType=t,this._invalidate())},enumerable:!0,configurable:!0}),e.prototype._getChartType=function(){var t;switch(this.chartType){case RadarChartType.Area:t=wijmo_chart_1.ChartType.Area;break;case RadarChartType.Line:t=wijmo_chart_1.ChartType.Line;break;case RadarChartType.Column:t=wijmo_chart_1.ChartType.Column;break;case RadarChartType.LineSymbols:t=wijmo_chart_1.ChartType.LineSymbols;break;case RadarChartType.Scatter:t=wijmo_chart_1.ChartType.Scatter}return t},e}(wijmo_chart_1.SeriesBase);exports.FlexRadarSeries=FlexRadarSeries;var _RadarLinePlotter=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.isArea=!1,e}return __extends(e,t),e.prototype._getLabelPoint=function(t,e){var a=t._getAxisX(),r=t._getAxisY(),i=a.convert(e.dataX),n=r.convert(e.dataY);return this.chart._convertPoint(n,i)},e.prototype.plotSeries=function(t,e,a,r,i,n,s){var o=wijmo_1.asType(r,wijmo_chart_1.SeriesBase),l=this.chart,_=o._getChartType()||l._getChartType(),h=l.series.indexOf(r),c=r.getValues(0),u=r.getValues(1);if(c){u||(u=this.dataInfo.getXVals());var p=wijmo_chart_1._BasePlotter.cloneStyle(r.style,["fill"]),d=c.length,y=!0;u?d=Math.min(d,u.length):(y=!1,u=new Array(d));var g=this._DEFAULT_WIDTH,m=o._getSymbolFill(h),v=o._getAltSymbolFill(h)||m,f=o._getSymbolStroke(h),x=o._getAltSymbolStroke(h)||f,w=o._getSymbolSize();t.stroke=f,t.strokeWidth=g,t.fill=m;var A=new Array,P=new Array,T=a.actualMax,j=this.stacking!=wijmo_chart_1.Stacking.None&&!o._isCustomAxisY(),b=this.stacking==wijmo_chart_1.Stacking.Stacked100pc&&!o._isCustomAxisY();void 0!==o._getChartType()&&(j=b=!1);for(var C=o.interpolateNulls,L=!1,M=this.getItemFormatter(r),S=0;S<d;S++){var k=y?u[S]:S,R=null==c[S]?0:c[S];if(wijmo_chart_1._DataInfo.isValid(k)&&wijmo_chart_1._DataInfo.isValid(R)){if(j){if(b)R/=this.dataInfo.getStackedAbsSum(k);if(R>=0){var I=isNaN(this.stackPos[k])?0:this.stackPos[k];R=this.stackPos[k]=I+R}else{I=isNaN(this.stackNeg[k])?0:this.stackNeg[k];R=this.stackNeg[k]=I+R}}var N;R=Math.min(R,T),N=new wijmo_chart_1._DataPoint(h,S,k,R);var F=e.convert(k),X=a.convert(R),D=this.chart._convertPoint(X,F);if(k=D.x,R=D.y,isNaN(k)||isNaN(R))L=!0,!0!==C&&(A.push(void 0),P.push(void 0));else{A.push(k),P.push(R);var O=new wijmo_chart_1._CircleArea(new wijmo_1.Point(k,R),.5*w);O.tag=N,this.hitTester.add(O,h)}}else L=!0,!0!==C&&(A.push(void 0),P.push(void 0))}var V=0;if(this.hasLines)if(this.isArea?t.fill=m||i._getColorLight(h):t.fill="none",L&&!0!==C){var G=[],Y=[];for(S=0;S<d;S++)void 0===A[S]?(G.push(void 0),Y.push(0)):(G.push(A[S]),Y.push(P[S]));G.length>1&&(l._isPolar&&_!==wijmo_chart_1.ChartType.Area?this._drawLines(t,G,Y,null,p,this.chart._plotrectId):(l.totalAngle<360&&(G.push(l._center.x),Y.push(l._center.y)),t.drawPolygon(G,Y,null,p,this.chart._plotrectId)),this.hitTester.add(new wijmo_chart_1._LinesArea(G,Y),h),V++)}else l._isPolar&&_!==wijmo_chart_1.ChartType.Area?this._drawLines(t,A,P,null,p,this.chart._plotrectId):(l.totalAngle<360&&(A.push(l._center.x),P.push(l._center.y)),t.drawPolygon(A,P,null,p,this.chart._plotrectId)),this.hitTester.add(new wijmo_chart_1._LinesArea(A,P),h),V++;t.fill=m;for(S=0;S<d;S++){k=A[S],R=P[S];!1===this.hasLines&&(t.fill=c[S]>0?m:v,t.stroke=c[S]>0?f:x),this.isValid(k,R,e,a)&&((this.hasSymbols||M)&&w>0&&this._drawSymbol(t,k,R,w,o,S,M),r._setPointIndex(S,V),V++)}}},e}(wijmo_chart_1._LinePlotter);exports._RadarLinePlotter=_RadarLinePlotter;var RadarChartType,_RadarBarPlotter=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return __extends(e,t),e.prototype.adjustLimits=function(t,e){this.dataInfo=t;var a=t.getMinX(),r=t.getMinY(),i=t.getMaxX(),n=t.getMaxY(),s=t.getDeltaX();return s<=0&&(s=1),this.chart.totalAngle<360&&(s=0),this.unload(),this.chart.axisY._getLogBase()||(this.origin>n?n=this.origin:this.origin<r&&(r=this.origin)),new wijmo_1.Rect(a,r,i-a+s,n-r)},e.prototype._getLabelPoint=function(t,e){var a=t._getAxisX(),r=t._getAxisY(),i=a.convert(e.dataX),n=r.convert(e.dataY);return this.chart._convertPoint(n,i)},e.prototype.plotSeries=function(t,e,a,r,i,n,s){var o=this.chart.series.indexOf(r),l=wijmo_1.asType(r,wijmo_chart_1.SeriesBase),_=(this.chart._options,this.width),h=this.chart,c=-90*Math.PI/180;n=n||0;var u,p=l._getAxisY()._uniqueId,d=(this.stackNegMap[p],this.stackPosMap[p]),y=this.stacking!=wijmo_chart_1.Stacking.None,g=this.stacking==wijmo_chart_1.Stacking.Stacked100pc,m=r.getValues(0),v=r.getValues(1);if(m){var f;v||(v=this.dataInfo.getXVals()),(f=v?h.totalAngle/v.length:h.totalAngle/(e.actualMax-e.actualMin))>0&&(_=y?f*_*Math.PI/180:f*Math.pow(_,n+1)*Math.PI/180);var x=l._getSymbolFill(o),w=l._getAltSymbolFill(o)||x,A=l._getSymbolStroke(o),P=l._getAltSymbolStroke(o)||A,T=m.length;null!=v&&(T=Math.min(T,v.length));var j,b,C=this.origin,L=0;void 0!==l._getChartType()&&(y=g=!1),C<a.actualMin?C=a.actualMin:C>a.actualMax&&(C=a.actualMax);a.convert(C);var M=e.actualMin,S=e.actualMax,k=a.actualMax;l._isCustomAxisY()&&(y=g=!1),h._areas[o]||(h._areas[o]=[]);for(var R=0;R<T;R++){var I=v?v[R]:R,N=null==m[R]?0:m[R];if(this._getSymbolOrigin&&a.convert(this._getSymbolOrigin(C,R,T)),this._getSymbolStyles){var F=this._getSymbolStyles(R,T);x=F&&F.fill?F.fill:x,w=F&&F.fill?F.fill:w,A=F&&F.stroke?F.stroke:A,P=F&&F.stroke?F.stroke:P}if(j=N>0?x:w,b=N>0?A:P,t.fill=j,t.stroke=b,wijmo_chart_1._DataInfo.isValid(I)&&wijmo_chart_1._DataInfo.isValid(N)){if(y){var X,D,O=I-.5*_,V=I+.5*_;if(O<M&&V<M||O>S&&V>S)continue;if(O=e.convert(O),V=e.convert(V),!wijmo_chart_1._DataInfo.isValid(O)||!wijmo_chart_1._DataInfo.isValid(V))continue;if(g)N/=this.dataInfo.getStackedAbsSum(I);var G=isNaN(d[I])?0:d[I];X=G,D=G+N,d[I]=G+N;var Y=e.convert(I),E=a.convert(X),B=a.convert(D);Y-=_/2,t.drawDonutSegment(h._center.x,h._center.y,B,E,Y+c,_,null,l.symbolStyle),(u=new wijmo_chart_1._DonutSegment(new wijmo_1.Point(h._center.x,h._center.y),B,E,Y+c,_,h.startAngle||0)).tag=new wijmo_chart_1._DataPoint(o,R,I,G+N),this.hitTester.add(u,o)}else{Y=e.convert(I);var W=a.convert(Math.min(N,k));h._convertPoint(W,Y);Y-=_/2,t.drawPieSegment(h._center.x,h._center.y,W,Y+c,_,null,l.symbolStyle),(u=new wijmo_chart_1._PieSegment(new wijmo_1.Point(h._center.x,h._center.y),W,Y+c,_,h.startAngle)).tag=new wijmo_chart_1._DataPoint(o,R,I,N),this.hitTester.add(u,o)}h._areas[o].push(u),r._setPointIndex(R,L),L++}}}},e}(wijmo_chart_1._BarPlotter);exports._RadarBarPlotter=_RadarBarPlotter,function(t){t[t.Column=0]="Column",t[t.Scatter=1]="Scatter",t[t.Line=2]="Line",t[t.LineSymbols=3]="LineSymbols",t[t.Area=4]="Area"}(RadarChartType=exports.RadarChartType||(exports.RadarChartType={}));var FlexRadar=function(t){function e(e,a){var r=t.call(this,e,a)||this;return r._chartType=RadarChartType.Line,r._startAngle=0,r._totalAngle=360,r._reversed=!1,r._areas=[],r}return __extends(e,t),Object.defineProperty(e.prototype,"_radarLinePlotter",{get:function(){return null==this.__radarLinePlotter&&(this.__radarLinePlotter=new _RadarLinePlotter,this._initPlotter(this.__radarLinePlotter)),this.__radarLinePlotter},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"_radarColumnPlotter",{get:function(){return null==this.__radarColumnPlotter&&(this.__radarColumnPlotter=new _RadarBarPlotter,this._initPlotter(this.__radarColumnPlotter)),this.__radarColumnPlotter},enumerable:!0,configurable:!0}),e.prototype._initAxes=function(){t.prototype._initAxes.call(this),this.axes.pop(),this.axes.pop(),this.axisX=new FlexRadarAxis(wijmo_chart_1.Position.Bottom),this.axisX.majorGrid=!0,this.axisY=new FlexRadarAxis(wijmo_chart_1.Position.Left),this.axisY.majorTickMarks=wijmo_chart_1.TickMark.Outside,this.axes.push(this.axisX),this.axes.push(this.axisY)},e.prototype._layout=function(e,a,r){t.prototype._layout.call(this,e,a,r);var i=this.axisX._height;this._plotRect.top+=i/2;var n=this._plotRect;this._radius=Math.min(n.width,n.height)/2,this._center=new wijmo_1.Point(n.left+n.width/2,n.top+n.height/2)},Object.defineProperty(e.prototype,"chartType",{get:function(){return this._chartType},set:function(t){(t=wijmo_1.asEnum(t,RadarChartType))!=this._chartType&&(this._chartType=t,this.invalidate())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"startAngle",{get:function(){return this._startAngle},set:function(t){t!=this._startAngle&&(this._startAngle=wijmo_1.asNumber(t,!0),this.invalidate())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"totalAngle",{get:function(){return this._totalAngle},set:function(t){t!=this._totalAngle&&t>=0&&(this._totalAngle=wijmo_1.asNumber(t,!0),this._totalAngle<=0&&(wijmo_1.assert(!1,"totalAngle must be greater than 0."),this._totalAngle=0),this._totalAngle>360&&(wijmo_1.assert(!1,"totalAngle must be less than or equal to 360."),this._totalAngle=360),this.invalidate())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"reversed",{get:function(){return this._reversed},set:function(t){t!=this._reversed&&(this._reversed=wijmo_1.asBoolean(t,!0),this.invalidate())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"stacking",{get:function(){return this._stacking},set:function(t){(t=wijmo_1.asEnum(t,wijmo_chart_1.Stacking))!=this._stacking&&(this._stacking=t,this.invalidate())},enumerable:!0,configurable:!0}),e.prototype._getChartType=function(){var t=wijmo_chart_1.ChartType.Line;switch(this.chartType){case RadarChartType.Area:t=wijmo_chart_1.ChartType.Area;break;case RadarChartType.Line:t=wijmo_chart_1.ChartType.Line;break;case RadarChartType.Column:t=wijmo_chart_1.ChartType.Column;break;case RadarChartType.LineSymbols:t=wijmo_chart_1.ChartType.LineSymbols;break;case RadarChartType.Scatter:t=wijmo_chart_1.ChartType.Scatter}return t},e.prototype._getPlotter=function(e){var a=this.chartType,r=null;if(e){var i=e.chartType;null!=i&&i!=a&&(a=i,!0)}switch(a){case RadarChartType.Line:this._radarLinePlotter.hasSymbols=!1,this._radarLinePlotter.hasLines=!0,this._radarLinePlotter.isArea=!1,r=this._radarLinePlotter;break;case RadarChartType.LineSymbols:this._radarLinePlotter.hasSymbols=!0,this._radarLinePlotter.hasLines=!0,this._radarLinePlotter.isArea=!1,r=this._radarLinePlotter;break;case RadarChartType.Area:this._radarLinePlotter.hasSymbols=!1,this._radarLinePlotter.hasLines=!0,this._radarLinePlotter.isArea=!0,r=this._radarLinePlotter;break;case RadarChartType.Scatter:this._radarLinePlotter.hasSymbols=!0,this._radarLinePlotter.hasLines=!1,this._radarLinePlotter.isArea=!1,r=this._radarLinePlotter;break;case RadarChartType.Column:this._radarColumnPlotter.isVolume=!1,this._radarColumnPlotter.width=.8,r=this._radarColumnPlotter;break;default:r=t.prototype._getPlotter.call(this,e)}return r},e.prototype._convertPoint=function(t,e){var a=new wijmo_1.Point,r=this._center;return a.x=r.x+t*Math.sin(e),a.y=r.y-t*Math.cos(e),a},e.prototype._createSeries=function(){return new FlexRadarSeries},e.prototype._clearCachedValues=function(){t.prototype._clearCachedValues.call(this),this._isPolar=!1,this._areas=[]},e.prototype._performBind=function(){if(this._xDataType=null,this._xlabels.splice(0),this._xvals.splice(0),this._cv){var t=this._cv.items;if(t){for(var e=t.length,a=0;a<e;a++){var r=t[a],i=this.bindingX?new wijmo_1.Binding(this.bindingX):null;if(i){var n=i.getValue(r);wijmo_1.isNumber(n)?(this._xvals.push(wijmo_1.asNumber(n)),this._xDataType=wijmo_1.DataType.Number):wijmo_1.isDate(n)&&(this._xDataType=wijmo_1.DataType.Date),this._xlabels.push(n)}}this._xvals.length==e?this._xlabels.splice(0):this._xvals.splice(0)}}this._xDataType===wijmo_1.DataType.Number&&(this._isPolar=!0)},e.prototype._prepareRender=function(){t.prototype._prepareRender.call(this),this._areas=[]},e}(wijmo_chart_1.FlexChartCore);exports.FlexRadar=FlexRadar;var FlexRadarAxis=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._points=[],e._axisLabels=[],e}return __extends(e,t),e.prototype._render=function(e){var a=this;if(this._hasVisibileSeries()){t.prototype._render.call(this,e);var r=this._axisLabels;if(r.length){var i=function(){var t=a.axisType==wijmo_chart_1.AxisType.X?"wj-axis-x-labels "+wijmo_chart_1.FlexChart._CSS_AXIS_X:"wj-axis-y-labels "+wijmo_chart_1.FlexChart._CSS_AXIS_Y;e.startGroup(t),r.forEach(function(t){var r=t.labelAngle;r>0?wijmo_chart_1.FlexChart._renderRotatedText(e,t.text,t.pos,t.align,t.vAlign,t.pos,r,t.class):r<0?wijmo_chart_1.FlexChart._renderRotatedText(e,t.text,t.pos,t.align,t.vAlign,t.pos,r,t.class):a._renderLabel(e,t.val,t.text,t.pos,t.align,t.vAlign,t.class)}),e.endGroup(),a._axisLabels=[],a._chart.rendered.removeHandler(i)};this._chart.rendered.addHandler(i,this)}}},e.prototype._getHeight=function(e,a){var r=t.prototype._getHeight.call(this,e,a);return this._axisType==wijmo_chart_1.AxisType.Y&&(r=4),this._height=2*r,2*r},e.prototype._getActualRange=function(){return this._isTimeAxis&&null!=this.__actualMax&&null!=this.__actualMin?this.__actualMax-this.__actualMin:t.prototype._getActualRange.call(this)},e.prototype._updateActualLimits=function(e,a,r,i,n){var s=this;void 0===i&&(i=null),void 0===n&&(n=null),t.prototype._updateActualLimits.call(this,e,a,r,i,n);var o,l=this._chart,_=this._lbls,h=this.actualMin.valueOf?this.actualMin.valueOf():this.actualMin,c=this.actualMax.valueOf?this.actualMax.valueOf():this.actualMax;this._lbls&&this===l.axisX&&(l._angles=[],this._isTimeAxis&&0===this._lbls.length&&this._values.forEach(function(t){_.push(s._formatValue(t))}),o=_.length,l.totalAngle<360&&(o-=1),_.forEach(function(t,e){var a=h+e/o*(c-h),r=l.startAngle+e/o*l.totalAngle;isNaN(r)||isNaN(a)||l._angles.push({value:s.convert(a),angle:r}),s._isTimeAxis?((null==s.__actualMin||s.__actualMin>t)&&(s.__actualMin=t),(null==s.__actualMax||s.__actualMax<t)&&(s.__actualMax=t)):null==s.__actualMin&&null==s.__actualMax||(s.__actualMin=null,s.__actualMax=null)}),this._isTimeAxis&&this._lbls.length>0&&(this._updateAutoFormat(0),this._lbls=_.map(function(t){var e=wijmo_1.asDate(t).valueOf();return s._formatValue(e)})))},e.prototype._updateActualLimitsByChartType=function(t,e,a){var r=this._chart;if(r._getChartType()!=wijmo_chart_1.ChartType.Column&&360===r.totalAngle&&this.axisType===wijmo_chart_1.AxisType.X)if(this._isTimeAxis){var i=(r._xlabels.length||r._xvals.length)-1;a+=(a-e)/(i=i<1?1:i)}else r._isPolar||(a+=1);return{min:e,max:a}},e.prototype.convert=function(t,e,a){var r=null==e?this.actualMax:e,i=null==a?this.actualMin:a,n=this._chart;if(!n)return NaN;if(r==i)return 0;if(this.axisType===wijmo_chart_1.AxisType.X)return n.reversed?(n.startAngle-(t-i)/(r-i)*n.totalAngle)*Math.PI/180:(n.startAngle+(t-i)/(r-i)*n.totalAngle)*Math.PI/180;if(this._getLogBase()){if(t<=0)return NaN;var s=Math.log(r/i);return Math.log(t/i)/s*n._radius}return(t-i)/(r-i)*n._radius},e.prototype._renderLineAndTitle=function(t){var e=this._chart,a=wijmo_chart_1.FlexChart._CSS_LINE,r=(e.startAngle-90)*Math.PI/180,i=e.totalAngle*Math.PI/180,n=e._radius;this.axisType===wijmo_chart_1.AxisType.X&&this.axisLine&&(t.stroke=wijmo_chart_1.FlexChart._FG,e._isPolar?(r=e.reversed?r-i:r,t.drawPieSegment(e._center.x,e._center.y,n,r,i,a)):this._renderPolygon(t,n,a))},e.prototype._renderPolygon=function(t,e,a){var r=this._chart,i=r._angles,n=i.length,s=r.axisX.minorGrid,o=[],l=[];if(i.forEach(function(t,a){if(s&&a>0){var n=r._convertPoint(e,t.value-(t.value-i[a-1].value)/2);o.push(n.x),l.push(n.y)}var _=r._convertPoint(e,t.value);o.push(_.x),l.push(_.y)}),r.totalAngle<360)o.push(r._center.x),l.push(r._center.y);else if(s&&n>=2){var _=r._convertPoint(e,i[n-1].value-(i[n-2].value-i[n-1].value)/2);o.push(_.x),l.push(_.y)}t.drawPolygon(o,l,a)},e.prototype._renderMinors=function(t,e,a,r){var i,n=this,s=this._chart,o=wijmo_chart_1.FlexChart._CSS_GRIDLINE_MINOR,l=this.minorGrid,_=s._angles,h=_.length,c=s.axisX.minorGrid,u=wijmo_chart_1.FlexChart._FG,p=this._GRIDLINE_WIDTH,d=(s.startAngle,Math.PI,s.totalAngle,Math.PI,this._TICK_OVERLAP),y=this.minorTickMarks,g=!0;this._vals.minor=e,y==wijmo_chart_1.TickMark.Outside?d=1:y==wijmo_chart_1.TickMark.Inside?d=-1:y==wijmo_chart_1.TickMark.Cross?d=0:g=!1,this.axisType==wijmo_chart_1.AxisType.Y?(t.stroke=u,t.strokeWidth=p,e.forEach(function(e){var a=n.convert(e);if(l&&n._renderYGridLine(t,s,a,o),g&&(_.forEach(function(e,r){if(c&&r>0){i=e.value-(e.value-_[r-1].value)/2;var o=s._convertPoint(a,i);n._drawMinorTickLength(t,d,i,o)}i=e.value;var l=s._convertPoint(a,i);n._drawMinorTickLength(t,d,i,l)}),c&&h>=2)){i=_[h-1].value-(_[h-2].value-_[h-1].value)/2;var r=s._convertPoint(a,i);n._drawMinorTickLength(t,d,i,r)}})):(t.stroke=u,t.strokeWidth=p,e.forEach(function(e){var a=n.convert(e);l&&(n._renderXGridLine(t,s,a,o),g&&n._drawMinorTickLength(t,d,a-Math.PI/2,s._convertPoint(s._radius,a)))}))},e.prototype._drawMinorTickLength=function(t,e,a,r){var i=this._TICK_HEIGHT,n=wijmo_chart_1.FlexChart._CSS_TICK_MINOR,s=.5*(e-1)*i*Math.cos(a),o=.5*(1+e)*i*Math.cos(a),l=.5*(e-1)*i*Math.sin(a),_=.5*(1+e)*i*Math.sin(a);t.drawLine(r.x+s,r.y+l,r.x+o,r.y+_,n)},e.prototype._renderLabelsAndTicks=function(t,e,a,r,i,n,s,o,l){this._points=[],i=this.labelAngle||0;var _,h=this._chart,c=this.labelPadding||2,u=wijmo_chart_1.FlexChart._CSS_LABEL,p=wijmo_chart_1.FlexChart._CSS_GRIDLINE,d=wijmo_chart_1.FlexChart._CSS_TICK,y=wijmo_chart_1.FlexChart._FG,g=this._TICK_WIDTH,m=this.majorGrid,v=wijmo_chart_1.FlexChart._FG,f=this._GRIDLINE_WIDTH,x=h.startAngle*Math.PI/180,w=(h.totalAngle,Math.PI,1);if(this.axisType==wijmo_chart_1.AxisType.Y){m=a!=this.actualMin&&m&&a!=this.actualMax;var A=this.convert(a),P=h._convertPoint(A,x);if(m&&(t.stroke=v,t.strokeWidth=f,this._renderYGridLine(t,h,A,p)),t.stroke=y,t.strokeWidth=g,s){(_=(h.startAngle%360+360)%360)<=90&&_>=75||_>=270&&_<=285?w=2:(_>90&&_<=105||_<270&&_>=255)&&(w=0);var T=new wijmo_1.Point(P.x-c-Math.abs(o-l),P.y);this._axisLabels.push({val:a,text:r,pos:T,align:2,vAlign:w,labelAngle:i,class:u})}n!=wijmo_chart_1.TickMark.None&&t.drawLine(P.x-l*Math.cos(x),P.y-l*Math.sin(x),P.x-o*Math.cos(x),P.y-o*Math.sin(x),d)}else{var j=this.convert(a);if(m&&(t.stroke=v,t.strokeWidth=f,this._renderXGridLine(t,h,j,p)),t.stroke=y,t.strokeWidth=g,s){var b,C,L;T=h._convertPoint(h._radius+c,j);b=h._angles&&h._angles.length?h._angles[e].angle:h.startAngle+(a-this.actualMin)*h.totalAngle/(this.actualMax-this.actualMin),b=(b%=360)>=0?b:b+360,C=this._getXLabelVAlign(b),L=this._getXLabelAlign(b),h._isPolar&&(r=this._formatValue(b)),i>0?wijmo_chart_1.FlexChart._renderRotatedText(t,r,T,L,C,T,i,u):i<0?wijmo_chart_1.FlexChart._renderRotatedText(t,r,T,L,C,T,i,u):this._renderLabel(t,a,r,T,L,C,u)}n!=wijmo_chart_1.TickMark.None&&this._renderXTick(t,h,j,d,o,l)}return!0},e.prototype._renderXGridLine=function(t,e,a,r){var i=e._center,n=e._convertPoint(e._radius,a);t.drawLine(i.x,i.y,n.x,n.y,r)},e.prototype._renderXTick=function(t,e,a,r,i,n){var s,o;e._center;s=e._convertPoint(e._radius+i,a),o=e._convertPoint(e._radius+n,a),t.drawLine(s.x,s.y,o.x,o.y,r)},e.prototype._renderYGridLine=function(t,e,a,r){e._angles;var i=e._center,n=e.startAngle*Math.PI/180,s=e.totalAngle*Math.PI/180;e._isPolar?(n=(e.startAngle-90)*Math.PI/180,n=e.reversed?n-s:n,t.drawPieSegment(i.x,i.y,a,n,s,r)):this._renderPolygon(t,a,r)},e.prototype._getXLabelVAlign=function(t){var e=1,a=this._chart,r=a.startAngle;return a.reversed&&(t=(360+r+(r%360-t%360))%360),0===t?e=2:180===t&&(e=0),e},e.prototype._getXLabelAlign=function(t){var e=0,a=this._chart,r=a.startAngle;return a.reversed&&(t=(360+r+(r%360-t%360))%360),t>0&&t<180?e=-1:t>180&&t<360&&(e=1),e+1},e.prototype._createTimeLabels=function(e,a,r,i){var n=this;if(this._axisType==wijmo_chart_1.AxisType.Y)t.prototype._createTimeLabels.call(this,e,a,r,i);else{var s=this._values;this.format;if(!s||0===s.length)return;s.forEach(function(t){r.push(t),i.push(n._formatValue(t))})}},e.prototype._niceNumber=function(e,a,r){var i=this._chart,n=this.actualMax-this.actualMin,s=i.totalAngle;return s>360&&(s%=360),i._isPolar?s%8==0?n/8:s%6==0?n/6:s%4==0?n/4:s%3==0?n/3:s%2==0?n/2:t.prototype._niceNumber.call(this,e,a,r):t.prototype._niceNumber.call(this,e,a,r)},e}(wijmo_chart_1.Axis);exports.FlexRadarAxis=FlexRadarAxis,wijmo_1._registerModule("wijmo.chart.radar",selfModule);
/*!
*
* Wijmo Library 5.20183.595-nightly.d20190405.t210807
* http://wijmo.com/
*
* Copyright(c) GrapeCity, Inc. All rights reserved.
*
* Licensed under the GrapeCity Commercial License.
* sales@wijmo.com
* wijmo.com/products/wijmo-5/license/
*
*/
"use strict";var __extends=this&&this.__extends||function(){var t=function(e,a){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var a in e)e.hasOwnProperty(a)&&(t[a]=e[a])})(e,a)};return function(e,a){function r(){this.constructor=e}t(e,a),e.prototype=null===a?Object.create(a):(r.prototype=a.prototype,new r)}}();Object.defineProperty(exports,"__esModule",{value:!0});var wijmo_1=require("@grapecity/wijmo"),wijmo_chart_1=require("@grapecity/wijmo.chart"),selfModule=require("@grapecity/wijmo.chart.radar"),FlexRadarSeries=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return __extends(e,t),Object.defineProperty(e.prototype,"chartType",{get:function(){return this._finChartType},set:function(t){(t=wijmo_1.asEnum(t,RadarChartType,!0))!=this._finChartType&&(this._finChartType=t,this._invalidate())},enumerable:!0,configurable:!0}),e.prototype._getChartType=function(){var t;switch(this.chartType){case RadarChartType.Area:t=wijmo_chart_1.ChartType.Area;break;case RadarChartType.Line:t=wijmo_chart_1.ChartType.Line;break;case RadarChartType.Column:t=wijmo_chart_1.ChartType.Column;break;case RadarChartType.LineSymbols:t=wijmo_chart_1.ChartType.LineSymbols;break;case RadarChartType.Scatter:t=wijmo_chart_1.ChartType.Scatter}return t},e}(wijmo_chart_1.SeriesBase);exports.FlexRadarSeries=FlexRadarSeries;var _RadarLinePlotter=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.isArea=!1,e}return __extends(e,t),e.prototype._getLabelPoint=function(t,e){var a=t._getAxisX(),r=t._getAxisY(),i=a.convert(e.dataX),n=r.convert(e.dataY);return this.chart._convertPoint(n,i)},e.prototype.plotSeries=function(t,e,a,r,i,n,s){var o=wijmo_1.asType(r,wijmo_chart_1.SeriesBase),l=this.chart,_=o._getChartType()||l._getChartType(),h=l.series.indexOf(r),c=r.getValues(0),u=r.getValues(1);if(c){u||(u=this.dataInfo.getXVals());var p=wijmo_chart_1._BasePlotter.cloneStyle(r.style,["fill"]),d=c.length,y=!0;u?d=Math.min(d,u.length):(y=!1,u=new Array(d));var g=this._DEFAULT_WIDTH,m=o._getSymbolFill(h),v=o._getAltSymbolFill(h)||m,f=o._getSymbolStroke(h),x=o._getAltSymbolStroke(h)||f,w=o._getSymbolSize();t.stroke=f,t.strokeWidth=g,t.fill=m;var A=new Array,P=new Array,T=a.actualMax,j=this.stacking!=wijmo_chart_1.Stacking.None&&!o._isCustomAxisY(),b=this.stacking==wijmo_chart_1.Stacking.Stacked100pc&&!o._isCustomAxisY();void 0!==o._getChartType()&&(j=b=!1);for(var C=o.interpolateNulls,L=!1,M=this.getItemFormatter(r),S=0;S<d;S++){var k=y?u[S]:S,R=null==c[S]?0:c[S];if(wijmo_chart_1._DataInfo.isValid(k)&&wijmo_chart_1._DataInfo.isValid(R)){if(j){if(b)R/=this.dataInfo.getStackedAbsSum(k);if(R>=0){var I=isNaN(this.stackPos[k])?0:this.stackPos[k];R=this.stackPos[k]=I+R}else{I=isNaN(this.stackNeg[k])?0:this.stackNeg[k];R=this.stackNeg[k]=I+R}}var N;R=Math.min(R,T),N=new wijmo_chart_1._DataPoint(h,S,k,R);var F=e.convert(k),X=a.convert(R),D=this.chart._convertPoint(X,F);if(k=D.x,R=D.y,isNaN(k)||isNaN(R))L=!0,!0!==C&&(A.push(void 0),P.push(void 0));else{A.push(k),P.push(R);var O=new wijmo_chart_1._CircleArea(new wijmo_1.Point(k,R),.5*w);O.tag=N,this.hitTester.add(O,h)}}else L=!0,!0!==C&&(A.push(void 0),P.push(void 0))}var V=0;if(this.hasLines)if(this.isArea?t.fill=m||i._getColorLight(h):t.fill="none",L&&!0!==C){var G=[],Y=[];for(S=0;S<d;S++)void 0===A[S]?(G.push(void 0),Y.push(0)):(G.push(A[S]),Y.push(P[S]));G.length>1&&(l._isPolar&&_!==wijmo_chart_1.ChartType.Area?this._drawLines(t,G,Y,null,p,this.chart._plotrectId):(l.totalAngle<360&&(G.push(l._center.x),Y.push(l._center.y)),t.drawPolygon(G,Y,null,p,this.chart._plotrectId)),this.hitTester.add(new wijmo_chart_1._LinesArea(G,Y),h),V++)}else l._isPolar&&_!==wijmo_chart_1.ChartType.Area?this._drawLines(t,A,P,null,p,this.chart._plotrectId):(l.totalAngle<360&&(A.push(l._center.x),P.push(l._center.y)),t.drawPolygon(A,P,null,p,this.chart._plotrectId)),this.hitTester.add(new wijmo_chart_1._LinesArea(A,P),h),V++;t.fill=m;for(S=0;S<d;S++){k=A[S],R=P[S];!1===this.hasLines&&(t.fill=c[S]>0?m:v,t.stroke=c[S]>0?f:x),this.isValid(k,R,e,a)&&((this.hasSymbols||M)&&w>0&&this._drawSymbol(t,k,R,w,o,S,M),r._setPointIndex(S,V),V++)}}},e}(wijmo_chart_1._LinePlotter);exports._RadarLinePlotter=_RadarLinePlotter;var RadarChartType,_RadarBarPlotter=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return __extends(e,t),e.prototype.adjustLimits=function(t,e){this.dataInfo=t;var a=t.getMinX(),r=t.getMinY(),i=t.getMaxX(),n=t.getMaxY(),s=t.getDeltaX();return s<=0&&(s=1),this.chart.totalAngle<360&&(s=0),this.unload(),this.chart.axisY._getLogBase()||(this.origin>n?n=this.origin:this.origin<r&&(r=this.origin)),new wijmo_1.Rect(a,r,i-a+s,n-r)},e.prototype._getLabelPoint=function(t,e){var a=t._getAxisX(),r=t._getAxisY(),i=a.convert(e.dataX),n=r.convert(e.dataY);return this.chart._convertPoint(n,i)},e.prototype.plotSeries=function(t,e,a,r,i,n,s){var o=this.chart.series.indexOf(r),l=wijmo_1.asType(r,wijmo_chart_1.SeriesBase),_=(this.chart._options,this.width),h=this.chart,c=-90*Math.PI/180;n=n||0;var u,p=l._getAxisY()._uniqueId,d=(this.stackNegMap[p],this.stackPosMap[p]),y=this.stacking!=wijmo_chart_1.Stacking.None,g=this.stacking==wijmo_chart_1.Stacking.Stacked100pc,m=r.getValues(0),v=r.getValues(1);if(m){var f;v||(v=this.dataInfo.getXVals()),(f=v?h.totalAngle/v.length:h.totalAngle/(e.actualMax-e.actualMin))>0&&(_=y?f*_*Math.PI/180:f*Math.pow(_,n+1)*Math.PI/180);var x=l._getSymbolFill(o),w=l._getAltSymbolFill(o)||x,A=l._getSymbolStroke(o),P=l._getAltSymbolStroke(o)||A,T=m.length;null!=v&&(T=Math.min(T,v.length));var j,b,C=this.origin,L=0;void 0!==l._getChartType()&&(y=g=!1),C<a.actualMin?C=a.actualMin:C>a.actualMax&&(C=a.actualMax);a.convert(C);var M=e.actualMin,S=e.actualMax,k=a.actualMax;l._isCustomAxisY()&&(y=g=!1),h._areas[o]||(h._areas[o]=[]);for(var R=0;R<T;R++){var I=v?v[R]:R,N=null==m[R]?0:m[R];if(this._getSymbolOrigin&&a.convert(this._getSymbolOrigin(C,R,T)),this._getSymbolStyles){var F=this._getSymbolStyles(R,T);x=F&&F.fill?F.fill:x,w=F&&F.fill?F.fill:w,A=F&&F.stroke?F.stroke:A,P=F&&F.stroke?F.stroke:P}if(j=N>0?x:w,b=N>0?A:P,t.fill=j,t.stroke=b,wijmo_chart_1._DataInfo.isValid(I)&&wijmo_chart_1._DataInfo.isValid(N)){if(y){var X,D,O=I-.5*_,V=I+.5*_;if(O<M&&V<M||O>S&&V>S)continue;if(O=e.convert(O),V=e.convert(V),!wijmo_chart_1._DataInfo.isValid(O)||!wijmo_chart_1._DataInfo.isValid(V))continue;if(g)N/=this.dataInfo.getStackedAbsSum(I);var G=isNaN(d[I])?0:d[I];X=G,D=G+N,d[I]=G+N;var Y=e.convert(I),E=a.convert(X),B=a.convert(D);Y-=_/2,t.drawDonutSegment(h._center.x,h._center.y,B,E,Y+c,_,null,l.symbolStyle),(u=new wijmo_chart_1._DonutSegment(new wijmo_1.Point(h._center.x,h._center.y),B,E,Y+c,_,h.startAngle||0)).tag=new wijmo_chart_1._DataPoint(o,R,I,G+N),this.hitTester.add(u,o)}else{Y=e.convert(I);var W=a.convert(Math.min(N,k));h._convertPoint(W,Y);Y-=_/2,t.drawPieSegment(h._center.x,h._center.y,W,Y+c,_,null,l.symbolStyle),(u=new wijmo_chart_1._PieSegment(new wijmo_1.Point(h._center.x,h._center.y),W,Y+c,_,h.startAngle)).tag=new wijmo_chart_1._DataPoint(o,R,I,N),this.hitTester.add(u,o)}h._areas[o].push(u),r._setPointIndex(R,L),L++}}}},e}(wijmo_chart_1._BarPlotter);exports._RadarBarPlotter=_RadarBarPlotter,function(t){t[t.Column=0]="Column",t[t.Scatter=1]="Scatter",t[t.Line=2]="Line",t[t.LineSymbols=3]="LineSymbols",t[t.Area=4]="Area"}(RadarChartType=exports.RadarChartType||(exports.RadarChartType={}));var FlexRadar=function(t){function e(e,a){var r=t.call(this,e,a)||this;return r._chartType=RadarChartType.Line,r._startAngle=0,r._totalAngle=360,r._reversed=!1,r._areas=[],r}return __extends(e,t),Object.defineProperty(e.prototype,"_radarLinePlotter",{get:function(){return null==this.__radarLinePlotter&&(this.__radarLinePlotter=new _RadarLinePlotter,this._initPlotter(this.__radarLinePlotter)),this.__radarLinePlotter},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"_radarColumnPlotter",{get:function(){return null==this.__radarColumnPlotter&&(this.__radarColumnPlotter=new _RadarBarPlotter,this._initPlotter(this.__radarColumnPlotter)),this.__radarColumnPlotter},enumerable:!0,configurable:!0}),e.prototype._initAxes=function(){t.prototype._initAxes.call(this),this.axes.pop(),this.axes.pop(),this.axisX=new FlexRadarAxis(wijmo_chart_1.Position.Bottom),this.axisX.majorGrid=!0,this.axisY=new FlexRadarAxis(wijmo_chart_1.Position.Left),this.axisY.majorTickMarks=wijmo_chart_1.TickMark.Outside,this.axes.push(this.axisX),this.axes.push(this.axisY)},e.prototype._layout=function(e,a,r){t.prototype._layout.call(this,e,a,r);var i=this.axisX._height;this._plotRect.top+=i/2;var n=this._plotRect;this._radius=Math.min(n.width,n.height)/2,this._center=new wijmo_1.Point(n.left+n.width/2,n.top+n.height/2)},Object.defineProperty(e.prototype,"chartType",{get:function(){return this._chartType},set:function(t){(t=wijmo_1.asEnum(t,RadarChartType))!=this._chartType&&(this._chartType=t,this.invalidate())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"startAngle",{get:function(){return this._startAngle},set:function(t){t!=this._startAngle&&(this._startAngle=wijmo_1.asNumber(t,!0),this.invalidate())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"totalAngle",{get:function(){return this._totalAngle},set:function(t){t!=this._totalAngle&&t>=0&&(this._totalAngle=wijmo_1.asNumber(t,!0),this._totalAngle<=0&&(wijmo_1.assert(!1,"totalAngle must be greater than 0."),this._totalAngle=0),this._totalAngle>360&&(wijmo_1.assert(!1,"totalAngle must be less than or equal to 360."),this._totalAngle=360),this.invalidate())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"reversed",{get:function(){return this._reversed},set:function(t){t!=this._reversed&&(this._reversed=wijmo_1.asBoolean(t,!0),this.invalidate())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"stacking",{get:function(){return this._stacking},set:function(t){(t=wijmo_1.asEnum(t,wijmo_chart_1.Stacking))!=this._stacking&&(this._stacking=t,this.invalidate())},enumerable:!0,configurable:!0}),e.prototype._getChartType=function(){var t=wijmo_chart_1.ChartType.Line;switch(this.chartType){case RadarChartType.Area:t=wijmo_chart_1.ChartType.Area;break;case RadarChartType.Line:t=wijmo_chart_1.ChartType.Line;break;case RadarChartType.Column:t=wijmo_chart_1.ChartType.Column;break;case RadarChartType.LineSymbols:t=wijmo_chart_1.ChartType.LineSymbols;break;case RadarChartType.Scatter:t=wijmo_chart_1.ChartType.Scatter}return t},e.prototype._getPlotter=function(e){var a=this.chartType,r=null;if(e){var i=e.chartType;null!=i&&i!=a&&(a=i,!0)}switch(a){case RadarChartType.Line:this._radarLinePlotter.hasSymbols=!1,this._radarLinePlotter.hasLines=!0,this._radarLinePlotter.isArea=!1,r=this._radarLinePlotter;break;case RadarChartType.LineSymbols:this._radarLinePlotter.hasSymbols=!0,this._radarLinePlotter.hasLines=!0,this._radarLinePlotter.isArea=!1,r=this._radarLinePlotter;break;case RadarChartType.Area:this._radarLinePlotter.hasSymbols=!1,this._radarLinePlotter.hasLines=!0,this._radarLinePlotter.isArea=!0,r=this._radarLinePlotter;break;case RadarChartType.Scatter:this._radarLinePlotter.hasSymbols=!0,this._radarLinePlotter.hasLines=!1,this._radarLinePlotter.isArea=!1,r=this._radarLinePlotter;break;case RadarChartType.Column:this._radarColumnPlotter.isVolume=!1,this._radarColumnPlotter.width=.8,r=this._radarColumnPlotter;break;default:r=t.prototype._getPlotter.call(this,e)}return r},e.prototype._convertPoint=function(t,e){var a=new wijmo_1.Point,r=this._center;return a.x=r.x+t*Math.sin(e),a.y=r.y-t*Math.cos(e),a},e.prototype._createSeries=function(){return new FlexRadarSeries},e.prototype._clearCachedValues=function(){t.prototype._clearCachedValues.call(this),this._isPolar=!1,this._areas=[]},e.prototype._performBind=function(){if(this._xDataType=null,this._xlabels.splice(0),this._xvals.splice(0),this._cv){var t=this._cv.items;if(t){for(var e=t.length,a=0;a<e;a++){var r=t[a],i=this.bindingX?new wijmo_1.Binding(this.bindingX):null;if(i){var n=i.getValue(r);wijmo_1.isNumber(n)?(this._xvals.push(wijmo_1.asNumber(n)),this._xDataType=wijmo_1.DataType.Number):wijmo_1.isDate(n)&&(this._xDataType=wijmo_1.DataType.Date),this._xlabels.push(n)}}this._xvals.length==e?this._xlabels.splice(0):this._xvals.splice(0)}}this._xDataType===wijmo_1.DataType.Number&&(this._isPolar=!0)},e.prototype._prepareRender=function(){t.prototype._prepareRender.call(this),this._areas=[]},e}(wijmo_chart_1.FlexChartCore);exports.FlexRadar=FlexRadar;var FlexRadarAxis=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._points=[],e._axisLabels=[],e}return __extends(e,t),e.prototype._render=function(e){var a=this;if(this._hasVisibileSeries()){t.prototype._render.call(this,e);var r=this._axisLabels;if(r.length){var i=function(){var t=a.axisType==wijmo_chart_1.AxisType.X?"wj-axis-x-labels "+wijmo_chart_1.FlexChart._CSS_AXIS_X:"wj-axis-y-labels "+wijmo_chart_1.FlexChart._CSS_AXIS_Y;e.startGroup(t),r.forEach(function(t){var r=t.labelAngle;r>0?wijmo_chart_1.FlexChart._renderRotatedText(e,t.text,t.pos,t.align,t.vAlign,t.pos,r,t.class):r<0?wijmo_chart_1.FlexChart._renderRotatedText(e,t.text,t.pos,t.align,t.vAlign,t.pos,r,t.class):a._renderLabel(e,t.val,t.text,t.pos,t.align,t.vAlign,t.class)}),e.endGroup(),a._axisLabels=[],a._chart.rendered.removeHandler(i)};this._chart.rendered.addHandler(i,this)}}},e.prototype._getHeight=function(e,a){var r=t.prototype._getHeight.call(this,e,a);return this._axisType==wijmo_chart_1.AxisType.Y&&(r=4),this._height=2*r,2*r},e.prototype._getActualRange=function(){return this._isTimeAxis&&null!=this.__actualMax&&null!=this.__actualMin?this.__actualMax-this.__actualMin:t.prototype._getActualRange.call(this)},e.prototype._updateActualLimits=function(e,a,r,i,n){var s=this;void 0===i&&(i=null),void 0===n&&(n=null),t.prototype._updateActualLimits.call(this,e,a,r,i,n);var o,l=this._chart,_=this._lbls,h=this.actualMin.valueOf?this.actualMin.valueOf():this.actualMin,c=this.actualMax.valueOf?this.actualMax.valueOf():this.actualMax;this._lbls&&this===l.axisX&&(l._angles=[],this._isTimeAxis&&0===this._lbls.length&&this._values.forEach(function(t){_.push(s._formatValue(t))}),o=_.length,l.totalAngle<360&&(o-=1),_.forEach(function(t,e){var a=h+e/o*(c-h),r=l.startAngle+e/o*l.totalAngle;isNaN(r)||isNaN(a)||l._angles.push({value:s.convert(a),angle:r}),s._isTimeAxis?((null==s.__actualMin||s.__actualMin>t)&&(s.__actualMin=t),(null==s.__actualMax||s.__actualMax<t)&&(s.__actualMax=t)):null==s.__actualMin&&null==s.__actualMax||(s.__actualMin=null,s.__actualMax=null)}),this._isTimeAxis&&this._lbls.length>0&&(this._updateAutoFormat(0),this._lbls=_.map(function(t){var e=wijmo_1.asDate(t).valueOf();return s._formatValue(e)})))},e.prototype._updateActualLimitsByChartType=function(t,e,a){var r=this._chart;if(r._getChartType()!=wijmo_chart_1.ChartType.Column&&360===r.totalAngle&&this.axisType===wijmo_chart_1.AxisType.X)if(this._isTimeAxis){var i=(r._xlabels.length||r._xvals.length)-1;a+=(a-e)/(i=i<1?1:i)}else r._isPolar||(a+=1);return{min:e,max:a}},e.prototype.convert=function(t,e,a){var r=null==e?this.actualMax:e,i=null==a?this.actualMin:a,n=this._chart;if(!n)return NaN;if(r==i)return 0;if(this.axisType===wijmo_chart_1.AxisType.X)return n.reversed?(n.startAngle-(t-i)/(r-i)*n.totalAngle)*Math.PI/180:(n.startAngle+(t-i)/(r-i)*n.totalAngle)*Math.PI/180;if(this._getLogBase()){if(t<=0)return NaN;var s=Math.log(r/i);return Math.log(t/i)/s*n._radius}return(t-i)/(r-i)*n._radius},e.prototype._renderLineAndTitle=function(t){var e=this._chart,a=wijmo_chart_1.FlexChart._CSS_LINE,r=(e.startAngle-90)*Math.PI/180,i=e.totalAngle*Math.PI/180,n=e._radius;this.axisType===wijmo_chart_1.AxisType.X&&this.axisLine&&(t.stroke=wijmo_chart_1.FlexChart._FG,e._isPolar?(r=e.reversed?r-i:r,t.drawPieSegment(e._center.x,e._center.y,n,r,i,a)):this._renderPolygon(t,n,a))},e.prototype._renderPolygon=function(t,e,a){var r=this._chart,i=r._angles,n=i.length,s=r.axisX.minorGrid,o=[],l=[];if(i.forEach(function(t,a){if(s&&a>0){var n=r._convertPoint(e,t.value-(t.value-i[a-1].value)/2);o.push(n.x),l.push(n.y)}var _=r._convertPoint(e,t.value);o.push(_.x),l.push(_.y)}),r.totalAngle<360)o.push(r._center.x),l.push(r._center.y);else if(s&&n>=2){var _=r._convertPoint(e,i[n-1].value-(i[n-2].value-i[n-1].value)/2);o.push(_.x),l.push(_.y)}t.drawPolygon(o,l,a)},e.prototype._renderMinors=function(t,e,a,r){var i,n=this,s=this._chart,o=wijmo_chart_1.FlexChart._CSS_GRIDLINE_MINOR,l=this.minorGrid,_=s._angles,h=_.length,c=s.axisX.minorGrid,u=wijmo_chart_1.FlexChart._FG,p=this._GRIDLINE_WIDTH,d=(s.startAngle,Math.PI,s.totalAngle,Math.PI,this._TICK_OVERLAP),y=this.minorTickMarks,g=!0;this._vals.minor=e,y==wijmo_chart_1.TickMark.Outside?d=1:y==wijmo_chart_1.TickMark.Inside?d=-1:y==wijmo_chart_1.TickMark.Cross?d=0:g=!1,this.axisType==wijmo_chart_1.AxisType.Y?(t.stroke=u,t.strokeWidth=p,e.forEach(function(e){var a=n.convert(e);if(l&&n._renderYGridLine(t,s,a,o),g&&(_.forEach(function(e,r){if(c&&r>0){i=e.value-(e.value-_[r-1].value)/2;var o=s._convertPoint(a,i);n._drawMinorTickLength(t,d,i,o)}i=e.value;var l=s._convertPoint(a,i);n._drawMinorTickLength(t,d,i,l)}),c&&h>=2)){i=_[h-1].value-(_[h-2].value-_[h-1].value)/2;var r=s._convertPoint(a,i);n._drawMinorTickLength(t,d,i,r)}})):(t.stroke=u,t.strokeWidth=p,e.forEach(function(e){var a=n.convert(e);l&&(n._renderXGridLine(t,s,a,o),g&&n._drawMinorTickLength(t,d,a-Math.PI/2,s._convertPoint(s._radius,a)))}))},e.prototype._drawMinorTickLength=function(t,e,a,r){var i=this._TICK_HEIGHT,n=wijmo_chart_1.FlexChart._CSS_TICK_MINOR,s=.5*(e-1)*i*Math.cos(a),o=.5*(1+e)*i*Math.cos(a),l=.5*(e-1)*i*Math.sin(a),_=.5*(1+e)*i*Math.sin(a);t.drawLine(r.x+s,r.y+l,r.x+o,r.y+_,n)},e.prototype._renderLabelsAndTicks=function(t,e,a,r,i,n,s,o,l){this._points=[],i=this.labelAngle||0;var _,h=this._chart,c=this.labelPadding||2,u=wijmo_chart_1.FlexChart._CSS_LABEL,p=wijmo_chart_1.FlexChart._CSS_GRIDLINE,d=wijmo_chart_1.FlexChart._CSS_TICK,y=wijmo_chart_1.FlexChart._FG,g=this._TICK_WIDTH,m=this.majorGrid,v=wijmo_chart_1.FlexChart._FG,f=this._GRIDLINE_WIDTH,x=h.startAngle*Math.PI/180,w=(h.totalAngle,Math.PI,1);if(this.axisType==wijmo_chart_1.AxisType.Y){m=a!=this.actualMin&&m&&a!=this.actualMax;var A=this.convert(a),P=h._convertPoint(A,x);if(m&&(t.stroke=v,t.strokeWidth=f,this._renderYGridLine(t,h,A,p)),t.stroke=y,t.strokeWidth=g,s){(_=(h.startAngle%360+360)%360)<=90&&_>=75||_>=270&&_<=285?w=2:(_>90&&_<=105||_<270&&_>=255)&&(w=0);var T=new wijmo_1.Point(P.x-c-Math.abs(o-l),P.y);this._axisLabels.push({val:a,text:r,pos:T,align:2,vAlign:w,labelAngle:i,class:u})}n!=wijmo_chart_1.TickMark.None&&t.drawLine(P.x-l*Math.cos(x),P.y-l*Math.sin(x),P.x-o*Math.cos(x),P.y-o*Math.sin(x),d)}else{var j=this.convert(a);if(m&&(t.stroke=v,t.strokeWidth=f,this._renderXGridLine(t,h,j,p)),t.stroke=y,t.strokeWidth=g,s){var b,C,L;T=h._convertPoint(h._radius+c,j);b=h._angles&&h._angles.length?h._angles[e].angle:h.startAngle+(a-this.actualMin)*h.totalAngle/(this.actualMax-this.actualMin),b=(b%=360)>=0?b:b+360,C=this._getXLabelVAlign(b),L=this._getXLabelAlign(b),h._isPolar&&(r=this._formatValue(b)),i>0?wijmo_chart_1.FlexChart._renderRotatedText(t,r,T,L,C,T,i,u):i<0?wijmo_chart_1.FlexChart._renderRotatedText(t,r,T,L,C,T,i,u):this._renderLabel(t,a,r,T,L,C,u)}n!=wijmo_chart_1.TickMark.None&&this._renderXTick(t,h,j,d,o,l)}return!0},e.prototype._renderXGridLine=function(t,e,a,r){var i=e._center,n=e._convertPoint(e._radius,a);t.drawLine(i.x,i.y,n.x,n.y,r)},e.prototype._renderXTick=function(t,e,a,r,i,n){var s,o;e._center;s=e._convertPoint(e._radius+i,a),o=e._convertPoint(e._radius+n,a),t.drawLine(s.x,s.y,o.x,o.y,r)},e.prototype._renderYGridLine=function(t,e,a,r){e._angles;var i=e._center,n=e.startAngle*Math.PI/180,s=e.totalAngle*Math.PI/180;e._isPolar?(n=(e.startAngle-90)*Math.PI/180,n=e.reversed?n-s:n,t.drawPieSegment(i.x,i.y,a,n,s,r)):this._renderPolygon(t,a,r)},e.prototype._getXLabelVAlign=function(t){var e=1,a=this._chart,r=a.startAngle;return a.reversed&&(t=(360+r+(r%360-t%360))%360),0===t?e=2:180===t&&(e=0),e},e.prototype._getXLabelAlign=function(t){var e=0,a=this._chart,r=a.startAngle;return a.reversed&&(t=(360+r+(r%360-t%360))%360),t>0&&t<180?e=-1:t>180&&t<360&&(e=1),e+1},e.prototype._createTimeLabels=function(e,a,r,i){var n=this;if(this._axisType==wijmo_chart_1.AxisType.Y)t.prototype._createTimeLabels.call(this,e,a,r,i);else{var s=this._values;this.format;if(!s||0===s.length)return;s.forEach(function(t){r.push(t),i.push(n._formatValue(t))})}},e.prototype._niceNumber=function(e,a,r){var i=this._chart,n=this.actualMax-this.actualMin,s=i.totalAngle;return s>360&&(s%=360),i._isPolar?s%8==0?n/8:s%6==0?n/6:s%4==0?n/4:s%3==0?n/3:s%2==0?n/2:t.prototype._niceNumber.call(this,e,a,r):t.prototype._niceNumber.call(this,e,a,r)},e}(wijmo_chart_1.Axis);exports.FlexRadarAxis=FlexRadarAxis,wijmo_1._registerModule("wijmo.chart.radar",selfModule);

6

package.json
{
"name": "@grapecity/wijmo.chart.radar",
"version": "5.20183.595-nightly.d20190405.t204051",
"version": "5.20183.595-nightly.d20190405.t210807",
"description": "UI library for pure JS, Angular, React, Vue and more...",

@@ -10,4 +10,4 @@ "author": "GrapeCity, Inc",

"dependencies": {
"@grapecity/wijmo": "5.20183.595-nightly.d20190405.t204051",
"@grapecity/wijmo.chart": "5.20183.595-nightly.d20190405.t204051"
"@grapecity/wijmo": "5.20183.595-nightly.d20190405.t210807",
"@grapecity/wijmo.chart": "5.20183.595-nightly.d20190405.t210807"
},

@@ -14,0 +14,0 @@ "module": "./es5-esm.js",

@@ -0,1 +1,13 @@

/*!
*
* Wijmo Library 5.20183.595-nightly.d20190405.t210807
* http://wijmo.com/
*
* Copyright(c) GrapeCity, Inc. All rights reserved.
*
* Licensed under the GrapeCity Commercial License.
* sales@wijmo.com
* wijmo.com/products/wijmo-5/license/
*
*/
/**

@@ -2,0 +14,0 @@ * {@module wijmo.chart.radar}