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