/*
    *
    * Wijmo Library 5.20183.550
    * 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=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])};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 wjcChart=require("wijmo/wijmo.chart"),wjcCore=require("wijmo/wijmo"),__glob="undefined"!=typeof window?window:self,wjcSelfRef=require("wijmo/wijmo.chart.radar"),wjcSelf=wjcSelfRef||exports;__glob.wijmo=__glob.wijmo||{},__glob.wijmo.chart=__glob.wijmo.chart||{},__glob.wijmo.chart.radar=wjcSelf;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=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(wjcChart.Position.Bottom),this.axisX.majorGrid=!0,this.axisY=new FlexRadarAxis(wjcChart.Position.Left),this.axisY.majorTickMarks=wjcChart.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 wjcCore.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=wjcCore.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=wjcCore.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=wjcCore.asNumber(t,!0),this._totalAngle<=0&&(wjcCore.assert(!1,"totalAngle must be greater than 0."),this._totalAngle=0),this._totalAngle>360&&(wjcCore.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=wjcCore.asBoolean(t,!0),this.invalidate())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"stacking",{get:function(){return this._stacking},set:function(t){(t=wjcCore.asEnum(t,wjcChart.Stacking))!=this._stacking&&(this._stacking=t,this.invalidate())},enumerable:!0,configurable:!0}),e.prototype._getChartType=function(){var t=wjcChart.ChartType.Line;switch(this.chartType){case RadarChartType.Area:t=wjcChart.ChartType.Area;break;case RadarChartType.Line:t=wjcChart.ChartType.Line;break;case RadarChartType.Column:t=wjcChart.ChartType.Column;break;case RadarChartType.LineSymbols:t=wjcChart.ChartType.LineSymbols;break;case RadarChartType.Scatter:t=wjcChart.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 wjcCore.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];if(this.bindingX){var i=r[this.bindingX];wjcCore.isNumber(i)?(this._xvals.push(wjcCore.asNumber(i)),this._xDataType=wjcCore.DataType.Number):wjcCore.isDate(i)&&(this._xDataType=wjcCore.DataType.Date),this._xlabels.push(r[this.bindingX])}}this._xvals.length==e?this._xlabels.splice(0):this._xvals.splice(0)}}this._xDataType===wjcCore.DataType.Number&&(this._isPolar=!0)},e.prototype._prepareRender=function(){t.prototype._prepareRender.call(this),this._areas=[]},e}(wjcChart.FlexChartCore);exports.FlexRadar=FlexRadar;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=wjcCore.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=wjcChart.ChartType.Area;break;case RadarChartType.Line:t=wjcChart.ChartType.Line;break;case RadarChartType.Column:t=wjcChart.ChartType.Column;break;case RadarChartType.LineSymbols:t=wjcChart.ChartType.LineSymbols;break;case RadarChartType.Scatter:t=wjcChart.ChartType.Scatter}return t},e}(wjcChart.SeriesBase);exports.FlexRadarSeries=FlexRadarSeries;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==wjcChart.AxisType.X?"wj-axis-x-labels "+wjcChart.FlexChart._CSS_AXIS_X:"wj-axis-y-labels "+wjcChart.FlexChart._CSS_AXIS_Y;e.startGroup(t),r.forEach(function(t){var r=t.labelAngle;r>0?wjcChart.FlexChart._renderRotatedText(e,t.text,t.pos,t.align,t.vAlign,t.pos,r,t.class):r<0?wjcChart.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==wjcChart.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,c=this.actualMin.valueOf?this.actualMin.valueOf():this.actualMin,_=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=c+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=wjcCore.asDate(t).valueOf();return s._formatValue(e)})))},e.prototype._updateActualLimitsByChartType=function(t,e,a){var r=this._chart;if(r._getChartType()!=wjcChart.ChartType.Column&&360===r.totalAngle&&this.axisType===wjcChart.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===wjcChart.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=wjcChart.FlexChart._CSS_LINE,r=(e.startAngle-90)*Math.PI/180,i=e.totalAngle*Math.PI/180,n=e._radius;this.axisType===wjcChart.AxisType.X&&this.axisLine&&(t.stroke=wjcChart.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=wjcChart.FlexChart._CSS_GRIDLINE_MINOR,l=this.minorGrid,h=s._angles,c=h.length,_=s.axisX.minorGrid,u=wjcChart.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==wjcChart.TickMark.Outside?d=1:g==wjcChart.TickMark.Inside?d=-1:g==wjcChart.TickMark.Cross?d=0:y=!1,this.axisType==wjcChart.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(_&&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[c-1].value-(h[c-2].value-h[c-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=wjcChart.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,c=this._chart,_=this.labelPadding||2,u=wjcChart.FlexChart._CSS_LABEL,p=wjcChart.FlexChart._CSS_GRIDLINE,d=wjcChart.FlexChart._CSS_TICK,g=wjcChart.FlexChart._FG,y=this._TICK_WIDTH,C=this.majorGrid,v=wjcChart.FlexChart._FG,f=this._GRIDLINE_WIDTH,x=c.startAngle*Math.PI/180,w=(c.totalAngle,Math.PI,1);if(this.axisType==wjcChart.AxisType.Y){C=a!=this.actualMin&&C&&a!=this.actualMax;var j=this.convert(a),m=c._convertPoint(j,x);if(C&&(t.stroke=v,t.strokeWidth=f,this._renderYGridLine(t,c,j,p)),t.stroke=g,t.strokeWidth=y,s){(h=(c.startAngle%360+360)%360)<=90&&h>=75||h>=270&&h<=285?w=2:(h>90&&h<=105||h<270&&h>=255)&&(w=0);L=new wjcCore.Point(m.x-_-Math.abs(o-l),m.y);this._axisLabels.push({val:a,text:r,pos:L,align:2,vAlign:w,labelAngle:i,class:u})}n!=wjcChart.TickMark.None&&t.drawLine(m.x-l*Math.cos(x),m.y-l*Math.sin(x),m.x-o*Math.cos(x),m.y-o*Math.sin(x),d)}else{var A=this.convert(a);if(C&&(t.stroke=v,t.strokeWidth=f,this._renderXGridLine(t,c,A,p)),t.stroke=g,t.strokeWidth=y,s){var P,T,b,L=c._convertPoint(c._radius+_,A);P=c._angles&&c._angles.length?c._angles[e].angle:c.startAngle+(a-this.actualMin)*c.totalAngle/(this.actualMax-this.actualMin),P=(P%=360)>=0?P:P+360,T=this._getXLabelVAlign(P),b=this._getXLabelAlign(P),c._isPolar&&(r=this._formatValue(P)),i>0?wjcChart.FlexChart._renderRotatedText(t,r,L,b,T,L,i,u):i<0?wjcChart.FlexChart._renderRotatedText(t,r,L,b,T,L,i,u):this._renderLabel(t,a,r,L,b,T,u)}n!=wjcChart.TickMark.None&&this._renderXTick(t,c,A,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==wjcChart.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}(wjcChart.Axis);exports.FlexRadarAxis=FlexRadarAxis;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=wjcCore.asType(r,wjcChart.SeriesBase),l=this.chart,h=o._getChartType()||l._getChartType(),c=l.series.indexOf(r),_=r.getValues(0),u=r.getValues(1);if(_){u||(u=this.dataInfo.getXVals());var p=wjcChart._BasePlotter.cloneStyle(r.style,["fill"]),d=_.length,g=!0;u?d=Math.min(d,u.length):(g=!1,u=new Array(d));var y=this._DEFAULT_WIDTH,C=o._getSymbolFill(c),v=o._getAltSymbolFill(c)||C,f=o._getSymbolStroke(c),x=o._getAltSymbolStroke(c)||f,w=o._getSymbolSize();t.stroke=f,t.strokeWidth=y,t.fill=C;var j=new Array,m=new Array,A=a.actualMax,P=this.stacking!=wjcChart.Stacking.None&&!o._isCustomAxisY(),T=this.stacking==wjcChart.Stacking.Stacked100pc&&!o._isCustomAxisY();void 0!==o._getChartType()&&(P=T=!1);for(var b=o.interpolateNulls,L=!1,M=0;M<d;M++){var S=g?u[M]:M,k=null==_[M]?0:_[M];if(wjcChart._DataInfo.isValid(S)&&wjcChart._DataInfo.isValid(k)){if(P)if(T&&(k/=this.dataInfo.getStackedAbsSum(S)),k>=0){R=isNaN(this.stackPos[S])?0:this.stackPos[S];k=this.stackPos[S]=R+k}else{var R=isNaN(this.stackNeg[S])?0:this.stackNeg[S];k=this.stackNeg[S]=R+k}k=Math.min(k,A);var I;I=new wjcChart._DataPoint(c,M,S,k);var N=e.convert(S),F=a.convert(k),X=this.chart._convertPoint(F,N);if(S=X.x,k=X.y,isNaN(S)||isNaN(k))L=!0,!0!==b&&(j.push(void 0),m.push(void 0));else{j.push(S),m.push(k);var D=new wjcChart._CircleArea(new wjcCore.Point(S,k),.5*w);D.tag=I,this.hitTester.add(D,c)}}else L=!0,!0!==b&&(j.push(void 0),m.push(void 0))}var O=0;if(this.hasLines)if(this.isArea?t.fill=C||i._getColorLight(c):t.fill="none",L&&!0!==b){for(var V=[],G=[],M=0;M<d;M++)void 0===j[M]?(V.push(void 0),G.push(0)):(V.push(j[M]),G.push(m[M]));V.length>1&&(l._isPolar&&h!==wjcChart.ChartType.Area?this._drawLines(t,V,G,null,p,this.chart._plotrectId):(l.totalAngle<360&&(V.push(l._center.x),G.push(l._center.y)),t.drawPolygon(V,G,null,p,this.chart._plotrectId)),this.hitTester.add(new wjcChart._LinesArea(V,G),c),O++)}else l._isPolar&&h!==wjcChart.ChartType.Area?this._drawLines(t,j,m,null,p,this.chart._plotrectId):(l.totalAngle<360&&(j.push(l._center.x),m.push(l._center.y)),t.drawPolygon(j,m,null,p,this.chart._plotrectId)),this.hitTester.add(new wjcChart._LinesArea(j,m),c),O++;t.fill=C;for(M=0;M<d;M++){var S=j[M],k=m[M];!1===this.hasLines&&(t.fill=_[M]>0?C:v,t.stroke=_[M]>0?f:x),this.isValid(S,k,e,a)&&((this.hasSymbols||this.chart.itemFormatter)&&w>0&&this._drawSymbol(t,S,k,w,o,M),r._setPointIndex(M,O),O++)}}},e}(wjcChart._LinePlotter);exports._RadarLinePlotter=_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 wjcCore.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=wjcCore.asType(r,wjcChart.SeriesBase),h=(this.chart.options,this.width),c=this.chart,_=-90*Math.PI/180;n=n||0;var u,p=l._getAxisY()._uniqueId,d=(this.stackNegMap[p],this.stackPosMap[p]),g=this.stacking!=wjcChart.Stacking.None,y=this.stacking==wjcChart.Stacking.Stacked100pc,C=r.getValues(0),v=r.getValues(1);if(C){v||(v=this.dataInfo.getXVals());var f;(f=v?c.totalAngle/v.length:c.totalAngle/(e.actualMax-e.actualMin))>0&&(h=g?f*h*Math.PI/180:f*Math.pow(h,n+1)*Math.PI/180);var x=l._getSymbolFill(o),w=l._getAltSymbolFill(o)||x,j=l._getSymbolStroke(o),m=l._getAltSymbolStroke(o)||j,A=C.length;null!=v&&(A=Math.min(A,v.length));var P,T,b=this.origin,L=0;void 0!==l._getChartType()&&(g=y=!1),b<a.actualMin?b=a.actualMin:b>a.actualMax&&(b=a.actualMax);a.convert(b);var M=e.actualMin,S=e.actualMax,k=a.actualMax;l._isCustomAxisY()&&(g=y=!1),c._areas[o]||(c._areas[o]=[]);for(var R=0;R<A;R++){var I=v?v[R]:R,N=null==C[R]?0:C[R];if(this._getSymbolOrigin&&a.convert(this._getSymbolOrigin(b,R,A)),this._getSymbolStyles){var F=this._getSymbolStyles(R,A);x=F&&F.fill?F.fill:x,w=F&&F.fill?F.fill:w,j=F&&F.stroke?F.stroke:j,m=F&&F.stroke?F.stroke:m}if(P=N>0?x:w,T=N>0?j:m,t.fill=P,t.stroke=T,wjcChart._DataInfo.isValid(I)&&wjcChart._DataInfo.isValid(N)){if(g){var X=I-.5*h,D=I+.5*h;if(X<M&&D<M||X>S&&D>S)continue;if(X=e.convert(X),D=e.convert(D),!wjcChart._DataInfo.isValid(X)||!wjcChart._DataInfo.isValid(D))continue;var O,V;y&&(N/=this.dataInfo.getStackedAbsSum(I));var G=isNaN(d[I])?0:d[I];O=G,V=G+N,d[I]=G+N;var Y=e.convert(I),E=a.convert(O),B=a.convert(V);Y-=h/2,t.drawDonutSegment(c._center.x,c._center.y,B,E,Y+_,h,null,l.symbolStyle),(u=new wjcChart._DonutSegment(new wjcCore.Point(c._center.x,c._center.y),B,E,Y+_,h,c.startAngle||0)).tag=new wjcChart._DataPoint(o,R,I,G+N),this.hitTester.add(u,o)}else{var Y=e.convert(I),W=a.convert(Math.min(N,k));c._convertPoint(W,Y);Y-=h/2,t.drawPieSegment(c._center.x,c._center.y,W,Y+_,h,null,l.symbolStyle),(u=new wjcChart._PieSegment(new wjcCore.Point(c._center.x,c._center.y),W,Y+_,h,c.startAngle)).tag=new wjcChart._DataPoint(o,R,I,N),this.hitTester.add(u,o)}c._areas[o].push(u),r._setPointIndex(R,L),L++}}}},e}(wjcChart._BarPlotter);exports._RadarBarPlotter=_RadarBarPlotter;