/*!@license * Infragistics.Web.ClientUI infragistics.datachart_verticalcategory.js 19.1.20191.172 * * Copyright (c) 2011-2019 Infragistics Inc. * * http://www.infragistics.com/ * * Depends: * jquery-1.4.4.js * jquery.ui.core.js * jquery.ui.widget.js * infragistics.util.js * infragistics.ext_core.js * infragistics.ext_collections.js * infragistics.dv_core.js * infragistics.dv_geometry.js * infragistics.datachart_category.js * infragistics.datachart_categorycore.js * infragistics.datachart_core.js * infragistics.ext_ui.js */ (function(factory){if(typeof define==="function"&&define.amd){define(["./infragistics.util","./infragistics.ext_core","./infragistics.ext_collections","./infragistics.dv_core","./infragistics.dv_geometry","./infragistics.datachart_category","./infragistics.datachart_categorycore","./infragistics.datachart_core","./infragistics.ext_ui"],factory)}else{factory(igRoot)}})(function($){$.ig=$.ig||{};var $$t={};$.ig.globalDefs=$.ig.globalDefs||{};$.ig.globalDefs.$$i=$$t;$$0=$.ig.globalDefs.$$0;$$4=$.ig.globalDefs.$$4;$$1=$.ig.globalDefs.$$1;$$w=$.ig.globalDefs.$$w;$$r=$.ig.globalDefs.$$r;$$f=$.ig.globalDefs.$$f;$$g=$.ig.globalDefs.$$g;$$j=$.ig.globalDefs.$$j;$$6=$.ig.globalDefs.$$6;$$a=$.ig.globalDefs.$$a;$.ig.$currDefinitions=$$t;$.ig.util.bulkDefine(["CategoryYAxis:a","BarSeries:e","BarBucketCalculator:f","IBarSeries:g","CategoryYAxisView:i","BarSeriesView:j"]);var $a=$.ig.intDivide,$b=$.ig.util.cast,$c=$.ig.util.defType,$d=$.ig.util.defEnum,$e=$.ig.util.getBoxIfEnum,$f=$.ig.util.getDefaultValue,$g=$.ig.util.getEnumValue,$h=$.ig.util.getValue,$i=$.ig.util.intSToU,$j=$.ig.util.nullableEquals,$k=$.ig.util.nullableIsNull,$l=$.ig.util.nullableNotEquals,$m=$.ig.util.toNullable,$n=$.ig.util.toString$1,$o=$.ig.util.u32BitwiseAnd,$p=$.ig.util.u32BitwiseOr,$q=$.ig.util.u32BitwiseXor,$r=$.ig.util.u32LS,$s=$.ig.util.unwrapNullable,$t=$.ig.util.wrapNullable,$u=String.fromCharCode,$v=$.ig.util.castObjTo$t,$w=$.ig.util.compareSimple,$x=$.ig.util.tryParseNumber,$y=$.ig.util.tryParseNumber1,$z=$.ig.util.numberToString,$0=$.ig.util.numberToString1,$1=$.ig.util.parseNumber;$c("CategoryYAxis:a","CategoryAxisBase",{a1:function(){return new $$t.i(this)},gm:function(a){$.ig.CategoryAxisBase.prototype.gm.call(this,a);this._kq=a},_kq:null,isVertical:function(){return true},ds:function(){return this.iu().height()},getCategoryBoundingBox:function(a,b,c){return this.getCategoryBoundingBoxHelper(a,b,c,true)},kp:function(a){if($b($$4.$x.$type.specialize(Array),a)!==null){return a.asArray()}return null},getScaledBucketValueList:function(a,b,c,d,e){var f;var g=e.e;var h=e.d;var i=e.c;var j=e.a;var k=!i.isEmpty();var l=this.categoryMode()==0?this.jr-1:this.jr;if(l<0){l=0}var m=i.top();var n=i.height();var o=g.top();var p=g.height();var q=h.top();var r=h.height();var s=0;var t=1;var u=this.kp(a);var v=false;if(u!=null){v=true}var w;for(var x=0;x=1?f[w]/l:l==0?.5:NaN;if(!j){z=1-z}z=m+n*(z-s)/t;var aa=(z-o*r)/p;f[w]=aa}else{var ab=l>=1?f[w]/l:l==0?.5:NaN;if(!j){ab=1-ab}ab=q+r*(ab-o)/p;f[w]=ab}}}},init:function(){this.kz=1;this.ky=1;$.ig.CategoryAxisBase.prototype.init.call(this);this._jf=new $$4.x(Number,0);this._ab=$$t.$a.$type},interval:function(a){if(arguments.length===1){this.h($$t.$a.intervalProperty,a);return a}else{return this.c($$t.$a.intervalProperty)}},kr:0,actualInterval:function(a){if(arguments.length===1){if(this.actualInterval()!=a){var b=this.kr;this.kr=a;this.gu("ActualInterval",b,this.actualInterval())}return a}else{return this.kr}},d4:function(){return this.actualInterval()},minorInterval:function(a){if(arguments.length===1){this.h($$t.$a.minorIntervalProperty,a);return a}else{return this.c($$t.$a.minorIntervalProperty)}},kt:0,actualMinorInterval:function(a){if(arguments.length===1){if(this.actualMinorInterval()!=a){var b=this.kt;this.kt=a;this.gu("ActualMinorInterval",b,this.actualMinorInterval())}return a}else{return this.kt}},kz:0,k1:function(a){if(arguments.length===1){this.kz=a;return a}else{return this.kz}},ky:0,k0:function(a){if(arguments.length===1){this.ky=a;return a}else{return this.ky}},getScaledValue:function(a,b){if(!b.c.isEmpty()){var c=this.kv(a,$.ig.NumericScaler.prototype.ac,b.c);c=(c-b.d.top())/b.d.height();c=b.d.top()+b.d.height()*(c-b.e.top())/b.e.height();return c}return this.kv(a,b.e,b.d)},kv:function(a,b,c){var d=this.categoryMode()==0?this.jr-1:this.jr;if(d<0){d=0}var e=d>=1?a/d:d==0?.5:NaN;if(!this._b9){e=1-e}return c.top()+c.height()*(e-b.top())/b.height()},getUnscaledValue:function(a,b){if(!b.c.isEmpty()){var c=b.e.top()+b.e.height()*(a-b.d.top())/b.d.height();c=c*b.d.height()+b.d.top();c=this.getUnscaledValue3(c,$.ig.NumericScaler.prototype.ac,b.c,this.categoryMode());return c}return this.getUnscaledValue3(a,b.e,b.d,this.categoryMode())},dx:function(a,b,c){if(!b.c.isEmpty()){var d=b.e.top()+b.e.height()*(a-b.d.top())/b.d.height();d=d*b.d.height()+b.d.top();d=this.getUnscaledValue3(d,$.ig.NumericScaler.prototype.ac,b.c,c);return d}return this.getUnscaledValue3(a,b.e,b.d,c)},getUnscaledValue3:function(a,b,c,d){var e=b.top()+(a-c.top())*b.height()/c.height();if(!this._b9){e=1-e}var f=d==0?this.jr-1:this.jr;if(f<0){f=0}return e*f},scrollRangeIntoView:function(a,b){if(a==NaN||b==NaN||this.i8()==null||this.i8().count()==0){return}var c=a/this.i8().count();var d=b/this.i8().count();this.seriesViewer().windowRect(new $$a.ae(0,this.seriesViewer().windowRect().x(),1-d,this.seriesViewer().windowRect().width(),d-c))},as:function(){return new $.ig.VerticalAxisLabelPanel},dg:function(){return this.interval()},getCategorySize:function(a,b,c){var d=this.is(b,c);return d.height()/(this.jr*a.height())},jk:function(a,b,c){var d=0;if(!$.ig.util.isNaN(this.gap())){d=$.ig.MathUtil.prototype.b(this.gap(),0,1)}var e=0;if(!$.ig.util.isNaN(this.overlap())){e=Math.min(this.overlap(),1)}var f=1-.5*d;var g=this.getCategorySize(a,b,c)*f/(this.ju()-(this.ju()-1)*e);return g},getGroupCenter:function(a,b,c,d){var e=.5;if(this.ju()>1){var f=0;if(!$.ig.util.isNaN(this.gap())){f=$.ig.MathUtil.prototype.b(this.gap(),0,1)}var g=0;if(!$.ig.util.isNaN(this.overlap())){g=Math.min(this.overlap(),1)}var h=1-.5*f;var i=h/(this.ju()-(this.ju()-1)*g);var j=(h-i)/(this.ju()-1);e=.25*f+.5*i+a*j}return this.getCategorySize(b,c,d)*e},scrollIntoView:function(a){var b=this.seriesViewer()!=null?this.seriesViewer().actualWindowRect():$$a.$ae.empty();b=b.copy();var c=this.iu();var d=new $$a.ae(0,0,0,1,1);var e=this.ir();var f=new $.ig.ScalerParams(0,d,d,this.isInverted(),e);var g=!b.isEmpty()&&!c.isEmpty()&&this.i8()!=null?this.i8().indexOf(a):-1;var h=g>-1?this.getScaledValue(g,f):NaN;if(!$.ig.util.isNaN(h)&&this.seriesViewer().c0()){if(!$.ig.util.isNaN(h)){if(hb.bottom()-.1*b.height()){h=h-.4*b.height();b.y(h-.5*b.height())}}this.seriesViewer().km(b,false,true)}},cm:function(){if(this.cf()&&this.useEnhancedIntervalManagement()){this._a9=this.a8()}if(this.i8()==null){return false}var a=this.i8().count();if(a!=this.k0()){var b=new $.ig.AxisRangeChangedEventArgs(0,1,1,this.k0(),a);this.k0(a);this.gv(b);return true}return false},jb:function(a){if(a==null){return false}var b=this.bb();if(b==null){return false}return b.synchronizeVertically()},g1:function(a){$.ig.CategoryAxisBase.prototype.g1.call(this,a);var b=this.seriesViewer()!=null?this.seriesViewer().actualWindowRect():$$a.$ae.empty();var c=this.iu();var d=this.ip();var e=this.io();var f=new $.ig.ScalerParams(0,b,c,this.isInverted(),d);var g=this._a2.ax();var h=this._a2.a0();var i=this._a2.ay();var j=this._a2.az();var k=this._a2.e();var l=this._a2.f();var m=this._a2.g();this.g8();this.gc(g);this.gc(h);this.gc(i);this.gc(j);this._cs.clear();this._ct.clear();this._jf.clear();this._a2.as(this,b,c);if(b.isEmpty()||c.isEmpty()){this._bo.count(0);this._bn.count(0);this._bm.count(0)}if(this._bo.count()==0&&this._bn.count()==0){this._a2.x()}if(this.labelSettings()!=null){this.labelSettings().registerAxis(this)}if(this.itemsSource()==null||this.i8()==null||this.i8().count()==0){this._bo.count(0);this._bn.count(0);this._bm.count(0);this._a2.x();return}if(!b.isEmpty()&&!c.isEmpty()){var n=this.getUnscaledValue(e.top(),f);var o=this.getUnscaledValue(e.bottom(),f);if(!this.isInverted()){n=Math.ceil(n);o=Math.floor(o)}else{n=Math.floor(n);o=Math.ceil(o)}var p=c.left();var q=0;if(this.crossingAxis()!=null){var r=$b($.ig.NumericXAxis.prototype.$type,this.crossingAxis());if(r!=null){var s=this.g4(p,q,b,c,d,c.left(),c.right());p=s.p0;q=s.p1}}this.g9(g,p,c,k,true);this._a2.an(q);var t=Math.min(n,o);var u=Math.max(n,o);var v=new $.ig.LinearCategorySnapper(1,t,u,e.height(),this.interval(),this.categoryMode(),this.d6());var w=Math.floor((t-0)/v._g);var x=Math.ceil((u-0)/v._g);if(!$.ig.util.isNaN(w)&&!$.ig.util.isNaN(x)){var y=$.ig.truncate(w);var z=$.ig.truncate(x);var aa=this.getScaledValue(0+y*v._g,f);var ab=Math.abs(this.getScaledValue(v._g,f)-this.getScaledValue(0,f));this._at._bn=this.getScaledValue(v._g,f);for(var ac=y;ac<=z;++ac){var ad=this.getScaledValue(0+(ac+1)*v._g,f);if(aa<=e.bottom()){if(ac%2==0){this.gl(h,aa,ad,c)}this.gk(i,aa,c,l,false);this._jf.add(aa)}if(this.categoryMode()!=0&&this.ju()!=0&&this._ci){if(this.minorInterval()>0&&this.minorInterval()ad){af-=ae;if(Math.abs(af-ad)<1e-4){break}this.gk(j,af,c,m,false)}}else{var ag=aa;while(ag+ae=e.top()){var an=0;if(v._g>=1){an=ac*$.ig.truncate(Math.floor(v._g))}else{if(ac*v._g*2%2==0){an=$.ig.truncate(Math.floor(ac*v._g))}else{an=-1}}if(this.i8()!=null&&an=0){var ao=this.i8().item(an);var ap=this.e1(ao);if(!$.ig.util.isNaN(al)&&!Number.isInfinity(al)&&ap!=null){if(typeof ap==="string"&&ap.equals("")){}else{this._cs.add1(ap);this._ct.add(new $.ig.LabelPosition(al))}}}}aa=ad}}this.actualInterval(v._g);if((this.labelSettings()==null||this.labelSettings().visibility()==0)&&this.crossingAxis()!=null){if(this.labelSettings()!=null&&(this.labelSettings().location()==6||this.labelSettings().location()==7)){this.seriesViewer().ht()}}this._a2.at(this._cs,this._ct);this.kf()}},az:function(){return 1},$type:new $.ig.Type("CategoryYAxis",$.ig.CategoryAxisBase.prototype.$type)},true);$c("BarFramePreparer:b","CategoryFramePreparer",{init:function(a,b){if(a>0){switch(a){case 1:this.init1.apply(this,arguments);break}return}$$t.$b.init1.call(this,1,b,$b($.ig.ISupportsMarkers.prototype.$type,b),$b($.ig.IProvidesViewport.prototype.$type,b),$b($.ig.ISupportsErrorBars.prototype.$type,b),$b($.ig.IBucketizer.prototype.$type,b))},init1:function(a,b,c,d,e,f){$.ig.CategoryFramePreparer.prototype.init1.call(this,1,b,c,d,e,f);this._aa=new $.ig.DefaultCategoryTrendlineHost;if($b($.ig.IHasCategoryTrendline.prototype.$type,b)!==null){this._aa=$b($.ig.IHasCategoryTrendline.prototype.$type,b)}this._ab=new $.ig.DefaultSingleValueProvider;if($b($.ig.IHasSingleValueCategory.prototype.$type,b)!==null){this._ab=$b($.ig.IHasSingleValueCategory.prototype.$type,b)}},l:function(a,b,c,d,e,f){var g=b[1];var h=b[0];var i=new $$a.ae(0,g-5,h-5,11,11);if(!$.ig.util.isNaN(g)&&!$.ig.util.isNaN(h)&&!Number.isInfinity(g)&&!Number.isInfinity(h)&&c.tryAdd(i)){a.m.add({__x:g,__y:h,$type:$$a.$y.$type,getType:$.ig.$op.getType,getGetHashCode:$.ig.$op.getGetHashCode,typeName:$.ig.$op.typeName});this._c.updateMarkerTemplate(e,d,f);return true}return false},w:function(a,b,c){if(this._aa.trendLineType()==0||this._aa.trendlinePreparer()==null||this._aa.trendLinePeriod()<1){return}var d=a._k;var e=new $.ig.ScalerParams(0,a._m,a._l,a._b.isInverted(),d);var f=new $.ig.ScalerParams(0,a._m,a._l,a._c.isInverted(),d);var g=b._f;if(a._d!=null&&a._d.sortedIndices()!=null){g=new $.ig.SafeSortedReadOnlyDoubleCollection(0,g,a._d.sortedIndices())}var h=function(){var $ret=new $.ig.TrendResolutionParams;$ret._c=a._h;$ret._d=a._i;$ret._e=a._j;$ret._a=c;$ret._b=a._g;$ret._f=a._l;return $ret}();if(this._aa.trendLineType()!=0){this._aa.trendlinePreparer().prepareLineCore(a._a.p,this._aa.trendLineType(),g,this._aa.trendLinePeriod(),function(i){return a._c.getScaledValue(i,f)},function(i){return a._b.getScaledValue(i,e)},h)}},$type:new $.ig.Type("BarFramePreparer",$.ig.CategoryFramePreparer.prototype.$type)},true);$c("BarTrendFitCalculator:c","Object",{init:function(){$.ig.$op.init.call(this)},a:function(a,b,c,d,e,f,g,h,i,j,k){if(d==null){switch(b){case 1:d=$.ig.LeastSquaresFit.prototype.k(e,g,f);break;case 2:d=$.ig.LeastSquaresFit.prototype.o(e,g,f);break;case 3:d=$.ig.LeastSquaresFit.prototype.i(e,g,f);break;case 4:d=$.ig.LeastSquaresFit.prototype.p(e,g,f);break;case 5:d=$.ig.LeastSquaresFit.prototype.q(e,g,f);break;case 7:d=$.ig.LeastSquaresFit.prototype.j(e,g,f);break;case 6:d=$.ig.LeastSquaresFit.prototype.l(e,g,f);break;case 8:d=$.ig.LeastSquaresFit.prototype.n(e,g,f);break;default:throw new $$6.q(0)}}if(d==null){return null}for(var l=0;l=0&&l=0&&this.bz()!=null&&bthis.mz.f.count()-1){k=this.mz.f.count()-1}if(l<0){l=0}if(l>this.mz.f.count()-1){l=this.mz.f.count()-1}var m=this.mz.f.__inner[k];var n=this.mz.f.__inner[l];var o=Math.abs(f.__y-m[0]);var p=Math.abs(f.__y-n[0]);var q=this.oz(this._m7);var r=this.yAxis().jk(b,c,d);if(ob.right()-.1*b.width()){k=k-.4*b.width();b.x(k-.5*b.width())}}if(!$.ig.util.isNaN(i)){if(ib.bottom()-.1*b.height()){i=i-.4*b.height();b.y(i-.5*b.height())}}if(this.syncLink()!=null){this.syncLink().ap(this.seriesViewer(),b,true)}return e>=0},getItemSpan:function(){return this.yAxis().jk(this.view().bs(),this.view().br(),this.getEffectiveViewport1(this.view()))},og:function(a,b){$$t.$h.og.call(this,a,b);var c=a.f;if(!b.l()){return}var d=b.bs();var e=b.br();var f=this.getEffectiveViewport1(b);var g=new $.ig.ScalerParams(0,d,e,this.xAxis().isInverted(),f);var h=this.yAxis();var i=new $.ig.ScalerParams(0,d,e,this.yAxis().isInverted(),f);var j=this.xAxis();var k=j.getScaledValue(j.referenceValue(),g);var l=this.yAxis().jk(d,e,f);var m=$b($$t.$j.$type,b);if($.ig.util.isNaN(l)||Number.isInfinity(l)||$.ig.util.isNaN(k)){m._c7.count(0);return}this.m6.x(this,this.nr(),this.yAxis(),this.getCategoryItems.runOn(this),this.nz(b),this.n0(b));this.m6.p=this.radiusX();this.m6.q=this.radiusY();this.m6.j=this.radiusX();this.m6.k=this.radiusY();var n=false;var o=this.m6._c;if(o!=null){n=true}var p=this.xAxis().isSorting();var q=this.valueColumn().count();for(var r=0;r0){this.renderSeries(true)}break;case 3:if(d==this.valueMemberPath()){if(this.xAxis()!=null&&!this.xAxis().updateRange()){this.renderSeries(true)}}break}},is:function(a,b,c,d){$$t.$h.is.call(this,a,b,c,d);switch(b){case"XAxis":if(c!=null){c.deregisterSeries(this)}if(d!=null){d.registerSeries(this)}this._oq._cn.g(this.resolution());if(this.xAxis()!=null&&this.xAxis().updateRange()){this.renderSeries(false)}break;case"YAxis":if(c!=null){c.deregisterSeries(this)}if(d!=null){d.registerSeries(this)}if(this._oq.cz()){this._oq.cy($.ig.CategoryTrendLineManagerFactory.prototype.a(this._oq.cy(),this.yAxis(),this.rootCanvas(),this,this.b2()))}this._oq._cn.g(this.resolution());this.renderSeries(false);break;case"FastItemsSource":if(this.xAxis()!=null&&!this.xAxis().updateRange()){this._oq._cn.g(this.resolution());this.renderSeries(false)}break;case"ValueColumn":if(this.xAxis()!=null&&!this.xAxis().updateRange()){this._oq._cn.g(this.resolution());this.renderSeries(false)}break;case"SeriesViewer":if(c!=null&&d==null){this.ht(this.xAxis());this.ht(this.yAxis())}if(c==null&&d!=null){this.ix(this.xAxis());this.ix(this.yAxis())}this._oq._cn.g(this.resolution());this.renderSeries(false);break}},getPreferredCategoryMode:function(){return this.preferredCategoryMode(this.yAxis())},currentCategoryMode:function(){return this.preferredCategoryMode(this.yAxis())},scaler:function(){return this.yAxis()},yScaler:function(){return this.xAxis()},$type:new $.ig.Type("BarSeries",$$t.$h.$type,[$.ig.IIsCategoryBased.prototype.$type,$$t.$g.$type])},true);$c("BarBucketCalculator:f","CategoryBucketCalculator",{init:function(a){$.ig.CategoryBucketCalculator.prototype.init.call(this,a);this._i=a},_i:null,g:function(a){var b=this._c.bs();var c=this._c.br();var d=this._c._cp.bz();if(b.isEmpty()||c.isEmpty()||this._i._c6.yAxis()==null||d==null||d.count()==0){this.d=0;return}var e=$b($$t.$e.$type,this._c._cp);var f=e.li(this._c);var g=e.getEffectiveViewport1(this._c);var h=new $.ig.ScalerParams(0,b,c,e.yAxis().isInverted(),g);var i=Math.floor(e.yAxis().dx(f.top(),h,0));var j=Math.ceil(e.yAxis().dx(f.bottom(),h,0));if(!e.yAxis().isInverted()){j=Math.ceil(e.yAxis().dx(f.top(),h,0));i=Math.floor(e.yAxis().dx(f.bottom(),h,0))}var k=Math.floor((j-i+1)*a/f.height());this.d=$.ig.truncate(Math.max(1,k));this.e=$.ig.truncate(Math.max(0,Math.floor(i/this.d)-1));this.f=$.ig.truncate(Math.ceil(j/this.d))},getBucketWithoutUnknowns:function(a){var b=this.h;var c=this.j;var d=a*this.d;var e=d+this.d-1;var f=c-1;d=dk?h:k;Math.max(h,k);i=false}if(!i){return[.5*(d+e),g,h]}return[.5*(d+e),NaN,NaN]},getBucket:function(a){var b=this.h;var c=this.j;var d=a*this.d;var e=d+this.d-1;var f=c-1;d=dg._o){return-1}else if(f._o