21 lines
51 KiB
JavaScript
21 lines
51 KiB
JavaScript
/*!@license
|
|
* Infragistics.Web.ClientUI infragistics.datachart_interactivity.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_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_core","./infragistics.ext_ui"],factory)}else{factory(igRoot)}})(function($){$.ig=$.ig||{};var $$t={};$.ig.globalDefs=$.ig.globalDefs||{};$.ig.globalDefs.$$am=$$t;$$0=$.ig.globalDefs.$$0;$$4=$.ig.globalDefs.$$4;$$1=$.ig.globalDefs.$$1;$$w=$.ig.globalDefs.$$w;$$r=$.ig.globalDefs.$$r;$$j=$.ig.globalDefs.$$j;$$6=$.ig.globalDefs.$$6;$$a=$.ig.globalDefs.$$a;$.ig.$currDefinitions=$$t;$.ig.util.bulkDefine([]);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,$2=$.ig.util.compare,$3=$.ig.util.replace,$4=$.ig.util.stringFormat,$5=$.ig.util.stringFormat1,$6=$.ig.util.stringFormat2,$7=$.ig.util.stringCompare1,$8=$.ig.util.stringCompare2,$9=$.ig.util.stringCompare3;$c("HighlightingManager:a","Object",{init:function(){this.a=new $$4.h($.ig.HighlightingInfo.prototype.$type,$.ig.HighlightingInfo.prototype.$type,0);this.c=new $$4.x($.ig.HighlightingInfo.prototype.$type,0);this.d=0;this.e=0;this.f=0;this.b=new $$4.h($.ig.Series.prototype.$type,$$0.$aq.$type,0);$.ig.$op.init.call(this);this.dirtySeries(new $$4.x($.ig.Series.prototype.$type,0))},a:null,c:null,startHighlight:function(a){if(a==null){return}this.inProgress(true);if(!this.a.containsKey(a)){a.state($.ig.HighlightingState.prototype.inward);this.a.item(a,a);this.c.add(a)}if(a.state()==$.ig.HighlightingState.prototype.outward){a.state($.ig.HighlightingState.prototype.inward)}},d:0,e:0,endHighlight:function(a){if(a==null){return}if(!this.a.containsKey(a)){return}if(a.state()==$.ig.HighlightingState.prototype.inward){if(a.progress()<.05){if(a.isMarker()){this.e=this.e+a.progress()}else{this.d=this.d+a.progress()}this.a.remove(a);this.c.remove(a);return}a.state($.ig.HighlightingState.prototype.outward)}if(a.state()==2){a.state($.ig.HighlightingState.prototype.outward);a.progress(1)}},clear:function(){this.c.clear();this.a.clear()},getHighlightingInfo:function(a,b,c,d,e,f){for(var g=0;g<this.c.count();g++){var h=this.c.__inner[g];var i=h.startIndex();var j=h.endIndex();if(d>=i&&e<=j&&h.isMarker()==f&&a==h.series()&&(h.state()==$.ig.HighlightingState.prototype.inward||h.state()==2)){return h}}for(var k=0;k<this.c.count();k++){var l=this.c.__inner[k];var m=l.startIndex();var n=l.endIndex();if(d>=m&&e<=n&&l.isMarker()==f&&a==l.series()&&l.state()==$.ig.HighlightingState.prototype.outward){return l}}return null},f:0,_dirtySeries:null,dirtySeries:function(a){if(arguments.length===1){this._dirtySeries=a;return a}else{return this._dirtySeries}},b:null,tick:function(a){this.b.clear();this.dirtySeries().clear();var b=0;if(this.f>a){b=1-this.f+a}else{b=a-this.f}this.f=a;var c=false;var d=new $$4.x($.ig.HighlightingInfo.prototype.$type,0);this.maxHighlightingProgress(0);this.sumHighlightingProgress(0);this.maxMarkerHighlightingProgress(0);this.sumMarkerHighlightingProgress(0);var e=false;var f=false;var g=0;var h=0;var i=0;var j=0;var k=0;var l=0;for(var m=0;m<this.c.count();m++){var n=this.c.__inner[m];if(n.state()==$.ig.HighlightingState.prototype.inward){if(n.isMarker()){e=true;i=i+Math.min(1-n.progress(),b)}else{f=true;g=g+Math.min(1-n.progress(),b)}}if(n.state()==$.ig.HighlightingState.prototype.outward){if(n.isMarker()){j=j+Math.min(n.progress(),b);l++}else{h=h+Math.min(n.progress(),b);k++}}}h=h+this.d;this.d=0;j=j+this.e;this.e=0;var o=1;var p=1;if(f&&h>g){var q=h-g;o=g/h}if(e&&j>i){var r=j-i;p=i/j}var s;for(var t=0;t<this.c.count();t++){var u=this.c.__inner[t];s=b;if(u.state()==$.ig.HighlightingState.prototype.outward){s=Math.min(s,u.progress());if(u.isMarker()){s=s*p}else{s=s*o}u.progress(u.progress()-s)}else{u.progress(u.progress()+s)}if(u.state()==2){u.progress(1)}if(u.progress()>1){u.progress(1)}if(u.progress()<0){u.progress(0)}if(u.isMarker()){this.maxMarkerHighlightingProgress(Math.max(u.progress(),this.maxMarkerHighlightingProgress()));this.sumMarkerHighlightingProgress(this.sumMarkerHighlightingProgress()+u.progress())}else{this.maxHighlightingProgress(Math.max(u.progress(),this.maxHighlightingProgress()));this.sumHighlightingProgress(this.sumHighlightingProgress()+u.progress())}if(u.state()!=$.ig.HighlightingState.prototype.outward&&u.progress()!=1){c=true}if(u.state()==$.ig.HighlightingState.prototype.outward&&u.progress()!=0){c=true}if(u.progress()==1&&u.state()==$.ig.HighlightingState.prototype.inward){u.state(2)}if(u.progress()==0&&u.state()==$.ig.HighlightingState.prototype.outward){d.add(u)}if(!this.b.containsKey(u.series())){this.b.add(u.series(),true);this.dirtySeries().add(u.series())}}var w=d.getEnumerator();while(w.moveNext()){var v=w.current();this.a.remove(v);this.c.remove(v)}if(this.a.count()==0){this.inProgress(false);this.maxHighlightingProgress(0);this.sumHighlightingProgress(0);this.maxMarkerHighlightingProgress(0);this.sumMarkerHighlightingProgress(0)}if(!c){this.f=0}return c},_inProgress:false,inProgress:function(a){if(arguments.length===1){this._inProgress=a;return a}else{return this._inProgress}},_maxHighlightingProgress:0,maxHighlightingProgress:function(a){if(arguments.length===1){this._maxHighlightingProgress=a;return a}else{return this._maxHighlightingProgress}},_sumHighlightingProgress:0,sumHighlightingProgress:function(a){if(arguments.length===1){this._sumHighlightingProgress=a;return a}else{return this._sumHighlightingProgress}},_maxMarkerHighlightingProgress:0,maxMarkerHighlightingProgress:function(a){if(arguments.length===1){this._maxMarkerHighlightingProgress=a;return a}else{return this._maxMarkerHighlightingProgress}},_sumMarkerHighlightingProgress:0,sumMarkerHighlightingProgress:function(a){if(arguments.length===1){this._sumMarkerHighlightingProgress=a;return a}else{return this._sumMarkerHighlightingProgress}},$type:new $.ig.Type("HighlightingManager",$.ig.$ot,[$.ig.IHighlightingManager.prototype.$type])},true);$c("SeriesViewerInteractionManager:b","Object",{init:function(){this.h=false;this.e=null;this.g=false;$.ig.$op.init.call(this);this._ah=$$a.$ae.empty();this._ag=$$a.$ae.empty()},highlightingManager:function(){if(this.b==null){this.b=new $$t.a}return this.b},getResolvedHitTestmode:function(a){if(a.contentHitTestMode()!=0){return a.contentHitTestMode()}var b=1;var c=false;var d=false;for(var e=0;e<a.series().count();e++){var f=a.series().__inner[e];if(f.isStacked()){f.h1(function(g){if(g.actualHitTestMode()==2){c=true}if(g.actualHitTestMode()==1){d=true}return true})}else{if(f.actualHitTestMode()==2){c=true}if(f.actualHitTestMode()==1){d=true}}}if(d){b=1}if(c){b=2}if(c&&d){b=3}return b},renderCrosshairs:function(a){var b=a.crosshairPoint();var c=b;var d=a._bn;var e=a.cc();var f=a.ce();var g=a.da();var h=a.df();if(!e){c={__x:NaN,__y:NaN,$type:$$a.$y.$type,getType:$.ig.$op.getType,getGetHashCode:$.ig.$op.getGetHashCode,typeName:$.ig.$op.typeName}}for(var i=0;i<a.series().count();i++){var j=a.series().__inner[i];j.moveCursorPoint(c)}var k=a.bg()==0&&!a._cq&&(a._ch||f)&&!g&&!h;var l=a.viewportRect();if(k&&!$.ig.util.isNaN(b.__x)&&!l.isEmpty()){var m=l.width()*(b.__x-a.actualWindowRect().left())/a.actualWindowRect().width();d.ee(l.left()+m,l.top(),l.left()+m,l.bottom());d.d3();d.d8(m)}else{d.ce()}if(k&&!$.ig.util.isNaN(b.__y)&&!l.isEmpty()){var n=l.height()*(b.__y-a.actualWindowRect().top())/a.actualWindowRect().height();d.d7(l.left(),l.top()+n,l.right(),l.top()+n);d.dz()}else{d.b9()}},onStateChanged:function(a){switch(a.bg()){case 0:a._bn.dv();this.renderCrosshairs(a);a._bn.b6();break;case 1:a._bn.dx();a._bn.cd();this.renderCrosshairs(a);a._bn.b5();break;case 2:a._bn.dx();a._bn.cd();this.renderCrosshairs(a);a._bn.b7();break}},onDragDelta:function(a,b){if(b.__x>=0&&b.__y>=0&&b.__x<=a.viewportRect().width()&&b.__y<=a.viewportRect().height()){this.ab(a,b)}else{a.hn()}},ab:function(a,b){var c=a._bn;var d=a.viewportRect();if(a._cr||a._cq){return}if(a.ce()&&a._ch){var e=d.height()>d.width();c.bs(e);var g=a.series().getEnumerator();while(g.moveNext()){var f=g.current();if(f.isStacked()){f.h1(function(h){if(h.__visibility==0){h.jb(b,c.addToInfoBox.runOn(c))}return true})}else{if(f.__visibility==0){f.jb(b,c.addToInfoBox.runOn(c))}}}c.d0()}},aa:function(a,b){if(a._ch||a._co){a.ce(true);a.i5();this._ag=new $$a.ae(0,b.__x,b.__y,0,0);this._ai=new $$a.ae(0,b.__x,b.__y,0,0);a.bg(0);a.hf(a.mk(b))}},onPlotAreaHold:function(a,b){this.aa(a,b);this.ab(a,b);this.renderCrosshairs(a)},onDragStarted:function(a,b,c){if(!a.ce()){this.ad(a,b,c)}},onDragCompleted:function(a,b){this._ah=$$a.$ae.empty();a.hn()},r:0,s:0,af:null,o:0,p:0,n:0,q:0,h:false,_ag:null,_ai:null,onZoomStart:function(a){var b=a._bn;this.q=1;a.ce(false);b.cc();b.b8();b.ca();a.hf({__x:NaN,__y:NaN,$type:$$a.$y.$type,getType:$.ig.$op.getType,getGetHashCode:$.ig.$op.getGetHashCode,typeName:$.ig.$op.typeName});b.b9();b.ce();b.cd();a.bg(0);this.h=true;a.da(true);a.i6()},onPinchStarted:function(a,b){this.onZoomStart(a)},onZoomStarted:function(a,b,c,d,e){this.r=b.__x;this.s=b.__y;this.o=c;this.p=d;this.n=e;this.af=a.actualWindowRect();this.onZoomStart(a)},onPinchDelta:function(a,b){var c=a._bn;c.b9();c.ce();if(c.useDeltaZoom()){this.w(a,b)}else{this.y(a,b);this.q=b}},onZoomDelta:function(a,b,c,d,e){var f=a._bn;f.b9();f.ce();this.o=this.o*c;this.p=this.p*d;this.n=this.n*e;if(a.cw()){this.o=this.n;this.p=this.n}var g=a.actualWindowRect();var h=a.viewportRect();var i=b.__x-this.r;var j=b.__y-this.s;this.r=b.__x;this.s=b.__y;var k=g.width();var l=g.height();var m=this.af.width()/this.o;var n=this.af.height()/this.p;if(m>1){m=1}if(n>1){n=1}var o={__x:b.__x,__y:b.__y,$type:$$a.$y.$type,getType:$.ig.$op.getType,getGetHashCode:$.ig.$op.getGetHashCode,typeName:$.ig.$op.typeName};var p={__x:(o.__x-h.left())/h.width()*g.width()+g.left(),__y:(o.__y-h.top())/h.height()*g.height()+g.top(),$type:$$a.$y.$type,getType:$.ig.$op.getType,getGetHashCode:$.ig.$op.getGetHashCode,typeName:$.ig.$op.typeName};var q=new $$a.ae(0,g.left(),g.top(),m,n);var r={__x:(p.__x-q.left())/q.width()*h.width()+h.left(),__y:(p.__y-q.top())/q.height()*h.height()+h.top(),$type:$$a.$y.$type,getType:$.ig.$op.getType,getGetHashCode:$.ig.$op.getGetHashCode,typeName:$.ig.$op.typeName};var s=r.__x-o.__x-i;var t=r.__y-o.__y-j;var u=s/h.width()*q.width();var v=t/h.height()*q.height();q=new $$a.ae(0,q.left()+u,q.top()+v,q.width(),q.height());g=q;a.kl(g,true)},onManipulationStarted:function(a,b){this._ag=new $$a.ae(0,b.__x,b.__y,0,0);this._ai=new $$a.ae(0,b.__x,b.__y,0,0)},x:function(a,b,c){var d=a.actualWindowRect().width();var e=a.actualWindowRect().height();var f=a.actualWindowRect().left()+d/2;var g=a.actualWindowRect().top()+e/2;d=d/b;e=e/b;var h=f-d/2;var i=g-e/2;a.kl(new $$a.ae(0,h,i,d,e),true)},onPinchCompleted:function(a,b){var c=a._bn;if(c.useDeltaZoom()){this.w(a,b)}else{this.y(a,b)}this._ag=$$a.$ae.empty();a.da(false)},onGestureCompleted:function(a,b){a.da(false);this._ag=$$a.$ae.empty();a.hn()},onZoomCompleted:function(a,b,c,d,e){a.da(false);this._ag=$$a.$ae.empty();a.hn()},w:function(a,b){var c=a.windowRect();var d=1/b;var e={__x:c.x()+c.width()/2,__y:c.y()+c.height()/2,$type:$$a.$y.$type,getType:$.ig.$op.getType,getGetHashCode:$.ig.$op.getGetHashCode,typeName:$.ig.$op.typeName};var f={__x:c.x()-e.__x,__y:c.y()-e.__y,$type:$$a.$y.$type,getType:$.ig.$op.getType,getGetHashCode:$.ig.$op.getGetHashCode,typeName:$.ig.$op.typeName};var g=new $$a.ae(0,f.__x*d+e.__x,f.__y*d+e.__y,c.width()*d,c.height()*d);a.kl(g,true)},y:function(a,b){var c=a.viewportRect();var d=a.windowRect();var e=b-this.q;if(e!=0){var f=.03;var g=e<0?1+f:1-f;var h={__x:d.x()+d.width()/2,__y:d.y()+d.height()/2,$type:$$a.$y.$type,getType:$.ig.$op.getType,getGetHashCode:$.ig.$op.getGetHashCode,typeName:$.ig.$op.typeName};var i={__x:d.x()-h.__x,__y:d.y()-h.__y,$type:$$a.$y.$type,getType:$.ig.$op.getType,getGetHashCode:$.ig.$op.getGetHashCode,typeName:$.ig.$op.typeName};var j=new $$a.ae(0,i.__x*g+h.__x,i.__y*g+h.__y,d.width()*g,d.height()*g);a.kl(j,true)}},onContactStarted:function(a,b,c){if(!a.da()){this.h=false}this.ad(a,b,c)},ad:function(a,b,c){var d;var e=a._bn;var f=a.bd(c);if(e.currentModifiers()==0){switch(f){case 1:d=a.isZoomingEnabled()?f:0;break;default:d=f;break}}else{if(e.currentModifiers()==a.dragModifier()){d=1}else if(e.currentModifiers()==a.panModifier()){d=2}else{d=0}}switch(d){case 1:case 2:a._bn.b3();a._bn.dg();break}a.bg(d);switch(a.bg()){case 1:a.hf({__x:NaN,__y:NaN,$type:$$a.$y.$type,getType:$.ig.$op.getType,getGetHashCode:$.ig.$op.getGetHashCode,typeName:$.ig.$op.typeName});this._ag=new $$a.ae(0,b.__x,b.__y,0,0);this._ai=new $$a.ae(0,b.__x,b.__y,0,0);this._ah=new $$a.ae(0,b.__x,b.__y,0,0);e.dy();e.d6(this._ag);a.jb($$a.$ae.empty(),true);break;case 2:this._ag=new $$a.ae(0,b.__x,b.__y,0,0);this._ah=new $$a.ae(0,b.__x,b.__y,0,0);break}this._ak=a.actualWindowRect()},onZoomPanInteractionStarting:function(a){a.startTiledZoomingIfNecessary();a._bn.onZoomPanInteractionStarting()},onZoomPanInteractionEnding:function(a){a.endTiledZoomingIfRunning();a._bn.onZoomPanInteractionEnding()},_j:false,startTiledZoomIfNecessary:function(a){if(a._cb&&!this._j){this._j=true;this.ac(a)}},endTiledZoomIfRunning:function(a){if(this._j){this.z(a);this._j=false}},clearTileZoomCache:function(a){if(this.e==null){return}this.f().ab()},f:function(){return this.e},e:null,ac:function(a){if(this.e==null){this.e=new $.ig.TileZoomManager(a,true,a.e2());this.e._h=!a.preferHigherResolutionTiles()}a._cn=true;a.ja();this.e.al();a._bn.bo();a._bn.bp()},z:function(a){if(this.e==null){return}a._cn=false;a._bn.onTileZoomEnding();this.e.ah();a.jt();a._bn.bv()},deferredClearOfTileZoomCache:function(a){a.clearTileZoomCache();a.jv()},b:null,_ah:null,l:function(a){return a.bg()==2},m:function(a,b){return a.windowResponse()==1||b||a._cb},k:function(a){return a.bg()==1},onContactMoved:function(a,b,c){var d=a._bn;if(this._ag.isEmpty()&&c){this.ad(a,b,c)}var e=2;if(c){e=10}var f=false;var g=new $$a.ae(2,{__x:this._ag.x(),__y:this._ag.y(),$type:$$a.$y.$type,getType:$.ig.$op.getType,getGetHashCode:$.ig.$op.getGetHashCode,typeName:$.ig.$op.typeName},b);var h=new $$a.ae(0,0,0,0,0);if(!this._ah.isEmpty()){h=new $$a.ae(2,{__x:this._ah.x(),__y:this._ah.y(),$type:$$a.$y.$type,getType:$.ig.$op.getType,getGetHashCode:$.ig.$op.getGetHashCode,typeName:$.ig.$op.typeName},b)}if(h.width()>e&&h.height()>e){f=true}if(!a.da()){if(f){this.h=false}}if(!a.da()&&(a.ce()||!c)){a.hf(a.mk(b))}if(this.k(a)){if(f){var i=a.m2(g);a.jb(i,true)}else{a.jb($$a.$ae.empty(),true)}d.d6(g)}var j=a.viewportRect();var k=a.actualWindowRect();if(this.l(a)){var l=j;var m=k.left()+k.width()*(this._ag.x()-b.__x)/l.width();var n=k.top()+k.height()*(this._ag.y()-b.__y)/l.height();var o=new $$a.ae(0,m,n,k.width(),k.height());if(this.m(a,c)){a.i6();a.jb($$a.$ae.empty(),true);a.kl(o,true);this._ag=new $$a.ae(3,b,new $$a.af(1,0,0));this._ai=new $$a.ae(3,b,new $$a.af(1,0,0))}else{a.jb(o,true)}}this._ai=new $$a.ae(3,b,new $$a.af(1,0,0));d.br(b)},onContactCompleted:function(a,b,c){var d=a._bn;var e=2;if(c){e=10}var f=a.viewportRect();var g=a.actualWindowRect();if(!this.h){var h=false;var i=new $$a.ae(2,{__x:this._ag.x(),__y:this._ag.y(),$type:$$a.$y.$type,getType:$.ig.$op.getType,getGetHashCode:$.ig.$op.getGetHashCode,typeName:$.ig.$op.typeName},b);if(i.width()>e&&i.height()>e){h=true}if(a.bg()==1){d.b8();if(h){a.kl(a.m2(i),true)}}if(a.bg()==2){var j=f;var k=g.left()+g.width()*(this._ag.x()-b.__x)/j.width();var l=g.top()+g.height()*(this._ag.y()-b.__y)/j.height();a.kl(new $$a.ae(0,k,l,g.width(),g.height()),true)}}var m=false;var n=new $$a.ae(2,{__x:this._ah.x(),__y:this._ah.y(),$type:$$a.$y.$type,getType:$.ig.$op.getType,getGetHashCode:$.ig.$op.getGetHashCode,typeName:$.ig.$op.typeName},b);if(n.width()>e||n.height()>e){m=true}if(m){a.df(true)}a.bg(0);a.jb($$a.$ae.empty(),true);d.bt();a.df(false);d.b9();d.ce();if(c){d.cd();d.b9();d.ce();d.ca()}a.hn();a.i5()},onPreferHigherResolutionTilesChanged:function(a){if(this.f()!=null){this.f()._h=!a.preferHigherResolutionTiles()}},_ak:null,onKeyDown:function(a,b){var c=a._bn;var d=a.actualWindowRect();if(a.bg()==2&&b==8){c.bq();a.bg(0);a.i5();a.jb($$a.$ae.empty(),true);if(a.windowResponse()==1){a.kl(this._ak,true)}return true}if(a.bg()==1&&b==8){c.bq();a.bg(0);a.i5();c.b8();a.jb($$a.$ae.empty(),true);return true}var e=$$a.$ae.empty();var f=false;switch(b){case 13:f=true;e=new $$a.ae(0,0,0,1,1);break;case 11:f=true;e=new $$a.ae(0,d.left()-.1*d.width(),d.top()-.1*d.height(),1.2*d.width(),1.2*d.height());break;case 10:f=true;e=new $$a.ae(0,d.left()+.1*d.width(),d.top()+.1*d.height(),.8*d.width(),.8*d.height());break;case 14:f=true;e=new $$a.ae(0,d.left()-.1*d.width(),d.top(),d.width(),d.height());e.x(e.x()-Math.min(e.left(),0));break;case 16:f=true;e=new $$a.ae(0,d.left()+.1*d.width(),d.top(),d.width(),d.height());e.x(e.x()-Math.max(e.right()-1,0));break;case 15:f=true;e=new $$a.ae(0,d.left(),d.top()-.1*d.height(),d.width(),d.height());e.y(e.y()-Math.min(e.top(),0));break;case 17:f=true;e=new $$a.ae(0,d.left(),d.top()+.1*d.height(),d.width(),d.height());e.y(e.y()-Math.max(e.bottom()-1,0));break}if(!e.isEmpty()&&$$a.$ae.l_op_Inequality(e,d)){a.kl(e,true)}return f},onMouseWheel:function(a,b,c){var d=a._bn;var e=a.actualWindowRect();var f=e.left()+e.width()*b.__x/a.viewportRect().width();var g=e.top()+e.height()*b.__y/a.viewportRect().height();var h=1-$.ig.MathUtil.prototype.b(c,-.5,.5);var i=Math.max(0,f-h*(f-e.left()));var j=Math.min(1,g+h*(e.bottom()-g));var k=Math.min(1,f+h*(e.right()-f));var l=Math.max(0,g-h*(g-e.top()));a.i6();this.v(a,1e3);a.kl(new $$a.ae(0,i,l,k-i,j-l),true);return a.isZoomingEnabled()},v:function(a,b){a._bn.bw(b)},onDoubleTap:function(a,b){var c=a.actualWindowRect();var d=c.left()+c.width()*b.__x/a.viewportRect().width();var e=c.top()+c.height()*b.__y/a.viewportRect().height();var f=.7;var g=Math.max(0,d-f*(d-c.left()));var h=Math.min(1,e+f*(c.bottom()-e));var i=Math.min(1,d+f*(c.right()-d));var j=Math.max(0,e-f*(e-c.top()));a.kl(new $$a.ae(0,g,j,i-g,h-j),true)},clearVisibleTiles:function(a){this.f().ac()},getDragState:function(){return this._ai},getHitSeries:function(a,b,c,d,e,f,g){var h=true;var i=false;var j=false;var k=a;if(k.actualContentHitTestMode()==1){h=false;i=true}if(k.actualContentHitTestMode()==3||k.actualContentHitTestMode()==4){i=true}if(k.actualContentHitTestMode()==4){j=true}var l=$.ig.truncate(Math.round(d.__x));var m=$.ig.truncate(Math.round(d.__y));f=null;var n=-1;if(h&&c!=null){var o=l;var p=m;if(a.actualPixelScalingRatio()!=1){o=$.ig.truncate(Math.round(d.__x*a.actualPixelScalingRatio()));p=$.ig.truncate(Math.round(d.__y*a.actualPixelScalingRatio()))}var q=c.a(o,p);if(q==null||q.length==0){f=null;return{ret:null,p5:f}}if((q[0]>0||q[1]>0||q[2]>0)&&q[3]==255){var num2_=q[2];if(num2_%4!=0){num2_=num2_+(4-num2_%4)}var num1_=q[1];if(num1_%4!=0){num1_=num1_+(4-num1_%4)}var num0_=q[0];if(num0_%4!=0){num0_=num0_+(4-num0_%4)}var num_=0;num_=num2_>>2;num_=num_<<6;num_=num_|num1_>>2;num_=num_<<6;num_=num_|num0_>>2;n=$.ig.truncate(Math.floor($a(num_,1e3)));n--}}var r=null;var s=-1;if(n>=0){var t=false;var u=0;var w=b.getEnumerator();while(w.moveNext()){var v=w.current();if(!v.mouseOverEnabled()){continue}if(t){break}if(v.isStacked()){v.h1(function(x){if(x._uniqueIndex==n){r=x;s=u;t=true;return false}return true})}else if(v._uniqueIndex==n){r=v;s=u;break}u++}}var x=null;if(i){var y=false;for(var z=b.count()-1;z>=0;z--){var aa=b.__inner[z];var ab=aa.view();if(!aa.dv(ab.br(),ab.bs(),ab)){continue}if(!y&&z<s&&h&&!j){if(r!=null){x=r;y=true;break}}if(aa!=null&&aa.actualHitTestMode()==1){if(aa.testHit(d,g)){x=aa;break}}}if(h&&!y){if(r!=null){x=r;y=true}}}else{x=r}if(x!=null){var ac=x.getHitDataContext({__x:l,__y:m,$type:$$a.$y.$type,getType:$.ig.$op.getType,getGetHashCode:$.ig.$op.getGetHashCode,typeName:$.ig.$op.typeName},g);if(ac!=null){f=ac}return{ret:x,p5:f}}return{ret:null,p5:f}},shouldInteract:function(a,b){if($$a.$y.l_op_Equality(b,null)){return false}var c=b.__x;var d=b.__y;if(c>=a.viewportRect().left()&&d>=a.viewportRect().top()&&c<=a.viewportRect().left()+a.viewportRect().width()&&d<=a.viewportRect().top()+a.viewportRect().height()){var e=a.bi();if(e!=null&&e.viewShouldInteract(b)){return false}return true}return false},c:function(a){if(a!=null){return a.a6()}else{return null}},onImmediateModeMouseOver:function(a,b,c,d,e,f){var $self=this;if(!f&&a.actualMobileMode()){this.ae(a,false)}var g=new $$a.ar;g.position(d);if(a.bg()==2||a.bg()==1||a.da()||a.bi()!=null&&a.bi().isPinching()){if(this._d!=null){this._d.a0().onMouseLeave(this._d,g.position(),this._a,g);this._d=null}return}var h=null;var i=function(){var j=$self.getHitSeries(a,b,c,d,!e,h,f);h=j.p5;return j.ret}();this._a=h;var j=this.c(i);if(i!=null){var k=false;var l=false;if(this._d!=i){l=true}if(this._d==null||l){k=true}if(k){if(l){if(this._d!=null){j=this.c(this._d);this._d.a0().onMouseLeave(this._d,g.position(),h,g);if(j!=null){j.a0().onMouseLeave(j,g.position(),h,g)}}}this._d=i;i.ij(g.position(),h,g);if(j!=null){j.ij(g.position(),h,g)}}else{this._d=i;i.a0().onMouseMove(i,g.position(),h,g);if(j!=null){j.a0().onMouseMove(j,g.position(),h,g)}}}else{if(this._d!=null){j=this.c(this._d);this._d.a0().onMouseLeave(this._d,g.position(),h,g);if(j!=null){j.a0().onMouseLeave(j,g.position(),h,g)}this._d=null}for(var m=0;m<a.series().count();m++){var n=a.series().__inner[m];if(n.a0().isMouseLeaveDeferred()){j=this.c(n);n.a0().onMouseLeave(n,g.position(),n.a0().lastHoverItem(),g);if(j!=null){j.a0().onMouseLeave(j,g.position(),n.a0().lastHoverItem(),g)}}}}},onImmediateModeMouseLeave:function(a,b){if(this._d!=null){var c=this.c(this._d);var d=new $$a.ar;d.position(b);this._d.a0().onMouseLeave(this._d,d.position(),null,d);if(c!=null){c.a0().onMouseLeave(c,d.position(),null,d)}this._d=null}a.im(b)},onImmediateModeMouseDown:function(a,b,c){if(this._d!=null){var d=new $$a.as;d.position(c);if(b._ag){this._d.a0().onRightButtonDown(this._d,d.position(),this._a,d)}else{this._d.a0().onLeftButtonDown(this._d,d.position(),this._a,d)}}},onImmediateModeMouseUp:function(a,b,c){var d;var e=this._d!=null?this._d:function(){var f=a._bn.e(c,false,d,false);d=f.p2;return f.ret}();if(e!=null){var f=new $$a.as;f.position(c);if(b._ag){e.a0().onRightButtonUp(e,f.position(),this._a,f)}else{e.a0().onMouseLeftButtonUp(e,f.position(),this._a,f)}}},onImmediateModeContactStarted:function(a,b,c){if(!c&&a.mobileMode()){this.ae(a,false)}if(c&&!a.mobileMode()){this.ae(a,true)}a.h7(b,c)},ae:function(a,b){if(a!=null){if(!this.i()){a.actualMobileMode(b)}}},onMobileModeChanged:function(a,b){this.g=true},_d:null,_a:null,g:false,i:function(){return this.g},$type:new $.ig.Type("SeriesViewerInteractionManager",$.ig.$ot,[$.ig.ISeriesViewerInteractionManager.prototype.$type])},true);$c("AnchoredCategorySeriesInteractionManager:c","Object",{init:function(){$.ig.$op.init.call(this)},getItem:function(a,b,c,d,e,f,g,h){if(!g){return h(b)}if(e==null||e.isSorting()||f==null||d==null||$.ig.util.isNaN(b.__x)||$.ig.util.isNaN(b.__y)){return h(b)}if(c<=1){return h(b)}var i=$.ig.truncate(Math.round(a.getExactItemIndex(b)));if(i<0||i>=a.bz().count()){return h(b)}var j=$a(i,c);var k=c*j;var l=Math.min(k+c,d.count()-1);var m=a.li(a.view());var n=new $.ig.ScalerParams(0,a.seriesViewer().windowRect(),a.seriesViewer().viewportRect(),f.isInverted(),a.seriesViewer().effectiveViewport());var o=m.top();var p=m.bottom();var q=o+(p-o)*b.__y;var r=f.getUnscaledValue(q,n);var s=1.7976931348623157e308;var t=k;for(var u=k;u<=l;u++){var v=Math.abs(d.item(u)-r);if(v<s){s=v;t=u}}return a.bz().item(t)},scrollIntoView:function(a,b,c,d,e,f){var g=a.view().bs();g=g.copy();var h=a.view().br();var i=new $$a.ae(0,0,0,1,1);var j=!g.isEmpty()&&!h.isEmpty()&&a.bz()!=null?a.bz().indexOf(f):-1;var k=a.lk(a.view());var l=new $.ig.ScalerParams(0,i,i,c.isInverted(),k);var m=new $.ig.ScalerParams(0,i,i,d.isInverted(),k);m._b=a.ee();var n=c!=null?c.getScaledValue(j,l):NaN;n+=e;var o=d!=null&&b!=null&&j<b.count()?d.getScaledValue(b.item(j),m):NaN;if(!$.ig.util.isNaN(n)){if(n<g.left()+.1*g.width()){n=n+.4*g.width();g.x(n-.5*g.width())}if(n>g.right()-.1*g.width()){n=n-.4*g.width();g.x(n-.5*g.width())}}if(!$.ig.util.isNaN(o)){if(o<g.top()+.1*g.height()){o=o+.4*g.height();g.y(o-.5*g.height())}if(o>g.bottom()-.1*g.height()){o=o-.4*g.height();g.y(o-.5*g.height())}}if(a.syncLink()!=null){a.syncLink().ap(a.seriesViewer(),g,true)}return j>=0},getDefaultTooltipTemplate:function(a,b){var c="<div class='ui-chart-default-tooltip-content'>";var d=null;d=a.ap();if(d.isDateTime()){var e=d;c+="<span>${item."+e.dateTimeMemberPath()+"}</span><br/>"}else if(d!=null&&d.label()!=null){c+="<span>${item."+d.label()+"}</span><br/>"}c+="<span";var f=a.a0().getDefaultTooltipTemplateLabelColorString(a);if(!String.isNullOrEmpty(f)){c+=" style='color:"+f+"'"}c+=">${series.title}: </span><span class='ui-priority-primary'>"+"${item."+b+"}</span></div>";return c},getColumnShapeBoundingBox:function(a,b,c,d,e,f,g,h){if(c==null||d==null){return $$a.$ae.empty()}var i=a.fromWorldPosition(b);var j=a.view().bs();var k=a.view().br();var l=a.getEffectiveViewport1(a.view());var m=new $.ig.ScalerParams(0,j,k,d.isInverted(),l);m._b=a.ee();var n=a.aj(a.ap(),e.f,f,g,b,true);if(n==null){return $$a.$ae.empty()}var o=n[0];var p=n[1];var q=Math.abs(i.__x-o[0]);var r=Math.abs(i.__x-p[0]);var s=d.getScaledValue(d.referenceValue(),m);var t=c.jk(j,k,l);if(q<r){var u=o[0]-.5*t;var v=h(o);var w=s;return new $$a.ae(0,u,Math.min(v,w),t,Math.max(v,w)-Math.min(v,w))}else{var x=p[0]-.5*t;var y=h(p);var z=s;return new $$a.ae(0,x,Math.min(y,z),t,Math.max(y,z)-Math.min(y,z))}},$type:new $.ig.Type("AnchoredCategorySeriesInteractionManager",$.ig.$ot,[$.ig.IAnchoredCategorySeriesInteractionManager.prototype.$type])},true);$c("CategorySeriesInteractionManager:d","Object",{init:function(){$.ig.$op.init.call(this)},getExactItemIndex:function(a,b){var c=a.view().bs();var d=a.view().br();var e=a.ap();var f=a.getEffectiveViewport1(a.view());var g=a.li(a.view());var h=-1;if(e!=null&&!c.isEmpty()&&!d.isEmpty()){var i=new $.ig.ScalerParams(0,c,d,e.isInverted(),f);var j=e.getUnscaledValue(g.left(),i);var k=e.getUnscaledValue(g.right(),i);var l=(b.__x-c.left())/c.width();var m=j+l*(k-j);if(e.categoryMode()!=0){m-=.5}h=m}return h},getItem:function(a,b){var c=0;if(a.c1()){c=a.e7(b);if(c==-1){return null}}else if(b.__x==1&&a.bz()!=null){c=a.bz().count()-1}else{c=a.getItemIndex(b)}return c>=0&&a.bz()!=null&&c<a.bz().count()?a.bz().item(c):null},getItemIndexSorted:function(a,b){var c=a.view().bs();var d=a.view().br();var e=a.getEffectiveViewport1(a.view());if(c.isEmpty()||d.isEmpty()){return-1}if($.ig.util.isNaN(b.__x)){return-1}var f=a.ap();if(f==null){return-1}var g=$b($.ig.ISortingAxis.prototype.$type,f);var h=a.li(a.view());var i=new $.ig.ScalerParams(0,c,d,f.isInverted(),e);var j=f.getUnscaledValue(h.left(),i);var k=f.getUnscaledValue(h.right(),i);var l=(b.__x-c.left())/c.width();var m=j+(k-j)*l;var n=g.getIndexClosestToUnscaledValue(m);return n},getSortingCategoryBucketIndex:function(a,b,c){var d=a.view().br();var e=a.view().bs();var f=a.ap();var g=0;if(f.isVertical()){var h=(c.__y-e.top())/e.height();g=h*d.height()+d.top()}else{var i=(c.__x-e.left())/e.width();g=i*d.width()+d.left()}if(f.isInverted()){var j=b.count();var k=0;for(k=j-1;k>=0;k--){var l=b.__inner[k];var m=null;if(k>0){m=b.__inner[k-1]}if(l[0]<=g&&m==null||m[0]>=g){if(m!=null){if(Math.abs(l[0]-g)<Math.abs(m[0]-g)){return k}else{return k-1}}else{return k}}}return k}else{var n=b.count();var o=0;for(o=0;o<n;o++){var p=b.__inner[o];var q=null;if(o<n-1){q=b.__inner[o+1]}if(p[0]<=g&&q==null||q[0]>=g){if(q!=null){if(Math.abs(p[0]-g)<Math.abs(q[0]-g)){return o}else{return o+1}}else{return o}}}return o}},getSpecificHighlightingInfo:function(a,b,c,d,e,f,g,h){var i=a.bz().count();var j=a.ap();var k=-1;var l=-1;if(j.isSorting()){var m=this.getSortingCategoryBucketIndex(a,b,g);k=m;l=m}else{var n=a.getItemIndex(g);k=$.ig.truncate(Math.floor($a(n,e)))*e;l=k+(e-1)}if(h!=null&&h.startIndex()==k&&h.endIndex()==l){return h}var o=new $.ig.HighlightingInfo;o.series(a);o.startIndex(k);o.endIndex(l);return o},getSpecificMarkerHighlightingInfo:function(a,b,c,d,e,f){var g=a.fromWorldPosition(e);var h=b;if(h==null){return null}var i=h.count();if(i==0){return null}var j=h.__inner[0]._al;if(a.isVertical()){var k=c.__inner[h.__inner[0]._al][0];var l=(g.__y-k)*(g.__y-k);var m;for(var n=0;n<i;n++){k=c.__inner[h.__inner[n]._al][0];m=(g.__y-k)*(g.__y-k);if(m<=l){l=m;j=h.__inner[n]._al}}}else{var o=c.__inner[h.__inner[0]._al][0];var p=(g.__x-o)*(g.__x-o);var q;for(var r=0;r<i;r++){o=c.__inner[h.__inner[r]._al][0];q=(g.__x-o)*(g.__x-o);if(q<=p){p=q;j=h.__inner[r]._al}}}var s=new $.ig.HighlightingInfo;s.series(a);s.isMarker(true);s.startIndex(j);s.endIndex(s.startIndex());if(f!=null&&f.startIndex()==s.startIndex()&&f.endIndex()==s.endIndex()){return f}return s},$type:new $.ig.Type("CategorySeriesInteractionManager",$.ig.$ot,[$.ig.ICategorySeriesInteractionManager.prototype.$type])},true);$c("HorizontalAnchoredCategorySeriesInteractionManager:e","Object",{init:function(){$.ig.$op.init.call(this)},getHighStrokeSegments:function(a,b,c,d,e){var f=a.aj(a.ap(),b,c,d,a.toWorldPosition(e),true);if(f==null){return null}var g=f[0];var h=f[1];var i=new Array(1);var j=new Array(2);j[0]={__x:g[0],__y:g[2],$type:$$a.$y.$type,getType:$.ig.$op.getType,getGetHashCode:$.ig.$op.getGetHashCode,typeName:$.ig.$op.typeName};j[1]={__x:h[0],__y:h[2],$type:$$a.$y.$type,getType:$.ig.$op.getType,getGetHashCode:$.ig.$op.getGetHashCode,typeName:$.ig.$op.typeName};i[0]=j;return i},getLowStrokeSegments:function(a,b,c,d,e){var f=a.aj(a.ap(),b,c,d,a.toWorldPosition(e),true);if(f==null){return null}var g=f[0];var h=f[1];var i=new Array(1);var j=new Array(2);j[0]={__x:g[0],__y:g[1],$type:$$a.$y.$type,getType:$.ig.$op.getType,getGetHashCode:$.ig.$op.getGetHashCode,typeName:$.ig.$op.typeName};j[1]={__x:h[0],__y:h[1],$type:$$a.$y.$type,getType:$.ig.$op.getType,getGetHashCode:$.ig.$op.getGetHashCode,typeName:$.ig.$op.typeName};i[0]=j;return i},getSeriesValueMarkerBoundingBox:function(a,b,c,d){var e=a.fromWorldPosition(c);var f=-1;var g=a.ap();var h=g.isInverted();var i=a.view().br().right()*2;if(h){f=$.ig.ArrayUtil.prototype.c($$a.$y.$type,b,function(j){return i-e.__x<i-j.__x?-1:i-e.__x>i-j.__x?1:0})}else{f=$.ig.ArrayUtil.prototype.c($$a.$y.$type,b,function(j){return e.__x<j.__x?-1:e.__x>j.__x?1:0})}if(f<0){f=~f}if(f<0){f=0}if(f>b.count()-1){f=b.count()-1}var j=f;var k=f;if(j>0){j--}if(k<b.count()-1){k++}var l=b.__inner[j].__x;var m=b.__inner[f].__x;var n=b.__inner[k].__x;var o=Math.abs(l-e.__x);var p=Math.abs(m-e.__x);var q=Math.abs(n-e.__x);var r=d(j);var s=d(f);var t=d(k);var u=r.containsPoint(e);var v=s.containsPoint(e);var w=t.containsPoint(e);if(p<=o&&p<=q){if(!h&&w){return t}if(h&&u){return r}return s}if(o<=p&&o<=q){if(!h&&v){return s}return d(j)}if(q<=p&&q<=o){if(h&&v){return s}return d(k)}return $$a.$ae.empty()},testAreaOver:function(a,b,c,d,e){if($.ig.util.isNaN(d.__x)||$.ig.util.isNaN(d.__y)){return false}var f=0;if(b!=null){f=b.scaleValue(b.referenceValue())}if(c.__y>=f&&c.__y<=d.__y||c.__y<=f&&c.__y>=d.__y){return true}return false},$type:new $.ig.Type("HorizontalAnchoredCategorySeriesInteractionManager",$.ig.$ot,[$.ig.IHorizontalAnchoredCategorySeriesInteractionManager.prototype.$type])},true);$c("InteractivityFactoryManager:f","Object",{init:function(){$.ig.$op.init.call(this)},register:function(){if(!$$t.$f.a){$.ig.DVContainer.prototype.instance().registerFactory($.ig.ISeriesInteractionManager.prototype.$type,function(){
|
|
return new $$t.g});$.ig.DVContainer.prototype.instance().registerFactory($.ig.ICategorySeriesInteractionManager.prototype.$type,function(){return new $$t.d});$.ig.DVContainer.prototype.instance().registerFactory($.ig.IAnchoredCategorySeriesInteractionManager.prototype.$type,function(){return new $$t.c});$.ig.DVContainer.prototype.instance().registerFactory($.ig.IHorizontalAnchoredCategorySeriesInteractionManager.prototype.$type,function(){return new $$t.e});$.ig.DVContainer.prototype.instance().registerFactory($.ig.IVerticalAnchoredCategorySeriesInteractionManager.prototype.$type,function(){return new $$t.h});$.ig.DVContainer.prototype.instance().registerFactory($.ig.ISeriesViewerInteractionManager.prototype.$type,function(){return new $$t.b});$$t.$f.a=true}},$type:new $.ig.Type("InteractivityFactoryManager",$.ig.$ot)},true);$c("SeriesInteractionManager:g","Object",{init:function(){this.e=true;this.f=false;this.__toolTipObject=null;this.p=null;this.k=new $$4.h(String,$.ig.SeriesView.prototype.$type,0);$.ig.$op.init.call(this)},getDistanceToIndexHelper:function(a,b,c,d,e,f,g,h){if(d==null){return Number.POSITIVE_INFINITY}if(c<0||c>g-1){return Number.POSITIVE_INFINITY}var i;var j=NaN;var k=NaN;var l=NaN;var m=NaN;if(d.isSorting()){var n=d;i=h(b);var o=$.ig.truncate(Math.floor(i));var p=$.ig.truncate(Math.ceil(i));m=i-o;if(o>=0&&o<g){var q=n.getUnscaledValueAt(n.sortedIndices().__inner[o]);j=d.getScaledValue(q,e)+f}else{j=NaN}if(p>=0&&p<g){var r=n.getUnscaledValueAt(n.sortedIndices().__inner[p]);k=d.getScaledValue(r,e)+f}else{k=NaN}if($.ig.util.isNaN(j)&&!$.ig.util.isNaN(k)){j=k}if($.ig.util.isNaN(k)&&!$.ig.util.isNaN(j)){k=j}if(c>=0&&c<g){var s=n.getUnscaledValueAt(n.sortedIndices().__inner[c]);l=d.getScaledValue(s,e)+f}}else{i=a.getExactItemIndex(b);var t=$.ig.truncate(Math.floor(i));var u=$.ig.truncate(Math.ceil(i));m=i-t;if(t>=0&&t<g){j=d.getScaledValue(t,e)+f}else{j=NaN}if(u>=0&&u<g){k=d.getScaledValue(u,e)+f}else{k=NaN}if($.ig.util.isNaN(j)&&!$.ig.util.isNaN(k)){j=k}if($.ig.util.isNaN(k)&&!$.ig.util.isNaN(j)){k=j}if(c>=0&&c<g){l=d.getScaledValue(c,e)+f}}var v=j+m*(k-j);return Math.abs(l-v)},getInterpolatedSeriesValue:function(a,b,c,d,e,f,g,h,i){var j=NaN;if(d>=0&&d<c.count()){j=c.item(d)}var k=NaN;if(e>=0&&e<c.count()){k=c.item(e)}if(g==0){return k}if(f==c.count()-1){return j}if($.ig.util.isNaN(k)&&h!=0&&b<=.5&&!i){return j}if($.ig.util.isNaN(j)&&h!=0&&b>=.5&&!i){return k}return j*(1-b)+k*b},getMatchingBuckets:function(a,b,c,d,e,f,g){if(b==null){return null}var h=-1;var i=-1;if(b.isSorting()){var j=a.fromWorldPosition(f);var k=-1;var l=b.isInverted();var m=a.view().br().right()*2;k=$$t.$g.n(c,j,l,m);if(k<0){k=~k;k--}if(k<0){k=0}if(k>c.count()-1){k=c.count()-1}var n=k;var o=k+1;if(o>c.count()-1){o=c.count()-1}h=n;i=o}else{var p=a.getPreviousOrExactIndex(f,g);var q=a.getNextOrExactIndex(f,g);var r=$.ig.truncate(Math.floor(p/d));var s=$.ig.truncate(Math.floor(q/d));h=r-e;i=s-e;if(i==h){i++}}if(h<0){h=0}if(h>c.count()-1){h=c.count()-1}if(i<0){i=0}if(i>c.count()-1){i=c.count()-1}if(h<0||i<0){return null}var t=c.__inner[h];var u=c.__inner[i];var v=new Array(2);v[0]=t;v[1]=u;return v},n:function(a,b,c,d){var e=0;var f=a.count()-1;while(e<=f){var g=e+(f-e>>1);var h;var i=a.item(g);if(c){h=d-b.__x<d-i[0]?-1:d-b.__x>d-i[0]?1:0}else{h=b.__x<i[0]?-1:b.__x>i[0]?1:0}if(h<0){f=g-1}else if(h>0){e=g+1}else{return g}}return~e},getPreviousOrExactIndexHelper:function(a,b,c,d,e,f){if(d==null){return-1}var g=d.isSorting();var h=a.du();var i=null;if(g){i=d}var j=-1;var k=-1;var l=-1;if(g){j=e(b);if($.ig.util.isNaN(j)){return-1}k=$.ig.truncate(Math.floor(j));l=$.ig.truncate(Math.ceil(j))}else{j=a.getExactItemIndex(b);if($.ig.util.isNaN(j)){return-1}k=$.ig.truncate(Math.floor(j));l=$.ig.truncate(Math.ceil(j))}if(f==null){return-1}if(k<0||k>f.count()-1){return-1}if(!c){return k}var m=NaN;if(g&&!h){if(k<i.sortedIndices().count()&&i.sortedIndices().__inner[k]<f.count()){m=f.item(i.sortedIndices().__inner[k])}}else{m=f.item(k)}while($.ig.util.isNaN(m)){k--;if(k<0||k>f.count()-1){return-1}if(g&&!h){m=f.item(i.sortedIndices().__inner[k])}else{m=f.item(k)}}return k},getSeriesValueHelper:function(a,b,c,d,e,f,g,h,i){if(b==null){return NaN}var j=a.du();var k=a.fc(c,i,d,g,b);var l=a.fa(c,i,d,g,b);var m=a.d6(c,k,d,e,f);var n=a.d6(c,l,d,e,f);var o=k;var p=l;var q=d.isSorting();if(q&&!j){var r=d;if(k>=0&&k<r.sortedIndices().count()){k=r.sortedIndices().__inner[k]}if(l>=0&&k<r.sortedIndices().count()){l=r.sortedIndices().__inner[l]}}var s=m/(n+m);if(m==0){s=0}if(n==0){s=1}if(!h){if(n<=m){if(l>=0&&l<b.count()){return b.item(l)}}else{if(k>=0&&k<b.count()){return b.item(k)}}return NaN}return a.ec(s,b,k,l,o,p,f,q)},testHighLowStrokeOver:function(a,b,c){var d=a.ai(b);var e=a.ah(b);if(d==null){return false}for(var f=0;f<d.length;f++){var g=d[f];if(g==null||g.length!=2){continue}if($.ig.GeometryUtil.prototype.a(b,g[0],g[1],a.thickness()/2+a.eb(c))){return true}if(e!=null&&f<e.length){var h=e[f];if(h==null||h.length!=2){continue}if($.ig.GeometryUtil.prototype.a(b,h[0],h[1],a.thickness()/2+a.eb(c))){return true}if($.ig.GeometryUtil.prototype.a(b,g[0],h[0],a.thickness()/2+a.eb(c))){return true}if($.ig.GeometryUtil.prototype.a(b,g[1],h[1],a.thickness()/2+a.eb(c))){return true}var i=new Array(5);i[0]=h[0];i[1]=h[1];i[2]=g[1];i[3]=g[0];i[4]=h[0];if($.ig.PolygonUtil.prototype.a(i,b)){return true}}}return false},testNearStroke:function(a,b,c,d){if(d==null){return false}for(var e=0;e<d._b.count();e++){var f=d._b.__inner[e];for(var g=0;g<f.__segments.count();g++){var h=f.__segments.__inner[g];if($.ig.GeometryUtil.prototype.b(b,f.__startPoint,h.__points,a.eb(c))){return true}}}return false},testOverPoly:function(a,b,c){if(c._b.count()>0){var d=c._b.__inner[0];if(d.__segments.count()>0){var e=d.__segments.__inner[0];if($.ig.PolygonUtil.prototype.a(e.__points,b)){return true}}}return false},getNextOrExactIndexHelper:function(a,b,c,d,e,f){var g=a.du();var h=d.isSorting();var i=null;if(h){i=d}var j=-1;var k=-1;var l=-1;if(h){j=e(b);if($.ig.util.isNaN(j)){return-1}k=$.ig.truncate(Math.floor(j));l=$.ig.truncate(Math.ceil(j))}else{j=a.getExactItemIndex(b);if($.ig.util.isNaN(j)){return-1}k=$.ig.truncate(Math.floor(j));l=$.ig.truncate(Math.ceil(j))}if(f==null){return-1}if(l<0||l>f.count()-1){return-1}if(!c){return l}var m=NaN;if(h&&!g){if(l<i.sortedIndices().count()&&i.sortedIndices().__inner[l]<f.count()){m=f.item(i.sortedIndices().__inner[l])}}else{m=f.item(l)}while($.ig.util.isNaN(m)){l++;if(l<0||l>f.count()-1){return-1}if(h&&!g){m=f.item(i.sortedIndices().__inner[l])}else{m=f.item(l)}}return l},getExactUnsortedItemIndexHelper:function(a,b,c){var d=a.view().bs();var e=a.view().br();if(d.isEmpty()||e.isEmpty()||c==null){return-1}var f=a.getEffectiveViewport1(a.view());var g=null;if(c.isSorting()){g=c}var h=new $.ig.ScalerParams(0,d,e,c.isInverted(),f);if(a.seriesViewer()==null){return-1}h.c=a.getEffectiveViewport1(a.view());var i=a.li(a.view());var j=0;if(c.isVertical()){var k=c.getUnscaledValue(i.top(),h);var l=c.getUnscaledValue(i.bottom(),h);var m=(b.__y-d.top())/d.height();j=k+(l-k)*m}else{if(c.isCategoryDateTime()){var n=c.getUnscaledValue(i.left(),h);var o=c.getUnscaledValue(i.right(),h);var p=(b.__x-d.left())/d.width();j=n+(o-n)*p}else{var q=new $$a.ae(0,0,0,1,1);j=c.getUnscaledValue(b.__x,new $.ig.ScalerParams(1,q,q,c.isInverted()))}}if(c.isDateTime()){}var r=g.getExactUnsortedIndexClosestToUnscaledValue(j);return r},testShapesOver:function(a,b,c){var d=a.getSeriesValueBoundingBoxFromSeriesPixel(b);if(d.isEmpty()){return false}var e=$.ig.RectUtil.prototype.r(d,a.eb(c));return e.containsPoint(b)},getSeriesValuePositionHelper:function(a,b,c,d,e,f,g,h,i,j){if(f==null||g==null||a.view()==null||a.view().bs().isEmpty()||a.view().br().isEmpty()){return{__x:NaN,__y:NaN,$type:$$a.$y.$type,getType:$.ig.$op.getType,getGetHashCode:$.ig.$op.getGetHashCode,typeName:$.ig.$op.typeName}}var k=a.getEffectiveViewport1(a.view());var l=new $.ig.ScalerParams(0,a.view().bs(),a.view().br(),f.isInverted(),k);if(f.isVertical()){l._b=a.ee()}l.c=a.getEffectiveViewport1(a.view());var m=a.view();var n;if(g.isVertical()){n=b.__y;n=m.br().top()+m.br().height()*(n-m.bs().top())/m.bs().height()}else{n=b.__x;n=m.br().left()+m.br().width()*(n-m.bs().left())/m.bs().width()}if(!c&&g!=null){var o;var p;if(i!=null){o=i(b,d)}else{o=a.getPreviousOrExactIndex(b,d)}if(j!=null){p=j(b,d)}else{p=a.getNextOrExactIndex(b,d)}if(o==-1&&p==-1){return{__x:NaN,__y:NaN,$type:$$a.$y.$type,getType:$.ig.$op.getType,getGetHashCode:$.ig.$op.getGetHashCode,typeName:$.ig.$op.typeName}}var q=new $.ig.ScalerParams(0,m.bs(),m.br(),g.isInverted(),k);q.c=a.seriesViewer().viewportRect();var r=a.d6(b,o,g,q,e);var s=a.d6(b,p,g,q,e);var t=p;var u=o;if(g.isSorting()){var v=g;if(t>=0&&t<v.sortedIndices().count()){t=v.getUnscaledValueAt(v.sortedIndices().__inner[$.ig.truncate(t)])}if(u>=0&&u<v.sortedIndices().count()){u=v.getUnscaledValueAt(v.sortedIndices().__inner[$.ig.truncate(u)])}}if(s+r!=0){var w=s/(r+s);if(Math.abs(w-.5)<1e-7){s=r}}if(s<=r){n=g.getScaledValue(t,q)+e}else{n=g.getScaledValue(u,q)+e}}else{if(g.isCategory()&&!g.isDateTime()&&g.categoryMode()!=0){var x=.5*g.getCategorySize(m.bs(),m.br(),a.getEffectiveViewport1(m));if(a.isVertical()){x=x*-1}if(g.isInverted()){x=x*-1}n-=x;n+=e}}var y;if(h!=null){y=h(b,c,d)}else{y=a.getSeriesValue(b,c,d)}var z=f.getScaledValue(y,l);if(g.isVertical()){return{__x:z,__y:n,$type:$$a.$y.$type,getType:$.ig.$op.getType,getGetHashCode:$.ig.$op.getGetHashCode,typeName:$.ig.$op.typeName}}else{return{__x:n,__y:z,$type:$$a.$y.$type,getType:$.ig.$op.getType,getGetHashCode:$.ig.$op.getGetHashCode,typeName:$.ig.$op.typeName}}},_a:null,_b:null,modifyHighlights:function(a,b,c,d,e){if(a.seriesViewer().c5()&&!e){return}if(!a._b9){return}if(a.seriesViewer()==null){return}var f=null;var g=null;var h=a.seriesViewer().az();var i=a.seriesViewer()._bo;if(e&&this._a!=null){f=this._a}else{f=a.at(b,c);if(this._a!=null&&this._a!=f){if(a.seriesViewer()!=null){h.endHighlight(this._a)}}this._a=f}if(a.hasMarkers()){if(e&&this._b!=null){g=this._b}else{g=a.au(b,c);if(this._b!=null&&this._b!=g){h.endHighlight(this._b)}this._b=g}}var j=true;if(e){h.endHighlight(f);if(g!=null){h.endHighlight(g)}}else{if(d||!j){h.startHighlight(f);if(g!=null){h.startHighlight(g)}}}if(!i.animationActive()&&i.intervalMilliseconds()>0){i.start()}if(i.intervalMilliseconds()==0){a.seriesViewer().ke(1)}},applyHighlightingColor:function(a,b,c){var d=b.progress();d=d*.5;return this.r(c,d)},r:function(a,b){if(a==null){return a}return $.ig.BrushUtil.prototype.h(a,b)},onMouseEnter:function(a,b,c,d){var e=a.view();e.aj();this.mouseIsOver(true);var f=a.fq(c,b);this.lastHoverItem(f);if(a.seriesViewer()!=null&&!a._aq._c){this.updateToolTip(a,b,f,d)}this.c=false;if(a.da()&&f==null){this.c=true}if(a.seriesViewer()!=null&&!this.c){if(a.da()){this.d=true}this.modifyHighlights(a,f,a.toWorldPosition(b),true,false);a.seriesViewer().it(a,f,d)}},simulateHover:function(a,b){var c=null;var d=null;var e;var f=function(){var g=a.seriesViewer()._bn.e(b,false,e,false);e=g.p2;return g.ret}();if(f!=a){if(this.mouseIsOver()){this.onMouseLeave(a,b,null,null)}return}c=e;if(!this.mouseIsOver()){this.onMouseEnter(a,b,c,d)}this.onMouseMove(a,b,c,d)},onMouseMove:function(a,b,c,d){this.mouseIsOver(true);var e=a.fq(c,b);this.updateToolTip(a,b,e,d);if(e!=null){this.lastHoverItem(e)}if(a.seriesViewer()!=null&&e!=null&&this.c){this.c=false;this.d=true;this.modifyHighlights(a,e,a.toWorldPosition(b),true,false);a.seriesViewer().it(a,e,d)}if(a.seriesViewer()!=null&&(!a.da()||e!=null)&&!this.c){this.modifyHighlights(a,e,a.toWorldPosition(b),true,false);a.seriesViewer().ix(a,e,d)}if(e==null&&!this.c&&a.da()){this.modifyHighlights(a,e,a.toWorldPosition(b),false,true);a.seriesViewer().iu(a,this.lastHoverItem(),d);this.d=false;this.c=true}},onMouseLeave:function(a,b,c,d){a.view().ak();this.mouseIsOver(false);var e=this.lastHoverItem();a.view().am();if(a.seriesViewer()!=null&&(this.d||!a.da())){this.d=false;this.c=false;this.modifyHighlights(a,e,a.toWorldPosition(b),false,true);a.seriesViewer().iu(a,e,d)}},onLeftButtonDown:function(a,b,c,d){this._i=true;if(a.seriesViewer()!=null){a.seriesViewer().iv(a,a.fq(c,b),d)}},onMouseLeftButtonUp:function(a,b,c,d){this._i=false;if(a.seriesViewer()!=null){a.seriesViewer().iw(a,a.fq(c,b),d)}},onLostMouseCapture:function(a,b,c,d){if(a.view()._p){return}if(this._i){this.onMouseLeftButtonUp(a,b,c,d)}if(this.mouseIsOver()){this.onMouseLeave(a,b,c,d)}},onRightButtonDown:function(a,b,c,d){if(a.seriesViewer()!=null){a.seriesViewer().iy(a,a.fq(c,b),d)}},onRightButtonUp:function(a,b,c,d){if(a.seriesViewer()!=null){a.seriesViewer().iz(a,a.fq(c,b),d)}},_lastHoverItem:null,lastHoverItem:function(a){if(arguments.length===1){this._lastHoverItem=a;return a}else{return this._lastHoverItem}},_mouseIsOver:false,mouseIsOver:function(a){if(arguments.length===1){this._mouseIsOver=a;return a}else{return this._mouseIsOver}},_i:false,c:false,isMouseEnterDeferred:function(a){if(arguments.length===1){this.c=a;return a}else{return this.c}},d:false,isMouseLeaveDeferred:function(a){if(arguments.length===1){this.d=a;return a}else{return this.d}},e:false,f:false,updateToolTip:function(a,b,c,d){var e=false;if(a.seriesViewer()!=null){e=a.seriesViewer()._cr}if(e){return}if(a.seriesViewer()==null||a.seriesViewer().dragCrosshairActivated()){return}this._j=true;this._s=b;this._o=c;a.view()._d.item(c);a.view()._d.itemLabel(a.fo(c));var f=a.seriesViewer().getContainerOffsets();var pos_={__x:b.__x+15+f.__x,__y:b.__y+15+f.__y,$type:$$a.$y.$type,getType:$.ig.$op.getType,getGetHashCode:$.ig.$op.getGetHashCode,typeName:$.ig.$op.typeName};var context_=a.view()._d;var g=false;if(this.__toolTipObject!=null){if(this.f||g){this.f=false;this.__toolTipObject.remove();this.__toolTipObject.setStyleProperty("position","absolute");this.__toolTipObject.addClass(a.seriesViewer().tooltipStyle());a.seriesViewer().addTooltipToView(this.__toolTipObject);this.__toolTipObject.hide()}if(this.e){a.seriesViewer().addTooltipToView(this.__toolTipObject);this.e=false}context_.hideOthers=true;if(this.__toolTipObject.updateToolTip&&!this.__toolTipObject.updateToolTip(context_)){a.view().am()}var h=window.pageXOffset;var i=window.pageYOffset;var j=document.documentElement.clientWidth;var k=document.documentElement.clientHeight;var l=this.__toolTipObject.outerWidthWithMargin();var m=this.__toolTipObject.outerHeightWithMargin();var n=pos_.__x;var o=pos_.__y;var p=5;var q=30;if(l+n-h+p>j){pos_.__x-=q;pos_.__x-=l}if(m+o-i+p>k){pos_.__y-=q;pos_.__y-=m}this.__toolTipObject.setOffset(pos_.__x,pos_.__y)}},showToolTip:function(a,b,c){this._j=true;var d={__x:b.__x+a.view().br().left(),__y:b.__y+a.view().br().top(),$type:$$a.$y.$type,getType:$.ig.$op.getType,getGetHashCode:$.ig.$op.getGetHashCode,typeName:$.ig.$op.typeName};var e=a.fq(null,d);if(a.view()._d!=null){a.view()._d.series(a);a.view()._d.item(e)}var tooltip_=this.__toolTipObject;var context_=a.view()._d;var f=false;if(context_!=null){context_.hideOthers=false}if((!this.f||f)&&tooltip_!=null){this.f=true;tooltip_.remove();tooltip_.setStyleProperty("position","relative");tooltip_.setStyleProperty("top","");tooltip_.setStyleProperty("left","");tooltip_.removeClass(a.seriesViewer().tooltipStyle())}if(this.__toolTipObject!=null){if(tooltip_.updateToolTip){tooltip_.updateToolTip(context_)}}if(tooltip_!=null){c(tooltip_)}},getDefaultTooltipTemplate:function(a){var b="<div class='ui-chart-default-tooltip-content'><span";var c=this.getDefaultTooltipTemplateLabelColorString(a);if(!String.isNullOrEmpty(c)){b+=" style='color:"+c+"'"}b+=">"+a.title()+"</span></div>";return b},h:function(a,b){var c=a!=null&&$$a.$ax.e($m($$a.$ax.$type,a.color()),$m($$a.$ax.$type,null));c=c&&a.color().l()>0;c=c&&$$a.$ax.d(a.color(),b);return!c},getDefaultTooltipTemplateLabelColorString:function(a){var b=new $$a.ax;var c=a!=null&&a.seriesViewer()!=null&&a.seriesViewer()._bn!=null&&a.seriesViewer()._bn._i!=null?a.seriesViewer()._bn._i._af:null;c.startCSSQuery();b.colorString(c.getCssDefaultPropertyValue("ui-chart-pointer-tooltip","background-color"));c.endCSSQuery();if(!this.h(a.actualOutline(),b)){return a.actualOutline().__fill}if(!this.h(a.actualBrush(),b)){return a.actualBrush().__fill}return null},hideTooltip:function(a){if(this.__toolTipObject!=null&&this._j){this._j=false;var context_=a.view()._d;if(this.__toolTipObject.hideToolTip){this.__toolTipObject.hideToolTip(context_)}}},__toolTipObject:null,p:null,updateToolTipValue:function(a,b){var c=this.__toolTipObject;this.p=null;this.__toolTipObject=null;if(typeof b==="string"){this.p=b}else{this.__toolTipObject=b;if(this.__toolTipObject!=null){this.__toolTipObject.setStyleProperty("position","absolute");this.__toolTipObject.setStyleProperty("top","0px");this.__toolTipObject.setStyleProperty("left","0px");this.__toolTipObject.setStyleProperty("z-index","10000");this.__toolTipObject.setStyleProperty("pointer-events","none");var d=a.actualOutline()!=null&&$$a.$ax.e($m($$a.$ax.$type,a.actualOutline().color()),$m($$a.$ax.$type,null))&&a.actualOutline().color().l()>0;if(d){this.__toolTipObject.setStyleProperty("border-color",a.actualOutline().__fill)}}else{if(!this.e&&c!=null){a.seriesViewer().jz(c);this.e=true}}}},_s:null,_o:null,_j:false,removeToolTipFromCurrentParent:function(a){},k:null,alternateViews:function(){return this.k},ensureAlternateView:function(a,b,c,d,e){var $self=this;var f;if(!function(){var g=$self.k.tryGetValue(d,f);f=g.p1;return g.ret}()){f=a.bg();f.isThumbnailView(true);f.isAlternateView(true);if(a.seriesViewer()!=null){f._a=a.seriesViewer()._ag;a.seriesViewer()._ag.l(f)}f.onInit();f.alternateViewIdentifier(d);this.k.item(d,f)}f._s=e;f.br(b);f._bq=c},removeAlternateView:function(a,b,c){var $self=this;var d;var e=c;if(e==null){e=a.seriesViewer()}if(function(){var f=$self.k.tryGetValue(b,d);d=f.p1;return f.ret}()){if(e!=null){d._a=null;e._ag.r(d)}this.k.remove(b)}},removeAllAlternateViews:function(a,b){var c=new $$4.x(String,0);var e=this.k.keys().getEnumerator();while(e.moveNext()){var d=e.current();c.add(d)}for(var f=0;f<c.count();f++){this.removeAlternateView(a,c.__inner[f],b)}},$type:new $.ig.Type("SeriesInteractionManager",$.ig.$ot,[$.ig.ISeriesInteractionManager.prototype.$type])},true);$c("VerticalAnchoredCategorySeriesInteractionManager:h","Object",{init:function(){$.ig.$op.init.call(this)},getExactItemIndex:function(a,b){var c=a.seriesViewer()!=null?a.seriesViewer().actualWindowRect():$$a.$ae.empty();var d=a.view().br();var e=a.li(a.view());var f=a.getEffectiveViewport1(a.view());var g=a.ap();var h=-1;if(g!=null&&!c.isEmpty()&&!d.isEmpty()){var i=new $.ig.ScalerParams(0,c,d,g.isInverted(),f);var j=g.getUnscaledValue(e.top(),i);var k=g.getUnscaledValue(e.bottom(),i);var l=(b.__y-c.top())/c.height();var m=j+l*(k-j);if(g.categoryMode()!=0){m-=.5}h=m}return h},getSeriesValueMarkerBoundingBox:function(a,b,c,d){var e=a.fromWorldPosition(c);var f=-1;var g=a.ap().isInverted();var h=a.view().br().bottom()*2;if(g){f=$.ig.ArrayUtil.prototype.c($$a.$y.$type,b,function(i){return h-e.__y<h-i.__y?-1:h-e.__y>h-i.__y?1:0})}else{f=$.ig.ArrayUtil.prototype.c($$a.$y.$type,b,function(i){return e.__y<i.__y?-1:e.__y>i.__y?1:0})}if(f<0){f=~f}if(f<0){f=0}if(f>b.count()-1){f=b.count()-1}var i=f;var j=f;if(i>0){i--}if(j<b.count()-1){j++}var k=b.__inner[i].__y;var l=b.__inner[f].__y;var m=b.__inner[j].__y;var n=Math.abs(k-e.__y);var o=Math.abs(l-e.__y);var p=Math.abs(m-e.__y);var q=d(i);var r=d(f);var s=d(j);var t=q.containsPoint(e);var u=r.containsPoint(e);var v=s.containsPoint(e);if(o<=n&&o<=p){if(!g&&v){return s}if(g&&t){return q}return r}if(n<=o&&n<=p){if(!g&&u){return r}return d(i)}if(p<=o&&p<=n){if(g&&u){return r}return d(j)}return $$a.$ae.empty()},$type:new $.ig.Type("VerticalAnchoredCategorySeriesInteractionManager",$.ig.$ot,[$.ig.IVerticalAnchoredCategorySeriesInteractionManager.prototype.$type])},true);$$t.$f.a=false}); |