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