/*!@license
* Infragistics.Web.ClientUI infragistics.legend.js 21.2.20212.99
*
* Copyright (c) 2011-2022 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_visualdata.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_visualdata","./infragistics.ext_ui"],factory)}else{factory(igRoot)}})(function($){$.ig=$.ig||{};var $$t={};$.ig.globalDefs=$.ig.globalDefs||{};$.ig.globalDefs.$$p=$$t;var $$0=$.ig.globalDefs.$$0;var $$4=$.ig.globalDefs.$$4;var $$1=$.ig.globalDefs.$$1;var $$w=$.ig.globalDefs.$$w;var $$ap=$.ig.globalDefs.$$ap;var $$6=$.ig.globalDefs.$$6;var $$a=$.ig.globalDefs.$$a;$.ig.$currDefinitions=$$t;$.ig.util.bulkDefine(["LegendBaseViewManager:b","XamDataLegend:c","DataLegendSummaryCalculationHandler:e","IDataLegendSummaryCalculation:f","DataLegendSummaryCalculationCustom:l","LegendMouseEventHandler:o","LegendMouseButtonEventHandler:q","DataLegendRowFormatHandler:s","DataLegendContent:v","DataLegendRowInfo:w","ItemLegend:ab","Legend:ac","LegendBase:af","FinancialLegend:ag","ScaleLegend:ah","DataLegendView:ai","ItemLegendView:aj","LegendBaseView:ak","LegendView:al","FinancialLegendView:am","ScaleLegendView:an"]);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;$d("LegendOrientation:ad",false,false,{Horizontal:0,Vertical:1});$d("DataLegendUnitsMode:aa",false,false,{Automatic:0,None:1});$d("DataAbbreviationMode:x",false,false,{Automatic:0,Independent:1,Shared:2,Kilo:3,Million:4,Billion:5,Trillion:6,Quadrillion:7,Unset:8,None:9});$d("DataLegendSummaryType:t",false,false,{Automatic:0,Total:1,Average:2,Min:3,Max:4,Custom:5,None:6});$c("LegendBaseViewManager:b","Object",{a:null,init:function(a){this.d=false;$.ig.$op.init.call(this);this.a=a;this._f=new $$4.h($.ig.$op.$type,$$1.$i.$type,0)},p:function(){var a=$.ig.LegendItemHelper.prototype.b();if(window.devicePixelRatio!=window.undefined&&($.ig.util.isNaN(a)||window.devicePixelRatio!=a)){$.ig.LegendItemHelper.prototype.b(window.devicePixelRatio);this.a.al()}},u:function(){},s:function(){this.p()},t:function(a){if(a==null){this._l=null;this._g=null;return}this._g=a;this._l=this.i();this._l.addClass(this.a._s);this._g.append(this._l)},i:function(){return this._g.createElement("table")},_l:null,_g:null,d:false,h:function(){var a=this._g.createElement("tr");a.addClass(this.a._t);var b=this.a.k();if(b){a.setStyleProperty("display","block");a.setStyleProperty("float","left");a.setStyleProperty("margin","0px");a.setStyleProperty("margin-right","8px")}return a},j:function(a){return this.k(a,this._l)},k:function(a,b){var c=$b($$a.$g.$type,a);var d=this.h();if(c!=null){var e=$b($.ig.ILegendContext.prototype.$type,c.content());if(e!=null&&c._ah!=null){var f=new $$a.l;f.context=d;f.passID="LegendItem";var g=new $$a.m;g.passInfo=f;g.width=NaN;g.height=NaN;g.data=e;g.context=d;var h=new $$a.n;h.passInfo=f;if(c._ah.measure()!=null){c._ah.measure()(g)}h.context=this._g.getSubRenderer(d);h.availableWidth=g.width;h.availableHeight=g.height;h.data=e;h.xPosition=0;h.yPosition=0;c._ah.render()(h);var i=d.findByClass(".ui-legend-item-badge");for(var j=0;j<i.length;j++){i[j].removeClass("ui-legend-item-badge").addClass(this.a._r)}i=d.findByClass(".ui-legend-item-text");for(var k=0;k<i.length;k++){if(this.a.k()){i[k].setStyleProperty("white-space","nowrap")}i[k].removeClass("ui-legend-item-text").addClass(this.a._u)}}}return d},_f:null,o:function(a,b){var c=this.k(a,this._l);c.listen("mouseup",this.a.ae.runOn(this.a));c.listen("mousedown",this.a.ab.runOn(this.a));c.listen("mouseleave",this.a.ac.runOn(this.a));c.listen("mousemove",this.a.ad.runOn(this.a));this._f.add(a,c);if(this._l.getChildCount()==0||b>=this._l.getChildCount()){this._l.append(c)}else{var d=this._l.getChildAt(b);d.before(c)}},w:function(a){},x:function(a){var $self=this;var b;if(function(){var c=$self._f.tryGetValue(a,b);b=c.p1;return c.ret}()){b.unlistenAll();b.remove();this._f.remove(a)}},n:function(visual_){var a=this._f.getEnumerator();while(a.moveNext()){var pair_=a.current();if(pair_.value().getNativeElement()===visual_){return pair_.key()}}return null},e:function(a){var c=this._f.keys().getEnumerator();while(c.moveNext()){var b=c.current();var d=$b($$a.$g.$type,b);if(d!=null&&d.content()!=null){var e=$b($.ig.ILegendContext.prototype.$type,d.content());if(e!=null&&e.itemLabel()==a.itemLabel()&&e.legendLabel()==a.legendLabel()&&e.series()==a.series()&&e.itemBrush()==a.itemBrush()){return true}}}return false},_m:null,_c:null,b:function(a){var b=this._g.rootWrapper().width();var c=this._g.rootWrapper().height();this._l.remove();var d=this._g.createElement("div");d.setStyleProperty("position","relative");this._m=this._g.createElement('<canvas style="position : absolute; top : 0; left : 0" />');this._m.setStyleProperty("position","absolute");this._m.setStyleProperty("top","0px");this._m.setStyleProperty("left","0px");this._g.append(d);d.append(this._m);this._c=new $.ig.RenderingContext(new $.ig.CanvasViewRenderer,this._g.get2DCanvasContext(this._m));this._m.setAttribute("width",b.toString());this._m.setAttribute("height",c.toString());return this._c},ab:function(){return new $$a.af(1,this._g.rootWrapper().width(),Math.max(10,this._g.rootWrapper().height()-15))},y:function(a,b,c,d){var e=a.g();e.beginPath();e.moveTo(b._ak.__inner[0].__x,b._ak.__inner[0].__y);for(var f=1;f<b._ak.count();f++){e.lineTo(b._ak.__inner[f].__x,b._ak.__inner[f].__y)}e.lineTo(b._ak.__inner[0].__x,b._ak.__inner[0].__y);var g=e.createLinearGradient(d.left(),d.top(),d.left(),d.top()+d.height());var i=c._a.getEnumerator();while(i.moveNext()){var h=i.current();g.addColorStop(h._a,h._b.__fill)}e.fillStyle=g;e.fill()},q:function(){},r:function(){},v:function(a){var b=this._l==null?0:this._l.getChildCount();for(var c=0;c<b;c++){var d=this._l.getChildAt(c);d.setStyleProperty("display",a?"block":"");d.setStyleProperty("float",a?"left":"");d.setStyleProperty("margin",a?"0px":"");d.setStyleProperty("margin-right",a?"8px":"");d.getChildAt(1).setStyleProperty("white-space",a?"nowrap":"")}},z:function(a){this._l.setStyleProperty("color",a)},aa:function(a){var b=$.ig.FontUtil.prototype.getFontInfoFromString(this._g,a);this._l.setStyleProperty("font-family",b.n());this._l.setStyleProperty("font-size",b.d()+"px");this._l.setStyleProperty("font-style",b.q())},$type:new $.ig.Type("LegendBaseViewManager",$.ig.$ot)},true);$c("FinancialLegendViewManager:a","LegendBaseViewManager",{init:function(a){$$t.$b.init.call(this,a)},i:function(){if(this._g==null){return null}var a=this._g.createElement("div");return a},h:function(){if(this._g==null){return null}var a=this._g.createElement("span");a.setStyleProperty("display","inline-block");a.setStyleProperty("padding","5px 2px 5px 2px");a.setStyleProperty("margin","2px");return a},$type:new $.ig.Type("FinancialLegendViewManager",$$t.$b.$type)},true);$c("XamDataLegend:c","Control",{calculateSummaryValue:null,formatHeaderRow:null,formatSeriesRow:null,formatSummaryRow:null,dp:function(a){var b=this.ap(a);var c=a._i;var d=!$.ig.util.isNaN(c);if(d){if(this._aj!=null){b.valueText(this._aj.i(c))}else{var e=this.cf();var f=this.ak(c,8,-1,-1);b.valueText(f._d);b.unitsText(f._c+e)}}else{b.valueText(String.empty());b.unitsText(String.empty())}if(this.formatSummaryRow!=null){this.formatSummaryRow(this,b)}this.dm(a,b)},dn:function(a){var b=this.ap(a);var c=a._i;var d=!$.ig.util.isNaN(c);if(d){var e=this.ak(c,8,-1,-1);b.valueText(e._d);b.unitsText(e._c+a._p)}else{b.valueText(String.empty());b.unitsText(String.empty())}if(this.formatSeriesRow!=null){this.formatSeriesRow(this,b)}this.dm(a,b)},dl:function(a){var b=this.ap(a);var c=a._i;var d=!$.ig.util.isNaN(c);if(d){var e=this.ak(c,8,-1,-1);b.valueText(e._d);b.unitsText(e._c+a._p)}if(this.formatHeaderRow!=null){this.formatHeaderRow(this,b)}this.dm(a,b)},ap:function(a){var b=new $$t.r;b.actualValue(a._i);b.titleText(a._o);b.titleTextColor(a._s);b.titleTextFont(a._a);b.valueText(a._q);b.valueTextColor(a._u);b.valueTextFont(a._c);b.unitsText(a._p);b.unitsTextColor(a._t);b.unitsTextFont(a._b);b.isBadgeVisible(a._d);b.isRowVisible(a._f);b.seriesIndex(a._m);return b},dm:function(a,b){a._o=b.titleText();a._s=b.titleTextColor();a._a=b.titleTextFont();a._q=b.valueText();a._u=b.valueTextColor();a._c=b.valueTextFont();a._p=b.unitsText();a._t=b.unitsTextColor();a._b=b.unitsTextFont();a._d=b.isBadgeVisible();a._f=b.isRowVisible();a._m=b.seriesIndex()},propertyChanged:null,dt:function(a,b,c){var $self=this;switch(a){case"Target":this.dr(b,c);break;case"TargetCursorPositionX":this.bk(this.targetCursorPositionX());break;case"TargetCursorPositionY":this.bl(this.targetCursorPositionY());break;case"SummaryValueFormat":case"SummaryValueFormatSpecifiers":if(this.summaryValueFormat()!=null){this._aj=function(){var $ret=new $.ig.BindingFormatter;$ret.j($self.summaryValueFormat());$ret.d($self.summaryValueFormatSpecifiers());return $ret}()}else{this._aj=null}break;case"ActualPixelScalingRatio":this._ax.at(c);break}this.dv()},dq:function(a,b,c){this.dt(a,b,c);if(this.propertyChanged!=null){this.propertyChanged(this,new $$0.b7(a))}},dr:function(a,b){if(a!=null){a.detachDataLegend(this)}if(b!=null){b.attachDataLegend(this)}},notifyCursorPositionChanged:function(a){if($.ig.util.isNaN(this.targetCursorPositionX())&&$.ig.util.isNaN(this.targetCursorPositionY())){this.bk(a.__x);this.bl(a.__y)}},notifySizeChanged:function(){this._ax.ar()},notifyVisualPropertiesChanged:function(a){},notifySeriesCollectionChanged:function(){this.dv()},_actualAbbreviationMode:0,actualAbbreviationMode:function(a){if(arguments.length===1){this._actualAbbreviationMode=a;return a}else{return this._actualAbbreviationMode}},formatAbbreviationMode:function(a){if(arguments.length===1){this.h($$t.$c.formatAbbreviationModeProperty,$$t.$x.getBox(a));return a}else{return $g(this.c($$t.$c.formatAbbreviationModeProperty))}},formatMaximumDigits:function(a){if(arguments.length===1){this.h($$t.$c.formatMaximumDigitsProperty,a);return a}else{return $h(this.c($$t.$c.formatMaximumDigitsProperty))}},formatMinimumDigits:function(a){if(arguments.length===1){this.h($$t.$c.formatMinimumDigitsProperty,a);return a}else{return $h(this.c($$t.$c.formatMinimumDigitsProperty))}},headerText:function(a){if(arguments.length===1){this.h($$t.$c.headerTextProperty,a);return a}else{return this.c($$t.$c.headerTextProperty)}},headerTextColor:function(a){if(arguments.length===1){this.h($$t.$c.headerTextColorProperty,a);return a}else{return this.c($$t.$c.headerTextColorProperty)}},az:null,headerTextFont:function(a){if(arguments.length===1){var b=this.az;this.az=a;if(b!=this.az){this.dq("HeaderTextFont",b,this.az)}return a}else{return this.az}},summaryTextColor:function(a){if(arguments.length===1){this.h($$t.$c.summaryTextColorProperty,a);return a}else{return this.c($$t.$c.summaryTextColorProperty)}},a3:null,summaryTextFont:function(a){if(arguments.length===1){var b=this.a3;this.a3=a;if(b!=this.a3){this.dq("SummaryTextFont",b,this.a3)}return a}else{return this.a3}},summaryValueColor:function(a){if(arguments.length===1){this.h($$t.$c.summaryValueColorProperty,a);return a}else{return this.c($$t.$c.summaryValueColorProperty)}},a4:null,summaryValueFont:function(a){if(arguments.length===1){var b=this.a4;this.a4=a;if(b!=this.a4){this.dq("SummaryValueFont",b,this.a4)}return a}else{return this.a4}},summaryType:function(a){if(arguments.length===1){this.h($$t.$c.summaryTypeProperty,$$t.$t.getBox(a));return a}else{return $g(this.c($$t.$c.summaryTypeProperty))}},summaryValueFormat:function(a){if(arguments.length===1){this.h($$t.$c.summaryValueFormatProperty,a);return a}else{return this.c($$t.$c.summaryValueFormatProperty)}},summaryValueFormatSpecifiers:function(a){if(arguments.length===1){this.h($$t.$c.summaryValueFormatSpecifiersProperty,a);return a}else{return this.c($$t.$c.summaryValueFormatSpecifiersProperty)}},_aj:null,summaryText:function(a){if(arguments.length===1){this.h($$t.$c.summaryTextProperty,a);return a}else{return this.c($$t.$c.summaryTextProperty)}},rowMargin:function(a){if(arguments.length===1){this.h($$t.$c.rowMarginProperty,a);return a}else{return this.c($$t.$c.rowMarginProperty)}},columnSpacing:function(a){if(arguments.length===1){this.h($$t.$c.columnSpacingProperty,a);return a}else{return this.c($$t.$c.columnSpacingProperty)}},badgeMargin:function(a){if(arguments.length===1){this.h($$t.$c.badgeMarginProperty,a);return a}else{return this.c($$t.$c.badgeMarginProperty)}},seriesTitleMargin:function(a){if(arguments.length===1){this.h($$t.$c.seriesTitleMarginProperty,a);return a}else{return this.c($$t.$c.seriesTitleMarginProperty)}},seriesValueMargin:function(a){if(arguments.length===1){this.h($$t.$c.seriesValueMarginProperty,a);return a}else{return this.c($$t.$c.seriesValueMarginProperty)}},bg:0,bk:function(a){if(arguments.length===1){var b=this.bg;this.bg=a;if(b!=this.bg){this.dq("ActualCursorPositionX",b,this.bg)}return a}else{return this.bg}},bh:0,bl:function(a){if(arguments.length===1){var b=this.bh;this.bh=a;if(b!=this.bh){this.dq("ActualCursorPositionY",b,this.bh)}return a}else{return this.bh}},targetCursorPositionX:function(a){if(arguments.length===1){this.h($$t.$c.targetCursorPositionXProperty,a);return a}else{return this.c($$t.$c.targetCursorPositionXProperty)}},targetCursorPositionY:function(a){if(arguments.length===1){this.h($$t.$c.targetCursorPositionYProperty,a);return a}else{return this.c($$t.$c.targetCursorPositionYProperty)}},targetAxisValue:function(a){if(arguments.length===1){this.h($$t.$c.targetAxisValueProperty,a);return a}else{return this.c($$t.$c.targetAxisValueProperty)}},target:function(a){if(arguments.length===1){this.h($$t.$c.targetProperty,a);return a}else{return this.c($$t.$c.targetProperty)}},seriesUnitsMode:function(a){if(arguments.length===1){this.h($$t.$c.seriesUnitsModeProperty,$$t.$aa.getBox(a));return a}else{return $g(this.c($$t.$c.seriesUnitsModeProperty))}},seriesUnitsText:function(a){if(arguments.length===1){this.h($$t.$c.seriesUnitsTextProperty,a);return a}else{return this.c($$t.$c.seriesUnitsTextProperty)}},seriesUnitsColor:function(a){if(arguments.length===1){this.h($$t.$c.seriesUnitsColorProperty,a);return a}else{return this.c($$t.$c.seriesUnitsColorProperty)}},a1:null,seriesUnitsFont:function(a){if(arguments.length===1){var b=this.a1;this.a1=a;if(b!=this.a1){this.dq("SeriesUnitsFont",b,this.a1)}return a}else{return this.a1}},seriesValueColor:function(a){if(arguments.length===1){this.h($$t.$c.seriesValueColorProperty,a);return a}else{return this.c($$t.$c.seriesValueColorProperty)}},a2:null,seriesValueFont:function(a){if(arguments.length===1){var b=this.a2;this.a2=a;if(b!=this.a2){this.dq("SeriesValueFont",b,this.a2)}return a}else{return this.a2}},seriesTitleColor:function(a){if(arguments.length===1){this.h($$t.$c.seriesTitleColorProperty,a);return a}else{return this.c($$t.$c.seriesTitleColorProperty)}},a0:null,seriesTitleFont:function(a){if(arguments.length===1){var b=this.a0;this.a0=a;if(b!=this.a0){this.dq("SeriesTitleFont",b,this.a0)}return a}else{return this.a0}},bj:0,pixelScalingRatio:function(a){if(arguments.length===1){var b=this.bj;this.bj=a;this.dq("PixelScalingRatio",b,this.bj);return a}else{return this.bj}},bi:0,actualPixelScalingRatio:function(a){if(arguments.length===1){var b=this.bi;this.bi=a;this.dq("ActualPixelScalingRatio",b,this.bi);return a}else{return this.bi}},init:function(){this.az=null;this.a3=null;this.a4=null;this.bg=NaN;this.bh=NaN;this.a1=null;this.a2=null;this.a0=null;this.bj=NaN;this.bi=1;this.bb=false;this.bc=false;this.ao=new $$t.v;this.bf=new $$4.h($$0.$aw.$type,Number,0);this.bv="";$$a.$f.init.call(this);this._ez=$$a.$ae.empty();this._ab=$$t.$c.$type;this._ax=this.aw()},_ax:null,aw:function(){return new $$t.ai(this)},_ez:null,destroy:function(){this.provideContainer(null)},_externalObject:null,externalObject:function(a){if(arguments.length===1){this._externalObject=a;return a}else{return this._externalObject}},flush:function(){this._ax.ai()},onAttachedToUI:function(){this._ax.ap()},onDetachedFromUI:function(){this._ax.as()},provideContainer:function(a){this._ax.aq(a)},bb:false,dv:function(){if(this.bb){return}this.bb=this._ax.s()},bc:false,shouldOnDemandRender:function(a){if(arguments.length===1){this.bc=a;return a}else{return this.bc}},doRender:function(a,b){if(this._ez.isEmpty()){var c=this.getDesiredSize();this._ez=new $$a.ae(0,0,0,c.width(),c.height())}this.dw(this.ao,true);this._ax.av(a,b)},ensureUpdated:function(){var a=this.getDesiredSize()},dd:function(){if(!this.bb){if(this.ao==null){this.dv()}else{return}}this.d2()},getDesiredSize:function(){this.dd();if(this.ao==null){return new $$a.af(1,0,0)}return new $$a.af(1,this.ao._d,this.ao._c)},d2:function(){if(this.target()==null){this.da();return}var a=this.target();var b=a.getDataLegendSeries();this.df(b)},dc:function(){this.bb=false;var a=new $$a.af(1,0,0);if(this.ao!=null){a=new $$a.af(1,this.ao._d,this.ao._c)}this.d2();var b=new $$a.af(1,0,0);if(this.ao!=null){b=new $$a.af(1,this.ao._d,this.ao._c)}if(!a.equals(b)){this._ax.af(b.width(),b.height())}this.dw(this.ao,this.bc)},dg:function(a){},dw:function(a,b){var c=new $$t.u;for(var d=0;d<a.b().count();d++){var e=a.b().__inner[d];this.dy(a,e,c)}this._ax._m.count(c._a);this._ax._n.count(c._b);this._ax._p.count(c._d);if(this.seriesUnitsMode()!=1){this._ax._o.count(c._c)}if(!b){this._ax.ah(a)}},dy:function(a,b,c){if(b._l>0&&b._k>0&&!b._e&&!b._h){var d=this._ax._m.item(c._a);c._a+=1;this.dx(d,a,b,c)}if(!b._w.isEmpty()&&b._w.width()>0&&b._w.height()>0){var e=this._ax._n.item(c._b);c._b+=1;this.dz(e,a,b,c)}if(!b._y.isEmpty()&&b._y.width()>0&&b._y.height()>0){var f=this._ax._p.item(c._d);c._d+=1;this.d1(f,a,b,c)}if(this.seriesUnitsMode()!=1){if(!b._x.isEmpty()&&b._x.width()>0&&b._x.height()>0){var g=this._ax._o.item(c._c);c._c+=1;this.d0(g,a,b,c)}}},d1:function(a,b,c,d){a.ak(c._q);this._ax.aw(a,c._y.left(),c._y.top());this._ax.ag(a,c._c);a._am=c._u},d0:function(a,b,c,d){a.ak(c._p);this._ax.aw(a,c._x.left(),c._x.top());this._ax.ag(a,c._b);a._am=c._t},dz:function(a,b,c,d){a.ak(c._o);this._ax.aw(a,c._w.left(),c._w.top());this._ax.ag(a,c._a);a._am=c._s},dx:function(a,b,c,d){a._ah=c._r;a.content(c._n);a.width(c._l);a.height(c._k);this._ax.aw(a,c._v.left(),c._v.top())},an:function(){var a=this.formatAbbreviationMode();if(a==8){a=2}if(a==0){a=2}if(a==2){var b=new $$4.x($$t.$y.$type,0);for(var c=0;c<this.ag.length;c++){var d=this.bp(this.ag[c],c);if(!$.ig.util.isNaN(d)){var e=this.ak(d,1,-1,-1);b.add(e)}}if(b.count()>1){b.sort2(function(f,g){return $w(f._b,g._b)});var f=$.ig.truncate(Math.floor(b.count()/2));a=b.__inner[f]._a}else{a=1}}return a},ao:null,ag:null,df:function(a){this.ao.f();this.ag=a;this.actualAbbreviationMode(this.an());this.c6(this.ao,a);for(var b=0;b<a.length;b++){this.c7(this.ao,a[b],b)}this.c8(this.ao,a);this.c9(this.ao)},c9:function(a){var b=0;var c=0;for(var d=0;d<a.b().count();d++){var e=a.b().__inner[d];this.dh(e)}var f=new $$a.af(1,0,0);var g=new $$a.af(1,0,0);var h=new $$a.af(1,0,0);var i=new $$a.af(1,0,0);for(var j=0;j<a.b().count();j++){var k=a.b().__inner[j];i=this.e1(i,k);f=this.e2(f,k);g=this.e4(g,k);if(this.seriesUnitsMode()!=1){h=this.e3(g,k)}}var l=0;var m=0;for(var n=0;n<a.b().count();n++){var o=a.b().__inner[n];var p=this.e0(m,o,l,f,g,h,i);m=p.height();l=Math.max(l,p.width())}c=m;b=l;a._d=b;a._c=c},e1:function(a,b){var c=new $$a.af(1,b._l,b._k);var d=b._ac;return new $$a.af(1,Math.max(c.width()+d._c+d._d,a.width()),Math.max(c.height()+d._e+d._b,a.height()))},e0:function(a,b,c,d,e,f,g){var h=0;var i=0;i=Math.max(b._k,i);i=Math.max(b._z.height(),i);i=Math.max(b._ab.height(),i);if(this.seriesUnitsMode()!=1){i=Math.max(b._aa.height(),i)}h+=b._ad._c;a+=b._ad._e;if(!b._e&&!b._h){h+=b._ac._c;var j=0;if(i>b._k){j=(i-b._k)/2}b._v=new $$a.ae(0,h,a+j,b._l,b._k);h+=b._v.width()+b._ac._d}else{b._v=new $$a.ae(0,0,0,0,0)}h+=b._ae._c;var k=0;if(i>b._z.height()){k=(i-b._z.height())/2}b._w=new $$a.ae(0,h,a+k,b._z.width(),b._z.height());h+=b._w.width();h+=d.width()-(b._z.width()+b._ae._c);if(b._e||b._h){h+=g.width()}h+=e.width()-(b._ab.width()+b._ag._c+b._ag._d);if(!b._y.isEmpty()&&b._y.width()>0&&b._y.height()>0){h+=b._j}var l=0;if(i>b._ab.height()){l=(i-b._ab.height())/2}b._y=new $$a.ae(0,h,a+l,b._ab.width(),b._ab.height());h+=b._y.width();if(this.seriesUnitsMode()!=1&&!String.isNullOrEmpty(b._p)){h+=b._af._c;if(!b._x.isEmpty()&&b._x.width()>0&&b._x.height()>0){h+=b._j}var m=0;if(i>b._aa.height()){m=(i-b._aa.height())/2}b._x=new $$a.ae(0,h,a+m,b._aa.width(),b._aa.height());h+=b._x.width();h+=b._af._d}h+=b._ad._d;a+=i;a+=b._ad._b;return new $$a.af(1,h,a)},e4:function(a,b){var c=b._ab;var d=b._ag;return new $$a.af(1,Math.max(c.width()+d._c+d._d,a.width()),Math.max(c.height()+d._e+d._b,a.height()))},e3:function(a,b){var c=b._aa;var d=b._af;return new $$a.af(1,Math.max(c.width()+d._c+d._d,a.width()),Math.max(c.height()+d._e+d._b,a.height()))},e2:function(a,b){var c=b._z;var d=b._ae;return new $$a.af(1,Math.max(c.width()+d._c+d._d,a.width()),Math.max(c.height()+d._e+d._b,a.height()))},dh:function(a){if(a._o!=null){var b=this._ax.bf(a._o,a._a);a._z=b}else{a._z=new $$a.af(1,0,0)}if(a._q!=null){var c=this._ax.bf(a._q,a._c);a._ab=c}else{a._ab=new $$a.af(1,0,0)}if(a._p!=null){a._aa=this._ax.bf(a._p,a._b)}else{a._aa=new $$a.af(1,0,0)}},c8:function(a,b){if(this.summaryType()==6){return}var c=this.ah();var d=this.ay();var e=d.calculate(c);var f=function(g){return g!=null?g:e._c}(this.summaryText());var g="";var h="";var i=new $$t.w(this._ax,true,false);i._i=e._b;i._q=g;i._u=this.summaryValueColor()||i._u;i._c=this.summaryValueFont()||i._c;i._o=f;i._s=this.summaryTextColor()||i._s;i._a=this.summaryTextFont()||i._a;i._p=h;i._t=this.summaryValueColor()||i._t;i._b=this.summaryValueFont()||i._b;if(this.summaryTextFont()!=null){i._a=this.summaryTextFont();i._c=this.summaryValueFont();i._b=this.summaryValueFont()}this.dp(i);if(i._f){this.ds(i);a.e(i)}},ak:function(a,b,c,d){if(b==8){b=this.actualAbbreviationMode()}if(c<0){c=this.formatMinimumDigits()}if(d<0){d=this.formatMaximumDigits()}return $$t.$z.a(a,b,c,d)},getAbbreviatedValue:function(a,b,c,d){return this.ak(a,b,c,d)._d},getAbbreviatedSymbol:function(a,b,c,d){return this.ak(a,b,c,d)._c},getAbbreviatedString:function(a,b,c,d){var e=this.ak(a,b,c,d);return e._d+e._c},cf:function(){var a="";if(!String.isNullOrEmpty(this.seriesUnitsText())){a=this.seriesUnitsText()}else{var d=this.ag;for(var c=0;c<d.length;c++){var b=d[c];var e=b.getDataLegendSeriesUnit();if(!String.isNullOrEmpty(e)){a=e}}}return a},ah:function(){var a=new $$4.x(Number,0);for(var b=0;b<this.ag.length;b++){var c=this.ag[b];var d=this.bp(c,b);if(!$.ig.util.isNaN(d)){a.add(d)}}var e=new Array(a.count());for(var f=0;f<a.count();f++){e[f]=a.__inner[f]}return e},ay:function(){switch(this.summaryType()){case 0:case 1:return new $$t.g;case 2:return new $$t.h;case 3:return new $$t.i;case 4:return new $$t.j;case 5:return new $$t.l(this,this.calculateSummaryValue);case 6:return new $$t.k;default:return new $$t.k}},c7:function(a,b,c){var d=this.bp(b,c);var e=function(f){return f!=null?f:b.getDataLegendSeriesUnit()}(this.seriesUnitsText());var f=this.ce(b);var g="";var h=new $$t.w(this._ax,false,false);h._i=d;h._o=f;h._s=this.seriesTitleColor()||h._s;h._a=this.seriesTitleFont()||h._a;h._q=g;h._u=this.seriesValueColor()||h._u;h._c=this.seriesValueFont()||h._c;h._p=e;h._t=this.seriesUnitsColor()||h._t;h._b=this.seriesUnitsFont()||h._b;h._m=c;this.dn(h);if(h._d){var i=this.d3(b);var j=this.bt(b);h._r=i;h._n=j}if(h._f){this.ds(h);a.e(h)}},bt:function(a){return a.getDataLegendBadgeContext()},bf:null,bp:function(a,b){var c=NaN;if(this.bd()){c=a.getDataLegendValueFromCursorPosition(this.bk(),this.bl())}else if(this.be()){c=a.getDataLegendValueFromTargetAxisValue(this.targetAxisValue())}else{c=NaN}if(!$.ig.util.isNaN(c)){if(this.bf.containsKey(b)){this.bf.item(b,c)}else{this.bf.add(b,c)}}else{if(this.bf.containsKey(b)){c=this.bf.item(b)}}return c},be:function(){return this.targetAxisValue()!=null},bd:function(){return!$.ig.util.isNaN(this.bk())&&!$.ig.util.isNaN(this.bl())},d3:function(a){return a.getDataLegendBadge()},ce:function(a){return a.getDataLegendSeriesTitle()},bv:null,c6:function(a,b){var c=this.cd(b);if(c==null){c=this.bv}else{this.bv=c}var d=new $$t.w(this._ax,false,true);d._o=c;d._s=this.headerTextColor()||d._s;d._a=this.headerTextFont()||d._a;d._q="";d._u=this.headerTextColor()||d._u;d._c=this.seriesValueFont()||d._c;d._p="";d._t=this.seriesUnitsColor()||d._t;d._b=this.seriesUnitsFont()||d._b;if(this.headerTextFont()!=null){d._a=this.headerTextFont();d._c=this.headerTextFont();d._b=this.headerTextFont()}this.dl(d);if(d._f){this.ds(d);a.e(d)}},ds:function(a){a._ad=this.rowMargin();a._ae=this.seriesTitleMargin();if(!a._e){a._ag=this.seriesValueMargin();a._af=this.seriesValueMargin()}a._j=this.columnSpacing();if(!a._h){a._ac=this.badgeMargin();a._l=21;a._k=15}},cd:function(a){if(this.headerText()!=null){return this.headerText()}var b=true;var c=null;for(var d=0;d<a.length;d++){var e=a[d];var f=this.cc(e);if(f==null){continue}if(c==null){c=f}else{if(!c.equals(f)){b=false;break}}}if(b){return c}return null},cc:function(a){if(this.bd()){var b=a.getDataLegendAxisLabelFromCursorPosition(this.bk(),this.bl());return b==null?"":b.toString()}else if(this.be()){var c=a.getDataLegendAxisLabelFromTargetAxisValue(this.targetAxisValue());return c==null?"":c.toString()}else{return null}},da:function(){},$type:new $.ig.Type("XamDataLegend",$$a.$f.$type,[$$0.$b6.$type,$.ig.IDataLegend.prototype.$type,$.ig.IOnDemandRender.prototype.$type])},true);$c("DataLegendSummaryCalculationEventArgs:d","EventArgs",{init:function(a){$$0.$w.init.call(this);this.data(a)},_data:null,data:function(a){if(arguments.length===1){this._data=a;return a}else{return this._data}},_summaryText:null,summaryText:function(a){if(arguments.length===1){this._summaryText=a;return a}else{return this._summaryText}},_summaryValue:0,summaryValue:function(a){if(arguments.length===1){this._summaryValue=a;return a}else{return this._summaryValue}},$type:new $.ig.Type("DataLegendSummaryCalculationEventArgs",$$0.$w.$type)},true);$c("IDataLegendSummaryCalculation:f","Object",{$type:new $.ig.Type("IDataLegendSummaryCalculation",null)},true);$c("DataLegendSummaryCalculationTotal:g","Object",{init:function(){$.ig.$op.init.call(this)},calculate:function(a){if(a.length==0){return $$t.$m.a}var b=0;for(var c=0;c<a.length;c++){b+=a[c]}return new $$t.m("Total",b)},$type:new $.ig.Type("DataLegendSummaryCalculationTotal",$.ig.$ot,[$$t.$f.$type])},true);$c("DataLegendSummaryCalculationAverage:h","Object",{init:function(){$.ig.$op.init.call(this)},calculate:function(a){if(a.length==0){return $$t.$m.a}var b=0;for(var c=0;c<a.length;c++){b+=a[c]}var d=b/a.length;return new $$t.m("Average",d)},$type:new $.ig.Type("DataLegendSummaryCalculationAverage",$.ig.$ot,[$$t.$f.$type])},true);$c("DataLegendSummaryCalculationMin:i","Object",{init:function(){$.ig.$op.init.call(this)},calculate:function(a){if(a.length==0){return $$t.$m.a}var b=$.ig.MathUtil.prototype.k(a);return new $$t.m("Min",b)},$type:new $.ig.Type("DataLegendSummaryCalculationMin",$.ig.$ot,[$$t.$f.$type])},true);$c("DataLegendSummaryCalculationMax:j","Object",{init:function(){$.ig.$op.init.call(this)},calculate:function(a){if(a.length==0){return $$t.$m.a}var b=$.ig.MathUtil.prototype.h(a);return new $$t.m("Max",b)},$type:new $.ig.Type("DataLegendSummaryCalculationMax",$.ig.$ot,[$$t.$f.$type])},true);$c("DataLegendSummaryCalculationEmpty:k","Object",{init:function(){$.ig.$op.init.call(this)},calculate:function(a){return $$t.$m.a},$type:new $.ig.Type("DataLegendSummaryCalculationEmpty",$.ig.$ot,[$$t.$f.$type])},true);$c("DataLegendSummaryCalculationCustom:l","Object",{b:null,a:null,init:function(a,b){$.ig.$op.init.call(this);this.b=a;this.a=b},calculate:function(a){if(this.a==null){return $$t.$m.a}var b=new $$t.d(a);this.a(this.b,b);return new $$t.m(b.summaryText(),b.summaryValue())},$type:new $.ig.Type("DataLegendSummaryCalculationCustom",$.ig.$ot,[$$t.$f.$type])},true);$c("DataLegendSummaryResult:m","Object",{init:function(a,b){$.ig.$op.init.call(this);this._c=a;this._b=b},_c:null,_b:0,$type:new $.ig.Type("DataLegendSummaryResult",$.ig.$ot)},true);$c("LegendMouseEventArgs:n","EventArgs",{init:function(a,b,c,d,e){$$0.$w.init.call(this);this.chart(a);this.series(b);this.item(c);this.originalEvent(d);this.legendItem(e)},toString:function(){return this.chart().name()+", "+this.series().name()+", "+(this.item()!=null?this.item().toString():"")+", "+this.getPosition(null).toString()},_originalEvent:null,originalEvent:function(a){if(arguments.length===1){this._originalEvent=a;return a}else{return this._originalEvent}},getPosition:function(a){return this.originalEvent().getPosition(a)},originalSource:function(){return this.originalEvent().originalSource()},_item:null,item:function(a){if(arguments.length===1){this._item=a;return a}else{return this._item}},_series:null,series:function(a){if(arguments.length===1){this._series=a;return a}else{return this._series}},d:function(){return $b($.ig.ILegendSeriesInternal.prototype.$type,this.series())},_chart:null,chart:function(a){if(arguments.length===1){this._chart=a;return a}else{return this._chart}},_legendItem:null,legendItem:function(a){if(arguments.length===1){this._legendItem=a;return a}else{return this._legendItem}},$type:new $.ig.Type("LegendMouseEventArgs",$$0.$w.$type)},true);$c("LegendMouseButtonEventArgs:p","EventArgs",{init:function(a,b,c,d,e){$$0.$w.init.call(this);this.chart(a);this.series(b);this.item(c);this.originalEvent(d);this.legendItem(e)},toString:function(){return this.chart().name()+", "+this.series().name()+", "+(this.item()!=null?this.item().toString():"")+", "+this.getPosition(null).toString()},_originalEvent:null,originalEvent:function(a){if(arguments.length===1){this._originalEvent=a;return a}else{return this._originalEvent}},handled:function(a){if(arguments.length===1){this.originalEvent().handled(a);return a}else{return this.originalEvent().handled()}},getPosition:function(a){return this.originalEvent().getPosition(a)},originalSource:function(){return this.originalEvent().originalSource()},_item:null,item:function(a){if(arguments.length===1){this._item=a;return a}else{return this._item}},_series:null,series:function(a){if(arguments.length===1){this._series=a;return a}else{return this._series}},d:function(){return $b($.ig.ILegendSeriesInternal.prototype.$type,this.series())},_chart:null,chart:function(a){if(arguments.length===1){this._chart=a;return a}else{return this._chart}},_legendItem:null,legendItem:function(a){if(arguments.length===1){this._legendItem=a;return a}else{return this._legendItem}},$type:new $.ig.Type("LegendMouseButtonEventArgs",$$0.$w.$type)},true);$c("DataLegendRowFormatEventArgs:r","EventArgs",{init:function(){$$0.$w.init.call(this);this.isBadgeVisible(true);this.isRowVisible(true);this.seriesIndex(-1)},_isBadgeVisible:false,isBadgeVisible:function(a){if(arguments.length===1){this._isBadgeVisible=a;return a}else{return this._isBadgeVisible}},_isRowVisible:false,isRowVisible:function(a){if(arguments.length===1){this._isRowVisible=a;return a}else{return this._isRowVisible}},_actualValue:0,actualValue:function(a){if(arguments.length===1){this._actualValue=a;return a}else{return this._actualValue;
}},_titleText:null,titleText:function(a){if(arguments.length===1){this._titleText=a;return a}else{return this._titleText}},_valueText:null,valueText:function(a){if(arguments.length===1){this._valueText=a;return a}else{return this._valueText}},_unitsText:null,unitsText:function(a){if(arguments.length===1){this._unitsText=a;return a}else{return this._unitsText}},_seriesIndex:0,seriesIndex:function(a){if(arguments.length===1){this._seriesIndex=a;return a}else{return this._seriesIndex}},_titleTextColor:null,titleTextColor:function(a){if(arguments.length===1){this._titleTextColor=a;return a}else{return this._titleTextColor}},_unitsTextColor:null,unitsTextColor:function(a){if(arguments.length===1){this._unitsTextColor=a;return a}else{return this._unitsTextColor}},_valueTextColor:null,valueTextColor:function(a){if(arguments.length===1){this._valueTextColor=a;return a}else{return this._valueTextColor}},_unitsTextFont:null,unitsTextFont:function(a){if(arguments.length===1){this._unitsTextFont=a;return a}else{return this._unitsTextFont}},_valueTextFont:null,valueTextFont:function(a){if(arguments.length===1){this._valueTextFont=a;return a}else{return this._valueTextFont}},_titleTextFont:null,titleTextFont:function(a){if(arguments.length===1){this._titleTextFont=a;return a}else{return this._titleTextFont}},$type:new $.ig.Type("DataLegendRowFormatEventArgs",$$0.$w.$type)},true);$c("DataLegendRenderContext:u","Object",{init:function(){$.ig.$op.init.call(this);this._a=0;this._b=0;this._d=0;this._c=0},_a:0,_b:0,_d:0,_c:0,$type:new $.ig.Type("DataLegendRenderContext",$.ig.$ot)},true);$c("DataLegendContent:v","Object",{init:function(){this.a=new $$4.x($$t.$w.$type,0);$.ig.$op.init.call(this)},a:null,b:function(){return this.a},_d:0,_c:0,f:function(){this.b().clear()},e:function(a){this.b().add(a)},$type:new $.ig.Type("DataLegendContent",$.ig.$ot)},true);$c("DataLegendRowInfo:w","Object",{init:function(a,b,c){this._z=new $$a.af;this._ab=new $$a.af;this._aa=new $$a.af;$.ig.$op.init.call(this);this._m=-1;this._i=NaN;this._h=b;this._e=c;this._g=!c&&!b;this._d=true;this._f=true;this._ad=new $$a.ah(0,0);this._ac=new $$a.ah(0,0);this._ae=new $$a.ah(0,0);this._ag=new $$a.ah(0,0);this._af=new $$a.ah(0,0);this._j=0;this._k=0;this._l=0;this._z=new $$a.af(1,0,0);this._ab=new $$a.af(1,0,0);this._aa=new $$a.af(1,0,0);if(this._g){this._s=a.bc();this._u=a.be();this._t=a.bd();this._a=a.j();this._c=a.l();this._b=a.k()}else if(this._h){var d=a.bb();var e=a.i();this._s=d;this._u=d;this._t=d;this._a=e;this._c=e;this._b=e}else{var f=a.ba();var g=a.h();this._s=f;this._u=f;this._t=f;this._a=g;this._c=g;this._b=g}this._w=$$a.$ae.empty();this._y=$$a.$ae.empty();this._x=$$a.$ae.empty();this._v=$$a.$ae.empty()},_m:0,_h:false,_e:false,_g:false,_d:false,_f:false,_i:0,_o:null,_q:null,_p:null,_s:null,_t:null,_u:null,_a:null,_c:null,_b:null,_r:null,_l:0,_k:0,_ad:null,_ac:null,_ae:null,_ag:null,_af:null,_j:0,_z:null,_ab:null,_aa:null,_w:null,_y:null,_v:null,_x:null,_n:null,$type:new $.ig.Type("DataLegendRowInfo",$.ig.$ot)},true);$c("DataAbbreviation:y","Object",{init:function(a){if(a>0){switch(a){case 1:this.init1.apply(this,arguments);break}return}$.ig.$op.init.call(this);this._a=9;this._b=1},init1:function(a,b,c,d,e){$.ig.$op.init.call(this);this._a=e;this._b=d;this._d=b;this._c=c},_a:0,_d:null,_c:null,_b:0,$type:new $.ig.Type("DataAbbreviation",$.ig.$ot)},true);$c("DataAbbreviator:z","Object",{init:function(){$.ig.$op.init.call(this)},d:function(a,b,c){if(b>0){return $4("{0:N"+b+"}",a)}else if(c>0){return Math.round10N(a,c).toString()}else{return Math.round10N(a,1).toString()}},a:function(a,b,c,d){if($$t.$z.c==null){$$t.$z.c=function(){var $ret=new $$4.x($$t.$y.$type,0);$ret.add(function(){var $ret=new $$t.y(0);$ret._a=7;$ret._c="Q";$ret._b=1e15;return $ret}());$ret.add(function(){var $ret=new $$t.y(0);$ret._a=6;$ret._c="T";$ret._b=1e12;return $ret}());$ret.add(function(){var $ret=new $$t.y(0);$ret._a=5;$ret._c="B";$ret._b=1e9;return $ret}());$ret.add(function(){var $ret=new $$t.y(0);$ret._a=4;$ret._c="M";$ret._b=1e6;return $ret}());$ret.add(function(){var $ret=new $$t.y(0);$ret._a=3;$ret._c="K";$ret._b=1e3;return $ret}());$ret.add(function(){var $ret=new $$t.y(0);$ret._a=9;$ret._c="";$ret._b=1;return $ret}());return $ret}();$$t.$z.b=new $$4.h($$t.$x.$type,$$t.$y.$type,0);var f=$$t.$z.c.getEnumerator();while(f.moveNext()){var e=f.current();$$t.$z.b.add(e._a,e)}}if(b==1){var g=Math.abs(a);for(var h=0;h<$$t.$z.c.count();h++){var i=$$t.$z.c.__inner[h];if(g>=i._b){var j=$$t.$z.d(a/i._b,c,d);return new $$t.y(1,j,i._c,i._b,i._a)}}}else if(b==9){var k=$$t.$z.d(a,c,d);return function(){var $ret=new $$t.y(0);$ret._d=k;$ret._c="";return $ret}()}else if($$t.$z.b.containsKey(b)){var l=$$t.$z.b.item(b);var m=$$t.$z.d(a/l._b,c,d);return new $$t.y(1,m,l._c,l._b,l._a)}else{throw new $$0.n(1,"Unresolved DataAbbreviationMode: "+$$t.$x.getBox(b))}var n=$$t.$z.d(a,c,d);return function(){var $ret=new $$t.y(0);$ret._d=n;$ret._c="";return $ret}()},$type:new $.ig.Type("DataAbbreviator",$.ig.$ot)},true);$c("LegendBase:af","ContentControl",{onDetachedFromUI:function(){this._ak.aj()},onAttachedToUI:function(){this._ak.ah()},aj:function(){return new $$t.ak(this)},a8:function(a){this._ak=a},_ak:null,init:function(){$$a.$g.init.call(this);var a=this.aj();this.a8(a);a.ak();this.children(new $$4.f($$a.$c.$type,0))},addChildInOrder:function(a,b){},a0:function(a,b){},_children:null,children:function(a){if(arguments.length===1){this._children=a;return a}else{return this._children}},_seriesOwner:null,seriesOwner:function(a){if(arguments.length===1){this._seriesOwner=a;return a}else{return this._seriesOwner}},_chartOwner:null,chartOwner:function(a){if(arguments.length===1){this._chartOwner=a;return a}else{return this._chartOwner}},isItemwise:function(){return false},isScale:function(){return false},clearLegendItemsForSeries:function(a){if(a==null||this.children()==null||this.children().count()==0){return}var b=new $$4.f($$a.$c.$type,0);var d=this.children().getEnumerator();while(d.moveNext()){var c=d.current();var e=$b($$a.$g.$type,c);if(e!=null&&e.content()!=null){var f=$b($.ig.ILegendContext.prototype.$type,e.content());if(f!=null&&f.series()==a){b.add(c)}}}var h=b.getEnumerator();while(h.moveNext()){var g=h.current();this.children().remove(g)}},containsChild:function(a){return this.children().contains(a)},removeChild:function(a){this.children().remove(a)},ai:function(){if(this.seriesOwner()!=null){return this.seriesOwner()}else{return this.chartOwner()}},propertyChanged:null,propertyUpdated:null,a9:function(a,b,c){if(this.propertyChanged!=null){this.propertyChanged(this,new $$0.b7(a))}if(this.propertyUpdated!=null){this.propertyUpdated(this,new $.ig.PropertyUpdatedEventArgs(a,b,c))}},legendItemMouseLeftButtonDown:null,a5:function(a){if(this.legendItemMouseLeftButtonDown!=null){this.legendItemMouseLeftButtonDown(this,a)}if(a.d()!=null){a.d().onLegendItemPointerDown(a.item())}},legendItemMouseLeftButtonUp:null,a6:function(a){if(this.legendItemMouseLeftButtonUp!=null){this.legendItemMouseLeftButtonUp(this,a)}if(a.d()!=null){a.d().onLegendItemPointerUp(a.item())}},legendItemMouseEnter:null,a3:function(a){if(this.legendItemMouseEnter!=null){this.legendItemMouseEnter(this,a)}if(a.d()!=null){a.d().onLegendItemEnter(a.item())}},legendItemMouseLeave:null,a4:function(a){if(this.legendItemMouseLeave!=null){this.legendItemMouseLeave(this,a)}if(a.d()!=null){a.d().onLegendItemLeave(a.item())}},legendItemMouseMove:null,a7:function(a){if(this.legendItemMouseMove!=null){this.legendItemMouseMove(this,a)}if(a.d()!=null){a.d().onLegendItemOver(a.item())}},provideContainer:function(a){this._ak.ai(a)},legendItemsListStyle:function(a){if(arguments.length===1){this._ak._s=a;return a}else{return this._ak._s}},legendItemStyle:function(a){if(arguments.length===1){this._ak._t=a;return a}else{return this._ak._t}},legendItemBadgeStyle:function(a){if(arguments.length===1){this._ak._r=a;return a}else{return this._ak._r}},legendItemTextStyle:function(a){if(arguments.length===1){this._ak._u=a;return a}else{return this._ak._u}},exportVisualData:function(){return this._ak.f()},exportSerializedVisualData:function(){var a=this.exportVisualData();return a.serialize()},isFinancial:function(){return false},$type:new $.ig.Type("LegendBase",$$a.$g.$type,[$$0.$b6.$type,$.ig.IChartLegend.prototype.$type])},true);$c("ItemLegend:ab","LegendBase",{aj:function(){return new $$t.aj(this)},a8:function(a){$$t.$af.a8.call(this,a);this._bb=a},_bb:null,init:function(){var $self=this;$$t.$af.init.call(this);this._ab=$$t.$ab.$type;var a=this.children();a.collectionChanged=$.ig.Delegate.prototype.combine(a.collectionChanged,function(a,b){if(b.oldItems()!=null){var d=b.oldItems().getEnumerator();while(d.moveNext()){var c=d.current();$self._bb.an(c)}}if(b.newItems()!=null){var f=b.newItems().getEnumerator();while(f.moveNext()){var e=f.current();$self._bb.x(e)}}})},addChildInOrder:function(a,b){if(!this._ak.m()){return}this.bi(b)},isItemwise:function(){return true},createItemwiseLegendItems:function(a,b){this.a0(a,b)},a0:function(a,b){this._ak.af();this.clearLegendItemsForSeries(b);if(b==null||a==null||a.count()==0){return}var d=a.getEnumerator();while(d.moveNext()){var c=d.current();var e=$b($$a.$g.$type,c);if(e!=null&&e.content()!=null){var f=$b($.ig.ILegendContext.prototype.$type,e.content());if(f!=null&&!this.be(f)){this.children().add(c);var g=new $$t.ae;g._b=f;g._c=c;g._a=b;if(f.legendLabel()!=null){g._d=f.legendLabel()}else{g._d=f.itemLabel()}}}}this._ak.ag()},createLegendItemsInsert:function(a,b){this.bh(a,b)},bh:function(a,b){this._ak.af();try{var c=this.bf(b);if(b==null||a==null||a.count()==0){return}var e=a.getEnumerator();while(e.moveNext()){var d=e.current();var f=$b($$a.$g.$type,d);if(f!=null&&f.content()!=null){var g=$b($.ig.ILegendContext.prototype.$type,f.content());if(g!=null&&!this.be(g)){this.children().insert(c,d);c++;var h=new $$t.ae;h._b=g;h._c=d;h._a=b;h._d=g.legendLabel()!=null?g.legendLabel().toString():g.itemLabel()}}}}finally{this._ak.ag()}},renderItemwiseContent:function(a){this.bi(a)},bi:function(a){var $self=this;this.clearLegendItemsForSeries(a);if(a.hasSubItems()){a.forSubItems(function(b){var c=$b($$a.$g.$type,b);if(c!=null&&c.content()!=null){var d=$b($.ig.ILegendContext.prototype.$type,c.content());if(d!=null&&!$self.be(d)){$self.children().add(b);var e=new $$t.ae;e._b=d;e._c=b;e._a=a;e._d=d.itemLabel()}}})}},bf:function(a){if(a==null||this.children()==null||this.children().count()==0){return 0}var b=new $$4.f($$a.$c.$type,0);var c=-1;var d=0;var f=this.children().getEnumerator();while(f.moveNext()){var e=f.current();var g=$b($$a.$g.$type,e);if(g!=null&&g.content()!=null){var h=$b($.ig.ILegendContext.prototype.$type,g.content());if(h!=null&&h.series()==a){if(c==-1){c=d}b.add(e)}}d++}var j=b.getEnumerator();while(j.moveNext()){var i=j.current();this.children().remove(i)}if(c==-1){return this.children().count()}return c},be:function(a){return this._bb.ap(a)},_bd:null,orientation:function(a){if(arguments.length===1){this._ak.k(a==0);return a}else{return this._ak.k()?0:1}},$type:new $.ig.Type("ItemLegend",$$t.$af.$type,[$.ig.IChartItemLegend.prototype.$type])},true);$c("Legend:ac","LegendBase",{aj:function(){return new $$t.al(this)},a8:function(a){$$t.$af.a8.call(this,a);this._bc=a},_bc:null,init:function(){var $self=this;$$t.$af.init.call(this);this._ab=$$t.$ac.$type;var a=this.children();a.collectionChanged=$.ig.Delegate.prototype.combine(a.collectionChanged,function(a,b){if(b.oldItems()!=null){var d=b.oldItems().getEnumerator();while(d.moveNext()){var c=d.current();$self._bc.an(c)}}if(b.newItems()!=null){var f=b.newItems().getEnumerator();while(f.moveNext()){var e=f.current();$self._bc.x(e)}}})},bd:function(a){return a.resolveLegendIndex()},bf:function(a){return this.be(a)},addChildInOrder:function(a,b){if(b.isStacked()){return}if(!b.isUsableInLegend()){return}var c=0;var e=this.children().getEnumerator();while(e.moveNext()){var d=e.current();var f;var g;var h;var i=this._ak.aa(d,f,g,h);f=i.p1;g=i.p2;h=i.p3;if(b.container()!=null&&f!=null&&(this.bf(b.container())<this.bf(f)||this.bf(b.container())==-1&&this.bf(f)==-1&&b.container().getHashCode()<f.getHashCode())){break}if(b.container()!=null&&f!=null&&b.container()==f&&g!=null){var j=this.bd(b);var k=this.bd(g);var l=this.bf(b);var m=this.bf(g);if(g.isVertical()&&!g.isStacked()){if(m==-1&&l==-1){c=0;break}if(l<m||m==-1){break}}if(j<=k){break}}c++}this.children().insert(c,a);var n=new $$t.ae;n._c=a;n._a=b;var o=$b($$a.$g.$type,a);if(o!=null&&o.content()!=null){var p=$b($.ig.ILegendContext.prototype.$type,o.content());if(p!=null){n._b=p;n._d=p.itemLabel()}}},orientation:function(a){if(arguments.length===1){this._ak.k(a==0);return a}else{return this._ak.k()?0:1}},be:function(a){return-1},textColor:function(a){if(arguments.length===1){this._ak.v(a);return a}else{return this._ak.v()}},textStyle:function(a){if(arguments.length===1){this._ak.w(a);return a}else{return this._ak.w()}},$type:new $.ig.Type("Legend",$$t.$af.$type)},true);$c("LegendItemInfo:ae","Object",{init:function(){$.ig.$op.init.call(this)},_d:null,_c:null,_a:null,_b:null,$type:new $.ig.Type("LegendItemInfo",$.ig.$ot)},true);$c("FinancialLegend:ag","LegendBase",{aj:function(){return new $$t.am(this)},bb:function(){return this._ak},init:function(){var $self=this;$$t.$af.init.call(this);this._ab=$$t.$ag.$type;var a=this.children();a.collectionChanged=$.ig.Delegate.prototype.combine(a.collectionChanged,function(a,b){if(b.oldItems()!=null){var d=b.oldItems().getEnumerator();while(d.moveNext()){var c=d.current();$self.bb().an(c)}}if(b.newItems()!=null){var f=b.newItems().getEnumerator();while(f.moveNext()){var e=f.current();$self.bb().x(e)}}})},addChildInOrder:function(a,b){this.children().add(a)},isFinancial:function(){return true},$type:new $.ig.Type("FinancialLegend",$$t.$af.$type)},true);$c("ScaleLegend:ah","LegendBase",{aj:function(){return new $$t.an(this)},a8:function(a){$$t.$af.a8.call(this,a);this._bd=a},_bd:null,legendScaleElement:function(){return this._bd._ba},minText:function(){return this._bd._a6},maxText:function(){return this._bd._a5},init:function(){$$t.$af.init.call(this);this._ab=$$t.$ah.$type},_bf:0,_be:0,bb:null,bc:function(a){if(arguments.length===1){this.bb=a;return a}else{return this.bb}},bi:function(){this._bd.a2()},restoreOriginalState:function(){this.bi()},bl:function(a){if(a==null){return this._bd.a9()}return $.ig.ColorUtil.prototype.t(a)},bg:function(a){this.bc(a);this.bh()},initializeLegend:function(a){this.bg(a)},isScale:function(){return true},bh:function(){var $self=this;if(this.legendScaleElement()==null||this.bc()==null||!this.bc().legendReady()){return}if(this.bc()==null||!this.bc().isAttachedTo(this)){return}var a=false;var b=$b($$a.$b2.$type,this.legendScaleElement());if(b!=null){var c=this._bd.aw();if(!this.bc().forScaleColors(function(d,e){$self._bd.ay(c,$self.bl(d),e)})){a=true}this._bd.a3(b,a,c)}if(this.minText()!=null){this.minText().ak(this.bc().minScaleText())}if(this.maxText()!=null){this.maxText().ak(this.bc().maxScaleText())}},$type:new $.ig.Type("ScaleLegend",$$t.$af.$type,[$.ig.IChartScaleLegend.prototype.$type])},true);$c("DataLegendView:ai","Object",{init:function(a){var $self=this;this.y=1;this.ad=-1;this.ac=-1;this.t=new $$4.h($.ig.FontInfo.prototype.$type,$$6.$u.$type.specialize(Number,$.ig.FontInfo.prototype.$type),0);this.e=null;this.g=null;this.f=null;this.d=null;this.c=null;$.ig.$op.init.call(this);this._a=a;this._n=function(){var $ret=new $.ig.Pool$1($$a.$an.$type);$ret.create($self.a7.runOn($self));$ret.activate($self.ax.runOn($self));$ret.disactivate($self.az.runOn($self));$ret.destroy($self.ay.runOn($self));return $ret}();this._p=function(){var $ret=new $.ig.Pool$1($$a.$an.$type);$ret.create($self.a9.runOn($self));$ret.activate($self.a3.runOn($self));$ret.disactivate($self.a5.runOn($self));$ret.destroy($self.a4.runOn($self));return $ret}();this._o=function(){var $ret=new $.ig.Pool$1($$a.$an.$type);$ret.create($self.a8.runOn($self));$ret.activate($self.a0.runOn($self));$ret.disactivate($self.a2.runOn($self));$ret.destroy($self.a1.runOn($self));return $ret}();this._m=function(){var $ret=new $.ig.Pool$1($$a.$g.$type);$ret.create($self.a6.runOn($self));$ret.activate($self.am.runOn($self));$ret.disactivate($self.ao.runOn($self));$ret.destroy($self.an.runOn($self));return $ret}();this._v=new $$4.x($$a.$an.$type,0);this._x=new $$4.x($$a.$an.$type,0);this._w=new $$4.x($$a.$an.$type,0);this._u=new $$4.x($$a.$g.$type,0)},ai:function(){this._a.dc()},_v:null,_x:null,_w:null,_u:null,_n:null,_p:null,_o:null,_m:null,a7:function(){var a=new $$a.an;this._v.add(a);return a},ax:function(a){a.__visibility=0},az:function(a){a.__visibility=1},ay:function(a){this._v.remove(a)},a9:function(){var a=new $$a.an;this._x.add(a);return a},a3:function(a){a.__visibility=0},a5:function(a){a.__visibility=1},a4:function(a){this._x.remove(a)},a8:function(){var a=new $$a.an;this._w.add(a);return a},a0:function(a){a.__visibility=0},a2:function(a){a.__visibility=1},a1:function(a){this._w.remove(a)},a6:function(){var a=new $$a.g;this._u.add(a);return a},am:function(a){a.__visibility=0},ao:function(a){a.__visibility=1},an:function(a){},_a:null,al:function(){var a=this._a.pixelScalingRatio();var b=this._a.actualPixelScalingRatio();if(!$.ig.util.isNaN(a)&&a!=0){return}if(window.devicePixelRatio!=window.undefined&&window.devicePixelRatio!=b){this._a.actualPixelScalingRatio(window.devicePixelRatio)}},ar:function(){this.al();var a=Math.round(this._aa.rootWrapper().width());var b=Math.round(this._aa.rootWrapper().height());this._a._ez=new $$a.ae(0,0,0,a,b);if(this._b!=null){this._b._bk=this._a._ez}this._a.dv()},_ab:null,_aa:null,_q:null,_b:null,ae:function(){if(this._b!=null){this._b._an=null;this._b.au()}},y:0,aq:function(a){if(a==null){this._ab=null;this._aa=null;this._q=null;this.ae();return}this.y=$.ig.util.isNaN(this._a.pixelScalingRatio())?this._a.actualPixelScalingRatio():this._a.pixelScalingRatio();var b=a;this._aa=b;var c=this.y;var d=Math.round(b.rootWrapper().width());var e=Math.round(b.rootWrapper().height());var f=d*c;var g=e*c;this._aa.rootWrapper().setStyleProperty("position","relative");var h=this._aa.createElement("canvas");h.setStyleProperty("position","absolute");this._aa.append(h);this.ad=$.ig.truncate(Math.round(f));this.ac=$.ig.truncate(Math.round(g));h.setAttribute("width",f.toString());h.setAttribute("height",g.toString());h.setStyleProperty("width",d.toString()+"px");h.setStyleProperty("height",e.toString()+"px");this._a._ez=new $$a.ae(0,0,0,d,e);this._ab=h;var i=this._aa.get2DCanvasContext(this._ab);this._q=new $.ig.RenderingContext(new $.ig.CanvasViewRenderer,i);this.ae();if($ig.CanvasGestureDOMEventProxy!=undefined&&!$ig.CanvasGestureDOMEventProxy.prototype.$placeholder){this._b=new $ig.CanvasGestureDOMEventProxy(overlayCanvas_,container_,false)}if(this._b!=null){}},ak:function(a,b){this.ar()},aj:function(a){},au:function(){var a=this._a._ez.width();var b=this._a._ez.height();var c=Math.round(a*this.y);var d=Math.round(b*this.y);if(this.ad!=c||this.ac!=d){this._ab.setAttribute("width",c.toString());this._ab.setAttribute("height",d.toString());this._ab.setStyleProperty("width",a.toString()+"px");this._ab.setStyleProperty("height",b.toString()+"px");this.ad=$.ig.truncate(Math.round(c));this.ac=$.ig.truncate(Math.round(d))}this.av(this._q,this.y)},av:function(a,b){if(a.d()&&b!=1){a.z();a.aa(b,b)}if(a==this._q){a.k(this._a._ez.left(),this._a._ez.top(),this._a._ez.width(),this._a._ez.height())}var c=new $$a.l;c.passID="LegendItem";for(var d=0;d<this._u.count();d++){var e=this._u.__inner[d];var f=e._ah;var g=new $$a.m;g.passInfo=c;g.context=this._q.g();g.width=e.width();g.height=e.height();g.data=e.content();f.measure()(g);var h=new $$a.n;h.availableWidth=e.width();h.availableHeight=e.height();h.passInfo=c;h.context=a.g();h.data=e.content();h.xPosition=e._n;h.yPosition=e._o;a.z();a.af(e._n,e._o);f.render()(h);a.y()}for(var i=0;i<this._v.count();i++){var j=this._v.__inner[i];a.ac(j.dataContext());a.w(j)}for(var k=0;k<this._x.count();k++){var l=this._x.__inner[k];a.ac(l.dataContext());a.w(l)}for(var m=0;m<this._w.count();m++){var n=this._w.__inner[m];a.ac(n.dataContext());a.w(n)}if(a.d()&&b!=1){a.y()}},ad:0,ac:0,s:function(){if(this._aa!=null){this._aa.setTimeout(this._a.dc.runOn(this._a),0);return true}return false},bf:function(a,b){var c=this.z(b);this._q.ac(b);var d=this._q.f(a);return new $$a.af(1,d,c)},t:null,z:function(a){if(this.t.containsKey(a)){var b=this.t.item(a);if(b._d.g()==a.g()){return b._c}}var c=$.ig.FontUtil.prototype.getCurrentFontHeight(this._aa,a);var d=new $$6.u(Number,$.ig.FontInfo.prototype.$type,c,a);this.t.item(a,d);return c},aw:function(a,b,c){a._n=b;a._o=c},ah:function(a){this.au()},ag:function(a,b){a.dataContext(b)},e:null,j:function(){if(this.e==null){var a=function(){var $ret=new $.ig.FontInfo;$ret.n("Verdana");$ret.d(11);$ret.s("Bold");$ret.q("Normal");$ret.o("Normal");$ret.r("Normal");return $ret}();this.e=a}return this.e},g:null,l:function(){if(this.g==null){var a=function(){var $ret=new $.ig.FontInfo;$ret.n("Verdana");$ret.d(11);$ret.s("Normal");$ret.q("Normal");$ret.o("Normal");$ret.r("Normal");return $ret}();this.g=a}return this.g},be:function(){return function(){var $ret=new $$a.at;$ret.color($$a.$ax.u(255,0,0,0));return $ret}()},bc:function(){return function(){var $ret=new $$a.at;$ret.color($$a.$ax.u(255,0,0,0));return $ret}()},bd:function(){return function(){var $ret=new $$a.at;$ret.color($$a.$ax.u(255,0,0,0));return $ret}()},f:null,k:function(){if(this.f==null){var a=function(){var $ret=new $.ig.FontInfo;$ret.n("Verdana");$ret.d(11);$ret.s("Normal");$ret.q("Normal");$ret.o("Normal");$ret.r("Normal");return $ret}();this.f=a}return this.f},bb:function(){return function(){var $ret=new $$a.at;$ret.color($$a.$ax.u(255,0,0,0));return $ret}()},d:null,i:function(){if(this.d==null){var a=function(){var $ret=new $.ig.FontInfo;$ret.n("Verdana");$ret.d(11);$ret.s("Bold");$ret.q("Normal");$ret.o("Normal");$ret.r("Normal");return $ret}();this.d=a}return this.d},ba:function(){return function(){var $ret=new $$a.at;$ret.color($$a.$ax.u(255,0,0,0));return $ret}()},c:null,h:function(){if(this.c==null){var a=function(){var $ret=new $.ig.FontInfo;$ret.n("Verdana");$ret.d(11);$ret.s("Bold");$ret.q("Normal");$ret.o("Normal");$ret.r("Normal");return $ret}();this.c=a}return this.c},_r:null,af:function(a,b){var model_=this._a;var ext_=model_.externalObject;if(ext_!=null){var width_=a;var height_=b;ext_.desiredSizeChanged(width_,height_)}},at:function(a){this.y=a},ap:function(){if(this._b!=null){this._b.as(this._ab,"")}},as:function(){if(this._b!=null){this._b.bg(this._ab,"")}},$type:new $.ig.Type("DataLegendView",$.ig.$ot)},true);$c("LegendBaseView:ak","Object",{init:function(a){this.l=false;this.i=false;$.ig.$op.init.call(this);this._b=a;this._c=new $$t.b(this);this._c.p()},aj:function(){this._c.u()},ah:function(){this._c.s()},_c:null,_b:null,ak:function(){},j:function(){return false},d:function(a){var b;var c;var d;var e=this.aa(a,b,c,d);b=e.p1;c=e.p2;d=e.p3;var f=new $$a.as;var g=new $$t.p(b,c,d,f,a);return g},e:function(a){var b;var c;var d;var e=this.aa(a,b,c,d);b=e.p1;c=e.p2;d=e.p3;var f=new $$a.ar;var g=new $$t.n(b,c,d,f,a);return g},aa:function(a,b,c,d){b=this._b.ai();c=null;d=null;if(a!=null){var e=$b($$a.$g.$type,a);if(e!=null&&e.content()!=null&&$b($.ig.ILegendContext.prototype.$type,e.content())!==null){var f=$b($.ig.ILegendContext.prototype.$type,e.content());c=$b($.ig.ILegendSeries.prototype.$type,f.series());if(c!=null){b=c.container()}d=f.item()}}return{p1:b,p2:c,p3:d}},z:function(){},m:function(){return true},y:function(a){},am:function(a){},ai:function(a){this._c.t(a)},an:function(a){this._c.x(a)},x:function(a){var b=this._b.children().indexOf(a);this._c.o(a,b)},af:function(){this._c.q()},ag:function(){this._c.r()},_s:null,_t:null,_r:null,_u:null,l:false,i:false,k:function(a){if(arguments.length===1){this.i=a;this._c.v(this.i);return a}else{return this.i}},p:null,v:function(a){if(arguments.length===1){this.p=a;this._c.z(this.p);return a}else{return this.p}},q:null,w:function(a){if(arguments.length===1){this.q=a;this._c.aa(this.q);return a}else{return this.q}},al:function(){this._c.p()},n:function(e_){var ev_=e_.originalEvent;return ev_.currentTarget},o:function(e_){return this._c.n(this.n(e_))},ad:function(a){if(!this.l){this._b.a3(this.e(this.o(a)))}this.l=true},ac:function(a){if(this.l){this._b.a4(this.e(this.o(a)))}this.l=false},ab:function(a){this._b.a5(this.d(this.o(a)))},ae:function(a){this._b.a6(this.d(this.o(a)))},h:function(a){var b=a.querySelectorAll("span *");var c=$$a.$ae.empty();for(var e=0;e<b.length;e++){var d=b[e];if(String.isNullOrEmpty(d.getText())){continue}var f=new $$a.ae(0,d.getOffset().left,d.getOffset().top,d.width(),d.height());f.union(c);c=f}return $.ig.RectData.prototype.b(c)},g:function(a){var b=a.querySelectorAll("canvas");var c=b.length>0?b[0]:null;return c!=null?new $.ig.RectData(c.getOffset().left,c.getOffset().top,c.width(),c.height()):null},a:function(a){if(this._b==null||this._b.children()==null||this._b.children().count()<=a){return null}var b=this._b.children().__inner[a];if(b==null){return null}var c=b.content();if(c==null){return null}var d=c.actualItemBrush()!=null?c.actualItemBrush():c.itemBrush();return $.ig.AppearanceHelper.prototype.b(d)},f:function(){var a=new $$t.as;var b=this._c._l;var c=b.getChildCount();for(var d=0;d<c;d++){var e=new $$t.aq;var f=b.getChildAt(d);e.label(f.getText());e.label(e.label()!=null?e.label().trim():null);e.bounds(new $.ig.RectData(f.getOffset().left,f.getOffset().top,f.width(),f.height()));e.labelBounds(this.h(f));e.badgeBounds(this.g(f));a.items().add(e)}for(var g=0;g<this._b.children().count();g++){a.items().__inner[g].appearance().fill(this.a(g))}return a},$type:new $.ig.Type("LegendBaseView",$.ig.$ot)},true);$c("ItemLegendView:aj","LegendBaseView",{init:function(a){$$t.$ak.init.call(this,a);this._ao=a},_ao:null,ak:function(){$$t.$ak.ak.call(this)},j:function(){return true},ap:function(a){return this._c.e(a)},f:function(){var a=new $$t.as;var b=this._c._g.rootWrapper();b=b.getChildAt(0);var c=b.getChildCount();for(var d=0;d<c;d++){var e=new $$t.aq;var f=b.getChildAt(d);e.label(f.getText());e.label(e.label()!=null?e.label().trim():null);e.bounds(new $.ig.RectData(f.getOffset().left,f.getOffset().top,f.width(),f.height()));e.labelBounds(this.h(f));e.badgeBounds(this.g(f));a.items().add(e)}for(var g=0;g<c;g++){a.items().__inner[g].appearance().fill(this.a(g))}return a},$type:new $.ig.Type("ItemLegendView",$$t.$ak.$type)},true);$c("LegendView:al","LegendBaseView",{init:function(a){$$t.$ak.init.call(this,a);this._ao=a},_ao:null,ak:function(){$$t.$ak.ak.call(this)},$type:new $.ig.Type("LegendView",$$t.$ak.$type)},true);$c("FinancialLegendView:am","LegendBaseView",{init:function(a){$$t.$ak.init.call(this,a);this._c=new $$t.a(this)},$type:new $.ig.Type("FinancialLegendView",$$t.$ak.$type)},true);$c("ScaleLegendView:an","LegendBaseView",{init:function(a){this._bb=new $$a.af;this.ar=false;$$t.$ak.init.call(this,a);this._ap=a;this._a6=new $$a.an;this._a5=new $$a.an;this._ba=new $$a.bz},_ap:null,_ba:null,_a6:null,_a5:null,a2:function(){},z:function(){},a9:function(){return $$a.$ax.u(0,0,0,0)},aw:function(){return new $$t.ao},ay:function(a,b,c){var d=a;d._a.add(function(){var $ret=new $$t.ap;$ret._b=function(){var $ret=new $$a.at;$ret.color(b);return $ret}();$ret._a=c;return $ret}())},a3:function(a,b,c){if(b){this._a7=this._ap.bc().actualMarkerBrush();this._ao=null}else{this._a7=null;this._ao=c;this._ao.b()}this.az()},_ao:null,_aq:null,_bb:null,ai:function(a){$$t.$ak.ai.call(this,a);this._aq=this._c.b(a);this._bb=this._c.ab();this.az()},ar:false,az:function(){if(!this.ar){this.ar=true;if(this._c._g!=null){this._c._g.setTimeout(this.a4.runOn(this),0)}else{window.setTimeout(this.a4.runOn(this),0)}}},a4:function(){if(this.ar){this.ar=false;this.a1()}},a1:function(){if(this._aq==null){return}this.a0()},au:function(a){var b=$b($$a.$an.$type,a);if(b!=null&&b.ak()!=null){return this._aq.e(b)+0}return 0},at:function(a){return this._as+0},_as:0,_a8:null,a0:function(){if(this._ap.bc()==null||this._ap.bc().container()==null||this._ao==null&&this._a7==null){return}if(this._aq.d()){var a=$b($.ig.IInternalLegendOwner.prototype.$type,this._ap.bc().container());this._aq.ac(a.getFontInfo());this._as=a.getFontHeight();this._a8=a.getFontBrush();var b=this.au(this._a6);var c=this.au(this._a5);var d=Math.max(b,c)+4;if(d>=this._bb.width()){d=0}var e=this._bb.width()-d;var f=2;var g=2;e=e-4;var h=this._bb.height()-4;var i=f+e+4;var j=g;var k=h;var l={__x:f+3/5*e,__y:g,$type:$$a.$y.$type,getType:$.ig.$op.getType,getGetHashCode:$.ig.$op.getGetHashCode,typeName:$.ig.$op.typeName};var m={__x:f+5/5*e,__y:g,$type:$$a.$y.$type,getType:$.ig.$op.getType,getGetHashCode:$.ig.$op.getGetHashCode,typeName:$.ig.$op.typeName};var n={__x:f+5/5*e,__y:h,$type:$$a.$y.$type,getType:$.ig.$op.getType,getGetHashCode:$.ig.$op.getGetHashCode,typeName:$.ig.$op.typeName};var o={__x:f,__y:h,$type:$$a.$y.$type,getType:$.ig.$op.getType,getGetHashCode:$.ig.$op.getGetHashCode,typeName:$.ig.$op.typeName};var p=this._ba;p._ak.clear();p._ak.add(l);p._ak.add(m);p._ak.add(n);p._ak.add(o);this._a6._n=i;this._a6._o=j;this._a6._am=this._a8;this._a5._n=i;this._a5._o=j+k-this.at(this._a6);this._a5._am=this._a8;this._aq.k(0,0,this._bb.width(),this._bb.height());if(this._ao==null&&this._a7!=null){p.__fill=this._a7;this._aq.t(p)}else{this._c.y(this._aq,p,this._ao,new $$a.ae(0,g,f,e,h))}if(d>0){this._aq.w(this._a6);this._aq.w(this._a5)}}},_a7:null,al:function(){$$t.$ak.al.call(this)},$type:new $.ig.Type("ScaleLegendView",$$t.$ak.$type)},true);$c("GradientData:ao","Object",{init:function(){$.ig.$op.init.call(this);this._a=new $$4.x($$t.$ap.$type,0)},_a:null,b:function(){this._a.sort2(function(a,b){return $w(a._a,b._a)})},$type:new $.ig.Type("GradientData",$.ig.$ot)},true);$c("GradientStopData:ap","Object",{init:function(){$.ig.$op.init.call(this)},_a:0,_b:null,$type:new $.ig.Type("GradientStopData",$.ig.$ot)},true);$c("LegendItemVisualData:aq","Object",{init:function(){$.ig.$op.init.call(this);this.labelBounds($.ig.RectData.prototype.empty());this.appearance(new $.ig.PrimitiveAppearanceData)},_label:null,label:function(a){if(arguments.length===1){this._label=a;return a}else{return this._label}},_labelBounds:null,labelBounds:function(a){if(arguments.length===1){this._labelBounds=a;return a}else{return this._labelBounds}},_appearance:null,appearance:function(a){if(arguments.length===1){this._appearance=a;return a}else{return this._appearance}},_labelAppearance:null,labelAppearance:function(a){if(arguments.length===1){this._labelAppearance=a;return a}else{return this._labelAppearance}},_bounds:null,bounds:function(a){if(arguments.length===1){this._bounds=a;return a}else{return this._bounds}},_badgeBounds:null,badgeBounds:function(a){if(arguments.length===1){this._badgeBounds=a;return a}else{return this._badgeBounds}},serialize:function(){var a=new $$6.aj(0);a.u("{");if(this.label()!=null){a.u('label: "'+this.label()+'", ')}if(this.appearance()!=null){a.u("appearance: "+this.appearance().serialize()+", ")}if(this.labelAppearance()!=null){a.u("labelAppearance: "+this.labelAppearance().serialize()+", ")}var b=function(c){return c!=null?"{ left: "+c.left()+", top: "+c.top()+", width: "+c.width()+", height: "+c.height()+"}":"null"};a.u("bounds: "+b(this.bounds())+", ");a.u("badgeBounds: "+b(this.badgeBounds())+", ");a.u("labelBounds: "+b(this.labelBounds()));a.u("}");return a.toString()},$type:new $.ig.Type("LegendItemVisualData",$.ig.$ot)},true);$c("LegendVisualDataList:ar","List$1",{init:function(){$$4.$x.init.call(this,$$t.$aq.$type,0)},$type:new $.ig.Type("LegendVisualDataList",$$4.$x.$type.specialize($$t.$aq.$type))},true);$c("LegendVisualData:as","Object",{init:function(){$.ig.$op.init.call(this);this.items(new $$t.ar)},_items:null,items:function(a){if(arguments.length===1){this._items=a;return a}else{return this._items}},_viewport:null,
viewport:function(a){if(arguments.length===1){this._viewport=a;return a}else{return this._viewport}},_width:0,width:function(a){if(arguments.length===1){this._width=a;return a}else{return this._width}},_height:0,height:function(a){if(arguments.length===1){this._height=a;return a}else{return this._height}},serialize:function(){var a=new $$6.aj(0);a.u("{");a.u("width: "+this.width()+",");a.u("height: "+this.height()+",");a.u("items: [");for(var b=0;b<this.items().count();b++){if(b!=0){a.l(", ")}a.l(this.items().__inner[b].serialize())}a.u("],");a.u("}");return a.toString()},$type:new $.ig.Type("LegendVisualData",$.ig.$ot)},true);$$t.$c.formatAbbreviationModeProperty=$$a.$s.i("FormatAbbreviationMode",$$t.$x.$type,$$t.$c.$type,new $$a.ac(2,$$t.$x.getBox(0),function(a,b){a.dq("FormatAbbreviationMode",b.oldValue(),b.newValue())}));$$t.$c.formatMaximumDigitsProperty=$$a.$s.i("FormatMaximumDigits",$$0.$aw.$type,$$t.$c.$type,new $$a.ac(2,5,function(a,b){a.dq("FormatMaximumDigits",b.oldValue(),b.newValue())}));$$t.$c.formatMinimumDigitsProperty=$$a.$s.i("FormatMinimumDigits",$$0.$aw.$type,$$t.$c.$type,new $$a.ac(2,(-1),function(a,b){a.dq("FormatMinimumDigits",b.oldValue(),b.newValue())}));$$t.$c.headerTextProperty=$$a.$s.i("HeaderText",String,$$t.$c.$type,new $$a.ac(2,null,function(a,b){a.dq("HeaderText",b.oldValue(),b.newValue())}));$$t.$c.headerTextColorProperty=$$a.$s.i("HeaderTextColor",$$a.$at.$type,$$t.$c.$type,new $$a.ac(2,null,function(a,b){a.dq("HeaderTextColor",b.oldValue(),b.newValue())}));$$t.$c.summaryTextColorProperty=$$a.$s.i("SummaryTextColor",$$a.$at.$type,$$t.$c.$type,new $$a.ac(2,null,function(a,b){a.dq("SummaryTextColor",b.oldValue(),b.newValue())}));$$t.$c.summaryValueColorProperty=$$a.$s.i("SummaryValueColor",$$a.$at.$type,$$t.$c.$type,new $$a.ac(2,null,function(a,b){a.dq("SummaryValueColor",b.oldValue(),b.newValue())}));$$t.$c.summaryTypeProperty=$$a.$s.i("SummaryType",$$t.$t.$type,$$t.$c.$type,new $$a.ac(2,$$t.$t.getBox(0),function(a,b){a.dq("SummaryType",b.oldValue(),b.newValue())}));$$t.$c.summaryValueFormatProperty=$$a.$s.i("SummaryValueFormat",String,$$t.$c.$type,new $$a.ac(2,null,function(a,b){a.dq("SummaryValueFormat",b.oldValue(),b.newValue())}));$$t.$c.summaryValueFormatSpecifiersProperty=$$a.$s.i("SummaryValueFormatSpecifiers",Array,$$t.$c.$type,new $$a.ac(2,null,function(a,b){a.dq("SummaryValueFormatSpecifiers",b.oldValue(),b.newValue())}));$$t.$c.summaryTextProperty=$$a.$s.i("SummaryText",String,$$t.$c.$type,new $$a.ac(2,null,function(a,b){a.dq("SummaryText",b.oldValue(),b.newValue())}));$$t.$c.rowMarginProperty=$$a.$s.i("RowMargin",$$a.$ah.$type,$$t.$c.$type,new $$a.ac(2,new $$a.ah(0,5),function(a,b){a.dq("RowMargin",b.oldValue(),b.newValue())}));$$t.$c.columnSpacingProperty=$$a.$s.i("ColumnSpacing",Number,$$t.$c.$type,new $$a.ac(2,10,function(a,b){a.dq("ColumnSpacing",b.oldValue(),b.newValue())}));$$t.$c.badgeMarginProperty=$$a.$s.i("BadgeMargin",$$a.$ah.$type,$$t.$c.$type,new $$a.ac(2,new $$a.ah(1,5,0,0,0),function(a,b){a.dq("BadgeMargin",b.oldValue(),b.newValue())}));$$t.$c.seriesTitleMarginProperty=$$a.$s.i("SeriesTitleMargin",$$a.$ah.$type,$$t.$c.$type,new $$a.ac(2,new $$a.ah(1,5,0,5,0),function(a,b){a.dq("SeriesTitleMargin",b.oldValue(),b.newValue())}));$$t.$c.seriesValueMarginProperty=$$a.$s.i("SeriesValueMargin",$$a.$ah.$type,$$t.$c.$type,new $$a.ac(2,new $$a.ah(1,5,0,5,0),function(a,b){a.dq("SeriesValueMargin",b.oldValue(),b.newValue())}));$$t.$c.targetCursorPositionXProperty=$$a.$s.i("TargetCursorPositionX",Number,$$t.$c.$type,new $$a.ac(2,NaN,function(a,b){a.dq("TargetCursorPositionX",b.oldValue(),b.newValue())}));$$t.$c.targetCursorPositionYProperty=$$a.$s.i("TargetCursorPositionY",Number,$$t.$c.$type,new $$a.ac(2,NaN,function(a,b){a.dq("TargetCursorPositionY",b.oldValue(),b.newValue())}));$$t.$c.targetAxisValueProperty=$$a.$s.i("TargetAxisValue",$.ig.$op.$type,$$t.$c.$type,new $$a.ac(2,null,function(a,b){a.dq("TargetAxisValue",b.oldValue(),b.newValue())}));$$t.$c.targetProperty=$$a.$s.i("Target",$.ig.$op.$type,$$t.$c.$type,new $$a.ac(2,null,function(a,b){a.dq("Target",b.oldValue(),b.newValue())}));$$t.$c.seriesUnitsModeProperty=$$a.$s.i("SeriesUnitsMode",$$t.$aa.$type,$$t.$c.$type,new $$a.ac(2,$$t.$aa.getBox(0),function(a,b){a.dq("SeriesUnitsMode",b.oldValue(),b.newValue())}));$$t.$c.seriesUnitsTextProperty=$$a.$s.i("SeriesUnitsText",String,$$t.$c.$type,new $$a.ac(2,null,function(a,b){a.dq("SeriesUnitsText",b.oldValue(),b.newValue())}));$$t.$c.seriesUnitsColorProperty=$$a.$s.i("SeriesUnitsColor",$$a.$at.$type,$$t.$c.$type,new $$a.ac(2,null,function(a,b){a.dq("SeriesUnitsColor",b.oldValue(),b.newValue())}));$$t.$c.seriesValueColorProperty=$$a.$s.i("SeriesValueColor",$$a.$at.$type,$$t.$c.$type,new $$a.ac(2,null,function(a,b){a.dq("SeriesValueColor",b.oldValue(),b.newValue())}));$$t.$c.seriesTitleColorProperty=$$a.$s.i("SeriesTitleColor",$$a.$at.$type,$$t.$c.$type,new $$a.ac(2,null,function(a,b){a.dq("SeriesTitleColor",b.oldValue(),b.newValue())}));$$t.$m.a=new $$t.m(String.empty(),NaN);$$t.$z.c=null;$$t.$z.b=null});