/*
 FusionCharts JavaScript Library
 Copyright FusionCharts Technologies LLP
 License Information at <http://www.fusioncharts.com/license>

 @version 3.11.0
*/
FusionCharts.register("module",["private","modules.renderer.js-gradientlegend",function(){function I(a,d){(function n(a,d){var ba,K;for(K in a)Fb.call(a,K)&&(ba=a[K],void 0===d[K]?d[K]=ba:"object"===typeof ba&&null!==typeof ba&&n(ba,d[K]))})(a,d);return d}function v(a){return Zb(a?a:Ua)||Ua}function Da(a){var d=a.fontSize+"";if(!d)return a;d=d.replace(/(\d+)(px)*/,"$1px");a.fontSize=d;return a}function Fa(a){return void 0===a||"undefined"===typeof a||null===a||a!==a?!0:!1}function oa(a,d){this.carpet=
a;this._componentPool=d}function Ka(a){this.conf=a;this._id="GL_CARPET";this.compositionsByCategory={};this._lSpace=this.group=this.node=void 0;this.autoRecalculate=!1;this.groupName="fc-gradient-legend";this.moveInstructions={}}function Oa(){Ka.apply(this,arguments)}function ta(a,d){this.rawText=a;this.conf=d;this._id="GL_CAPTION";this._lSpace=this.bound=this.node=void 0}function ja(a,d){this.colorRange=a;this.conf=d;this._id="GL_BODY";this.bound=void 0;this.compositionsByCategory={};this._lSpace=
void 0}function pa(){ja.apply(this,arguments)}function xa(a){this.conf=a;this._id="GL_LABELS"}function Aa(){xa.apply(this,arguments)}function Ia(){xa.apply(this,arguments);this._id="GL_VALUES"}function y(){Ia.apply(this,arguments);this._id="GL_VALUES"}function u(a){this.conf=a;this._id="FL_AXIS";this.markerLine=this.shadow=this.node=void 0;this.compositionsByCategory={}}function Ba(){u.apply(this,arguments)}function d(a){var d={};this._id="GL_SG1";this.conf=a;d.conf=a;this.extremes=[];this.sliders=
{};d.sliderGroup=this;this.valueRange=[];this.callbacks=[];this.sliders[!1]=new F(!1,d,this._id+"_0");this.sliders[!0]=new F(!0,d,this._id+"_1")}function F(a,d,p){this.conf=d.conf;this.sliderIndex=a;this.rangeGroup=d.sliderGroup;this._id=p;this.tracker=this.node=void 0;this.currPos=0;this.swing=[]}function a(a,d,p){p=p.components.numberFormatter;var n,k,w,r,t,T;this.data=a;this.options=d||{};T=this.mapByPercent=!!a.mapByPercent;this.appender="";k=this.mapByPercent?0:d.min;d=this.mapByPercent?100:
d.max;2===a.colorRange.length&&(n=a.colorRange[0],w=a.colorRange[1],r=n.value=Fa(n.value)?k:n.value,t=w.value=Fa(w.value)?d:w.value,r===t&&(r=n.value=k,t=w.value=d),n.displayValue=T?r+"%":p.legendValue(r),w.displayValue=T?t+"%":p.legendValue(t));Fa(k)&&Fa(n.value)||Fa(d)&&Fa(n.value)||!a.gradient?this._preparationGoneWrong=!0:this._preparationGoneWrong=!1;p=this.colorRange=a.colorRange.sort(function(a,p){return a.value-p.value});this.valueRatio=void 0;this.values=[];a=0;for(n=p.length;a<n;a++)this.values.push(p[a].value)}
function la(){oa.apply(this,arguments)}var Z=this,W=Z.hcLib,ua=W.pluckNumber,x=W.pluck,ya=W.toRaphaelColor,D=W.graphics,nb=W.dehashify,$=W.hashify,na=D.convertColor,Tb=D.RGBtoHex,Pb=D.HEXtoRGB,ia=D.getLightColor,Zb=D.getValidColor,Jb="rgba(192,192,192,"+(W.isIE?.002:1E-6)+")",Ja,Ua=W.COLOR_BLACK,Fb={}.hasOwnProperty,jb,cb={};Ja=function(){function a(p){var n=d.numberFormatter,K,t,T;K=0;for(t=p.length;K<t;K++)if(T=p[K].maxvalue)p[K].maxvalue=n.getCleanValue(T)}var d,p,n={legendCarpetConf:{spreadFactor:.85,
allowDrag:!1,captionAlignment:"center",padding:{v:3,h:3},style:{fill:"#e4d9c1",stroke:"#c4b89d"}},legendCaptionConf:{spreadFactor:.2,padding:{v:2,h:2},style:{fill:"#786B50",fontFamily:"sans-serif",fontSize:"12px",fontWeight:"bold",fontStyle:"normal"},bound:{style:{stroke:"none"}}},legendBodyConf:{spreadFactor:.8,padding:{v:2,h:2},bound:{style:{stroke:"none"}}}};n.legendAxisConf={legendAxisHeight:11,spreadFactor:.4,padding:{v:1,h:1},style:{stroke:"none","stroke-opacity":0,"stroke-width":1},line:{grooveLength:3,
offset:8,style:{stroke:"rgba(255, 255, 255, 0.65)","stroke-width":1.5}},shadow:{style:{stroke:"none",fill:ya({FCcolor:{alpha:"25,0,0",angle:360,color:"000000,FFFFFF,FFFFFF",ratio:"0,30,40"}})}},bound:{style:{stroke:"none"}}};n.sliderGroupConf={showTooltip:1,outerCircle:{rFactor:1.4,style:{fill:Jb,stroke:"#757575","stroke-width":3}},innerCircle:{rFactor:.65,style:{fill:Jb,stroke:"#FFFFFF"}}};n.axisTextItemConf={spreadFactor:.3,padding:{v:1,h:1},style:{fill:"#786B50",fontFamily:"sans-serif",fontSize:"12px",
fontWeight:"normal",fontStyle:"normal"}};return{init:function(a){p=a.chart;d=p.components},setConf:function(a){},legacyDataParser:function(p,n){var r={},t=d.numberFormatter,T,da,ga,E,N,u,D,y,x;if(!p)return!1;r.mapByPercent=x=!!ua(p.mapbypercent,0);void 0===p.minvalue&&(p.minvalue=void 0!==n.min?x?0:n.min:0);void 0===p.maxvalue&&(p.maxvalue=void 0!==n.max?x?100:n.max:100);T=p.color||[];ga=p.code;D=r.colorRange=[];r.gradient=!!ua(p.gradient,1);T.length?ga=v(ga):(ga?(E=v(ga),ga=v()):(ga=v(),E=ia(ga,
1)),T.push({code:E,maxvalue:p.maxvalue,label:void 0}));a(T);T=T.sort(function(a,p){return a.maxvalue-p.maxvalue});E=y=p.minvalue&&t.getCleanValue(p.minvalue);y=(void 0!==E||null!==E)&&(x?E+"%":t.legendValue(E));D.push({code:nb(ga),value:E,displayValue:y,label:p.startlabel});ga=0;for(u=T.length;ga<u;ga++)da=T[ga],N=v(da.code||da.color),E=y=da.maxvalue,isNaN(parseInt(E,10))||(y=(void 0!==E||null!==E)&&(x?E+"%":t.legendValue(E)),D.push(Object({code:nb(N),value:E,displayValue:y,label:da.label||da.displayvalue})));
D[D.length-1].label=p.endlabel||da.label;return r},getDefaultConf:function(a){return n[a]}}}();jb=function(a){var d=a.chartInstance.id,p=cb[d]||(cb[d]={});return function(){function n(){var a,d,n,k,ba,K;for(a in p)for(d in n=p[a],n)if(k=n[d],k instanceof Array)for(ba=0,K=k.length;ba<K;ba++)k[ba]&&k[ba].hide();else k.hide()}var k,w={},r;k={KEY_RECT:"rect",KEY_TEXT:"text",KEY_GROUP:"group",KEY_CIRCLE:"circle",KEY_PATH:"path"};w[k.KEY_RECT]=function(a){return r.rect(a)};w[k.KEY_TEXT]=function(a){return r.text(a)};
w[k.KEY_GROUP]=function(a,p){return r.group(a,p)};w[k.KEY_CIRCLE]=function(a){return r.circle(a)};w[k.KEY_PATH]=function(a,p){return r.path(a,p)};return{init:function(a){r=a;n()},emptyPool:function(){p=cb[d]={}},getChart:function(){return a},getComponent:function(a,d,n){var k=p[a],ba,K,r,u=0;k||(k=p[a]={});return(K=k[d])&&!(K instanceof Array)||K instanceof Array&&0<K.length?function(){return n?(r=K[u++])?r.show():K[u]=w[d].apply(this,arguments):K.show()}:function(){return n?(ba=k[d]||(k[d]=[]),K=
w[d].apply(this,arguments),ba.push(K),K.show()):k[d]=w[d].apply(this,arguments)}},hideAll:function(){n()},getKeys:function(){return k}}}()};oa.prototype.constructor=oa;oa.prototype.draw=function(a){a.componentPool=this._componentPool;return this.carpet.draw(a)};oa.prototype.getLogicalSpace=function(a,d){a.componentPool=this._componentPool;return this.carpet.getLogicalSpace(a,d)};oa.prototype.dispose=function(){this.carpet&&this.carpet.group&&this.carpet.group.remove();this._componentPool.emptyPool()};
Ka.prototype.constructor=Ka;Ka.prototype.addCompositions=function(a,d){this.compositionsByCategory[d]=a};Ka.prototype.getBoundingBox=function(a){var d=this.conf,p=a.refSide,n=a.alignment,k=a.refOffset,w=a.x,r=a.y,d=d.width=p*d.spreadFactor;!n||void 0!==w&&null!==w||(w=(k+p)/2-d/2);return{width:d,height:a.maxOtherSide,x:w,y:r}};Ka.prototype.getPostCalcDecisions=function(a,d){var p=this.conf.padding,n,k=0;for(n in d)k+=d[n].height||0;a.height=k+2*p.v};Ka.prototype.getLogicalSpace=function(a,d){var p=
this._lSpace,n=this.conf.padding,k=this.compositionsByCategory,w,r,t;t=0;var T={},da,u=0;if(p&&!d)return p.isImpure=!0,p;p=this._lSpace=r=this.getBoundingBox(a);if(Fa(p.x)||Fa(p.y)||Fa(p.height)||Fa(p.width))this.autoRecalculate=!0;p=I(r,{});p.height-=2*n.v;p.width-=2*n.h;p.x+=n.h;p.y+=n.v;for(da in k)w=k[da],n=I(p,{}),n.y+=t,t=p.height*w.conf.spreadFactor,n.height=t+u,t=w.getLogicalSpace(I(n,{}),a,d),u=n.height-t.height,T[da]=t,t=t.height;this.getPostCalcDecisions(r,T);return this._lSpace=r};Ka.prototype.setupDragging=
function(){var a=this.group,d=0,p=0,n=0,k=0;a.css({cursor:"move"});a.drag(function(w,r){d=w;p=r;a.attr({transform:"t"+(n+d)+","+(k+p)})},function(){n+=d;k+=p},function(){})};Ka.prototype.draw=function(a){var d=this.conf,p=this.compositionsByCategory,n=a.paper,k=a.parentGroup,w=a.componentPool,r,t,T=w.getChart().get("config","animationObj").duration,da,u=w.getKeys();this.getLogicalSpace(a,this.autoRecalculate);t=this._lSpace;da=w.getComponent(this._id,u.KEY_GROUP);this.group=k=da(this.groupName,k);
k.attr({opacity:0});k.animate({opacity:1},T,"easeIn");da=w.getComponent(this._id,u.KEY_RECT);this.node=da(k).attr(t).css(d.style);for(r in p)w=p[r],w.draw(d.captionAlignment,t,{colorRange:a.colorRange,numberFormatter:a.numberFormatter,paper:n,parentLayer:k,smartLabel:a.smartLabel,moveInstructions:this.moveInstructions[r],componentPool:a.componentPool});d.allowDrag&&this.setupDragging();return this.node};Oa.prototype=Object.create(Ka.prototype);Oa.prototype.constructor=Oa;Oa.prototype.getBoundingBox=
function(a){var d=this.conf,p=a.refSide,n=a.alignment,k=a.refOffset,w=a.x,r=a.y,d=d.height=p*d.spreadFactor;!n||void 0!==r&&null!==r||(r=(k+p)/2-d/2);return{width:a.maxOtherSide,height:d,x:w,y:r}};Oa.prototype.getPostCalcDecisions=function(a,d){var p=this.conf.padding,n=Number.NEGATIVE_INFINITY,k,w,r=this.moveInstructions;Ka.prototype.getPostCalcDecisions.apply(this,arguments);for(w in d)k=d[w].width,n=n<k?k:n;a.width=n+2*p.h;for(w in d)if(k=d[w].width,p=n-k)r[w]="t"+p/2+",0"};ta.prototype.constructor=
ta;ta.LEFT={x:function(a,d){return d.x+a.width/2+2}};ta.RIGHT={x:function(a,d){return d.x+d.width-a.width/2-2}};ta.CENTER={x:function(a,d){return d.x+d.width/2}};ta.prototype.getLogicalSpace=function(a,d,p){var n=this.conf.padding,k=this._lSpace,w=this.rawText,r=d.componentPool.getChart();if(k&&!p)return k.isImpure=!0,k;k=this._lSpace={bound:{height:0,width:0},node:{logicArea:void 0,smartText:void 0}};p=d.smartLabel;if(!w)return k.bound;d=I(a,{});d.height-=2*n.v;d.width-=2*n.h;d.x+=n.h;d.y+=n.v;p.useEllipsesOnOverflow(r.config.useEllipsesWhenOverflow);
r=I(this.conf.style,{});Da(r);p.setStyle(r);w=p.getSmartText(w,d.width,d.height);d.height=w.height;d.width=w.width;a.height=w.height+2*n.v;a.width=w.width+2*n.h;k.node.smartText=w;k.node.logicArea=d;return k.bound=a};ta.prototype.draw=function(){var a,d=this.conf.bound||{},p,n,k,w,r,t,T;3<=arguments.length?(k=arguments[0],w=arguments[1],r=arguments[2]):2<=arguments.length&&(k=arguments[0],r=arguments[1]);a=r.parentLayer;t=r.componentPool;T=t.getKeys();p=t.getComponent(this._id,T.KEY_GROUP);this.group=
a=p("legend-caption",a);this.getLogicalSpace(w,r);p=this._lSpace;r=p.node;n=p.bound;p=t.getComponent(this._id,T.KEY_RECT);this.bound=d=p(a).attr(n).css(d.style);k="string"===typeof k?ta[k.toUpperCase()].x(r.smartText,w||r.logicArea):k;p=t.getComponent(this._id,T.KEY_TEXT);this.node=p(a).attr({text:r.smartText.text,x:k,y:r.logicArea.y+r.smartText.height/2}).css(this.conf.style);return{group:a,bound:d,node:this.node}};ja.SC_STACK=["LEGEND_LABEL","LEGEND_AXIS","AXIS_VALUE"];ja.DARW_STACK=["AXIS_VALUE",
"LEGEND_AXIS","LEGEND_LABEL"];ja.prototype.constructor=ja;ja.prototype.addCompositions=function(a,d){this.compositionsByCategory[d]=a};ja.prototype.getCompositionPlotAreaFor=function(a){var d;d=I(a,{});return function(p,n){p=p||{};d.y+=p.height||0;d.height=a.height*n;return d}};ja.prototype.getSpaceTaken=function(a){return a.height};ja.prototype.updateEffectivePlotArea=function(a,d,p){var n=this.conf.padding;d.height=p;a.height=p+2*n.v};ja.prototype.getLogicalSpace=function(a,d,p){var n=this._lSpace,
k=this.conf.padding,w=this.compositionsByCategory,r,t,T,da=0,u,E;if(n&&!p)return n.isImpure=!0,n;n=this._lSpace={bound:{height:0,width:0},node:{logicArea:void 0}};t=I(a,{});t.height-=2*k.v;t.width-=2*k.h;t.x+=k.h;t.y+=k.v;T=this.getCompositionPlotAreaFor(t);d.colorRange=this.colorRange;u=0;for(E=ja.SC_STACK.length;u<E;u++)if(k=w[ja.SC_STACK[u]])r=T(r,k.conf.spreadFactor),r=k.getLogicalSpace(I(r,{}),d,p),da+=this.getSpaceTaken(r);this.updateEffectivePlotArea(a,t,da);n.node.logicArea=t;return n.bound=
a};ja.prototype.draw=function(){var a,d;d=this.conf.bound.style||{};var p=this.compositionsByCategory,n,k,w,r,t,T;3<=arguments.length?(k=arguments[1],r=arguments[2]):2<=arguments.length&&(r=arguments[1]);a=r.parentLayer;w=r.componentPool;t=w.getKeys();this.getLogicalSpace(k,r);k=this._lSpace;T=w.getComponent(this._id,t.KEY_GROUP);a=T("legend-body",a).attr({transform:"t0,0"});T=w.getComponent(this._id,t.KEY_RECT);this.bound=d=T(a).attr(k.bound).css(d);r.colorRange=this.colorRange;r.parentLayer=a;w=
0;for(t=ja.DARW_STACK.length;w<t;w++)(n=p[ja.DARW_STACK[w]])&&n.draw(r);r.moveInstructions&&a.attr({transform:r.moveInstructions});return{bound:d,group:a}};pa.prototype=Object.create(ja.prototype);pa.prototype.constructor=pa;pa.prototype.getCompositionPlotAreaFor=function(a){var d;d=I(a,{});return function(p,n){p=p||{};d.x+=p.width||0;d.width=a.width*n;return d}};pa.prototype.updateEffectivePlotArea=function(a,d,p){var n=this.conf.padding;d.width=p;a.width=p+2*n.h};pa.prototype.getSpaceTaken=function(a){return a.width};
xa.prototype.constructor=xa;xa.prototype.getEffectivePlotArea=function(a){var d=this.conf.padding;a.height-=2*d.v;a.width-=2*d.h;a.x+=d.h;a.y+=d.v;this.node=[];return a};xa.prototype.getLogicalSpace=function(a,d,p){var n=this._lSpace,k=this.conf,w=k.padding,r,t,T=[],da,u,E,N,v,D=0,y,x,F;v=d.componentPool.getChart();var $=[];if(n&&!p)return n.isImpure=!0,n;n=d.colorRange;d=d.smartLabel;p=n.getCumulativeValueRatio();r=n.colorRange;n=this._lSpace={bound:{height:0,width:0},node:{logicArea:void 0,smartTexts:[]}};
N=n.node.smartTexts;da=I(a,{});da=this.getEffectivePlotArea(da);d.useEllipsesOnOverflow(v.config.useEllipsesWhenOverflow);k=I(k.style,{});Da(k);d.setStyle(k);v=d.getSmartText("W");t=0;for(k=r.length;t<k;t++)(u=r[t].label)?(D++,$.push({oriIndex:t,label:u})):N[t]=void 0;k=$.length;if(0===k)return{height:0,width:0};u=E=1<k?(p[$[k-1].oriIndex]-p[$[0].oriIndex])/2*da.width/100:Math.max(p[$[0].oriIndex],100-p[$[0].oriIndex])/2*da.width/100;D=d.getSmartText($[0].label,u,da.height);D.x=p[$[0].oriIndex]*da.width/
100;t=D.x+D.width;T.push(D.height);N[$[0].oriIndex]=D;D=d.getSmartText($[k-1].label,u,da.height);D.x=p[$[k-1].oriIndex]*da.width/100;r=D.x-D.width;T.push(D.height);N[$[k-1].oriIndex]=D;x=t;for(t=1;t<k-1;t++)u=$[t].label,F=$[t].oriIndex,D=void 0,E=t+1===k-1?r:p[$[t+1].oriIndex]*da.width/100,y=p[$[t].oriIndex]*da.width/100,E=Math.min(y-x,E-y),E>2*v.width&&(D=d.getSmartText(u,E,da.height),D.x=p[F]*da.width/100,x=E,T.push(D.height)),N[$[t].oriIndex]=D;T=Math.max.apply(Math,T);da.height=T;a.height=T+2*
w.v;n.node.logicArea=da;return n.bound=a};xa.prototype.draw=function(){var a,d,p=this.conf;d=p.bound&&p.bound.style||{stroke:"none"};var n,k,w,r,t,T={},u;2<=arguments.length?(k=arguments[0],r=arguments[1]):1<=arguments.length&&(r=arguments[0]);a=r.parentLayer;r.colorRange.getCumulativeValueRatio();n=r.componentPool;t=n.getKeys();this.getLogicalSpace(k,r);w=this._lSpace;k=w.node.logicArea;r=w.node.smartTexts;u=n.getComponent(this._id,t.KEY_GROUP);a=u("legend-labels",a);u=n.getComponent(this._id,t.KEY_RECT);
this.bound=d=u(a).attr(w.bound).css(d);a.transform("R0");u=n.getComponent(this._id,t.KEY_TEXT,!0);t=0;for(w=r.length;t<w;t++)if(n=r[t])T.y=k.y+n.height/2,T.x=t===w-1?k.x+n.x-n.width/2:t?k.x+n.x:k.x+n.x+n.width/2,this.node.push(u(a).attr({text:n.text}).attr(T).css(p.style).transform("R0"));return{group:a,bound:d,node:this.node}};Aa.prototype=Object.create(xa.prototype);Aa.prototype.constructor=Aa;Aa.prototype.getLogicalSpace=function(a){var d;if(a){d=a;var p=d.height;d.height=d.width;d.width=p}d=xa.prototype.getLogicalSpace.apply(this,
arguments);return{height:d.width,width:d.height}};Aa.prototype.draw=function(){var a,d,p,n,k;p=xa.prototype.draw.apply(this,arguments);a=p.bound;d=p.group;a=a.getBBox();p=p.node;d.transform("R90,"+(a.x+a.height/2)+","+(a.y+a.height/2));d=0;for(a=p.length;d<a;d++)n=p[d],k=n.getBBox(),n.transform("R180,"+(k.x+k.width/2)+","+(k.y+k.height/2))};Ia.prototype=Object.create(xa.prototype);Ia.prototype.constructor=Ia;Ia.prototype.getLogicalSpace=function(a,d,p){var n=this._lSpace,k=this.conf,w=k.padding,r=
d.componentPool.getChart(),t,T,u,v,E,N,D=[],y,x,$,F;if(n&&!p)return n.isImpure=!0,n;n=d.colorRange;d=d.smartLabel;p=n.colorRange;u=n.getCumulativeValueRatio();n=this._lSpace={bound:{height:0,width:0},node:{logicArea:void 0,smartTexts:[]}};F=n.node.smartTexts;x=I(a,{});x.height-=2*w.v;x.width-=2*w.h;x.x+=w.h;x.y+=w.v;d.useEllipsesOnOverflow(r.config.useEllipsesWhenOverflow);k=I(k.style,{});Da(k);d.setStyle(k);r=d.getSmartText("W");k=p.length;N=(u[k-1]-u[0])/2*x.width/100;t=p[0].displayValue;t=d.getSmartText("string"!==
typeof t&&void 0!==t&&t.toString()||t,N,x.height);t.x=u[0]*x.width/100;T=t.x+t.width;D.push(t.height);F[0]=t;t=d.getSmartText(p[k-1].displayValue,N,x.height);t.x=u[k-1]*x.width/100;N=t.x-t.width;D.push(t.height);F[k-1]=t;y=T;for(T=1;T<k-1;T++)t=void 0,$=p[T].displayValue,v=T+1===k-1?N:u[T+1]*x.width/100,E=u[T]*x.width/100,v=Math.min(E-y,v-E),v>1.5*r.width&&(t=d.getSmartText($,2*v,x.height),t.x=u[T]*x.width/100,y=v,D.push(t.height)),F[T]=t;D=Math.max.apply(Math,D);x.height=D;a.height=D+2*w.v;n.node.logicArea=
x;return n.bound=a};Ia.prototype.draw=function(){var a=this.conf,d=a.bound&&a.bound.style||{stroke:"none"},p,n={},k,w,r,t,T,u,v;2<=arguments.length?(r=arguments[0],T=arguments[1]):1<=arguments.length&&(T=arguments[0]);k=T.parentLayer;u=T.colorRange.getCumulativeValueRatio();w=T.componentPool;p=w.getKeys();this.getLogicalSpace(r,T);t=this._lSpace;r=t.node.logicArea;T=t.node.smartTexts;v=w.getComponent(this._id,p.KEY_GROUP);k=v("legend-values",k);v=w.getComponent(this._id,p.KEY_RECT);this.bound=d=v(k).attr(t.bound).css(d);
v=w.getComponent(this._id,p.KEY_TEXT,!0);p=0;for(u=u.length;p<u;p++)if(w=T[p])n.y=r.y+w.height/2,n.x=p===u-1?r.x+w.x-w.width/2:p?r.x+w.x:r.x+w.x+w.width/2,v(k).attr({text:w.text}).attr(n).css(a.style);return{group:k,bound:d}};y.prototype=Object.create(Ia.prototype);y.prototype.constructor=y;y.prototype.getLogicalSpace=function(a,d,p){var n=this._lSpace,k=this.conf,w=k.padding,r=d.componentPool.getChart(),t,T,u,v,E,N,D=[],x,y,$,F;if(n&&!p)return n.isImpure=!0,n;n=d.colorRange;d=d.smartLabel;p=n.colorRange;
T=n.getCumulativeValueRatio();n=this._lSpace={bound:{height:0,width:0},node:{logicArea:void 0,smartTexts:[]}};F=n.node.smartTexts;E=I(a,{});E.height-=2*w.v;E.width-=2*w.h;E.x+=w.h;E.y+=w.v;d.useEllipsesOnOverflow(r.config.useEllipsesWhenOverflow);k=I(k.style,{});Da(k);d.setStyle(k);$=d.getSmartText("W");r=p.length;N=(T[r-1]-T[0])/2*E.height/100;k=d.getSmartText(p[0].displayValue,E.width,N);k.y=T[0]*E.height/100;t=k.y+k.width;D.push(k.width);F[0]=k;k=d.getSmartText(p[r-1].displayValue,E.width,N);k.y=
T[r-1]*E.height/100;N=k.y-k.height;D.push(k.width);F[r-1]=k;x=t;for(t=1;t<r-1;t++)k=void 0,y=p[t].displayValue,u=t+1===r-1?N:T[t+1]*E.height/100,v=T[t]*E.height/100,u=Math.min(v-x,u-v),u>2*$.height&&(k=d.getSmartText(y,E.width,2*u),k.y=T[t]*E.height/100,x=u,D.push(k.width)),F[t]=k;D=Math.max.apply(Math,D);E.width=D;a.width=D+2*w.h;n.node.logicArea=E;return n.bound=a};y.prototype.draw=function(){var a,d,p=this.conf;d=p.bound&&p.bound.style||{stroke:"none"};var n,k,w,r,t,u,v={},D;2<=arguments.length?
(n=arguments[0],w=arguments[1]):1<=arguments.length&&(w=arguments[0]);a=w.parentLayer;r=w.colorRange.getCumulativeValueRatio();t=w.componentPool;u=t.getKeys();this.getLogicalSpace(n,w);k=this._lSpace;n=k.node.logicArea;w=k.node.smartTexts;D=t.getComponent(this._id,u.KEY_GROUP);a=D("legend-values",a);D=t.getComponent(this._id,u.KEY_RECT);this.bound=d=D(a).attr(k.bound).css(d);D=t.getComponent(this._id,u.KEY_TEXT,!0);t=0;for(u=r.length;t<u;t++)if(r=w[t])v.x=n.x+r.width/2,v.y=t===u-1?n.y+r.y-r.height/
2:t?n.y+r.y:n.y+r.y+r.height/2,D(a).attr({text:r.text}).attr(v).css(p.style);return{group:a,bound:d}};u.prototype.constructor=u;u.prototype.addCompositions=function(a,d){this.compositionsByCategory[d]=a};u.prototype.getLogicalSpace=function(a,d,p){d=this._lSpace;var n=this.conf,k=n.padding,w,r;r=n.legendAxisHeight;var t=this.compositionsByCategory,u;u=0;if(d&&!p)return d.isImpure=!0,d;d=this._lSpace={bound:{height:0,width:0},node:{logicArea:void 0}};p=I(a,{});p.height-=2*k.v;p.width-=2*k.h;p.x+=k.h;
p.y+=k.v;n=r/2+n.line.offset;w=r/2;if(t=t.RANGE)u=t.sliders[!1],u=u.conf.outerCircle.rFactor*r,w+=u=Math.max(u/2-r/2,0);p.y+=u;p.height=r=w+n+u;a.height=r+2*k.v;d.node.logicArea=p;return d.bound=a};u.prototype.getDrawableAxisArea=function(a){var d=this.conf;return{x:a.x,y:a.y,width:a.width,height:d.legendAxisHeight,r:d.legendAxisHeight/2}};u.prototype.preDrawingRangeParam=function(a){return{y:a.y+a.height/2,calculationBase:a.height,rangeStart:a.x,rangeEnd:a.x+a.width,prop:"y"}};u.prototype.getScaleMarkerPathStr=
function(a,d){var p=I(a,{}),n=this.conf.line,k,w,r,t,u="";p.x+=p.r;p.width-=2*p.r;t=p.y+p.height;k=0;for(w=d.length;k<w;k++)r=d[k],r=p.x+r*p.width/100,u+="M"+r+","+(t-n.grooveLength)+"L"+r+","+(t+n.offset);p=""+("M"+p.x+","+(t+n.offset)+"L"+(p.x+p.width)+","+(t+n.offset));return u+p};u.prototype.getColorGradient=function(a){return{axis:a.getBoxFill(),shadow:ya({FCcolor:{alpha:"25,0,0",angle:90,color:"000000,FFFFFF,FFFFFF",ratio:"0,30,40"}})}};u.prototype.draw=function(){var a,d=this.conf,p=d.line,
n=(d.bound||{}).style||{},k,w,r=this.compositionsByCategory,t,u,v,D,E,N;2<=arguments.length?(k=arguments[0],E=arguments[1]):1<=arguments.length&&(E=arguments[0]);a=E.parentLayer;t=E.colorRange;u=t.getCumulativeValueRatio();N=E.componentPool;v=N.getKeys();this.getLogicalSpace(k,E);D=this._lSpace;k=N.getComponent(this._id,v.KEY_GROUP);a=k("legend-axis",a);k=N.getComponent(this._id,v.KEY_RECT,!0);this.bound=k(a).attr(D.bound).css(n);n=this.getDrawableAxisArea(D.node.logicArea);t=this.getColorGradient(t);
d.style.fill=t.axis;d.shadow.style.fill=t.shadow;this.node=k(a).attr(n).css(d.style);this.shadow=k(a).attr(n).css(d.shadow.style);d=this.getScaleMarkerPathStr(n,u);k=N.getComponent(this._id,v.KEY_PATH);k("M0,0",a).attr({path:d}).css(p.style);for(w in r)switch(p=r[w],w){case "RANGE":v=this.preDrawingRangeParam(n),E[v.prop]=v[v.prop],E.key=v.prop,E.rCalcBase=v.calculationBase,E.parentLayer=a,p.draw(v.rangeStart,v.rangeEnd,E)}};Ba.prototype=Object.create(u.prototype);Ba.prototype.constructor=Ba;Ba.prototype.getLogicalSpace=
function(a,d,p){d=this._lSpace;var n=this.conf,k=n.padding,w,r;r=n.legendAxisHeight;var t=this.compositionsByCategory,u;u=0;if(d&&!p)return d.isImpure=!0,d;d=this._lSpace={bound:{height:0,width:0},node:{logicArea:void 0}};p=I(a,{});p.height-=2*k.v;p.width-=2*k.h;p.x+=k.h;p.y+=k.v;n=r/2+n.line.offset;w=r/2;if(t=t.RANGE)u=t.sliders[!1],u=u.conf.outerCircle.rFactor*r,w+=u=Math.max(u/2-r/2,0);p.x+=u;p.width=r=w+n+u;a.width=r+2*k.v;d.node.logicArea=p;return d.bound=a};Ba.prototype.getDrawableAxisArea=
function(a){var d=this.conf;return{x:a.x,y:a.y,width:d.legendAxisHeight,height:a.height,r:d.legendAxisHeight/2}};Ba.prototype.getScaleMarkerPathStr=function(a,d){var p=I(a,{}),n=this.conf.line,k,w,r,t,u="";p.y+=p.r;p.height-=2*p.r;t=p.x+p.width;k=0;for(r=d.length;k<r;k++)w=d[k],w=p.y+w*p.height/100,u+="M"+(t-n.grooveLength)+","+w+"L"+(t+n.offset)+","+w;p=""+("M"+(t+n.offset)+","+p.y+"L"+(t+n.offset)+","+(p.y+p.height));return u+p};Ba.prototype.getColorGradient=function(a){return{axis:a.getBoxFill(!0),
shadow:ya({FCcolor:{alpha:"25,0,0",angle:360,color:"000000,FFFFFF,FFFFFF",ratio:"0,30,40"}})}};Ba.prototype.preDrawingRangeParam=function(a){return{x:a.x+a.width/2,calculationBase:a.width,rangeStart:a.y,rangeEnd:a.y+a.height,prop:"x"}};d.prototype.constructor=d;d.prototype.initRange=function(a,d){this.extremes[+a.sliderIndex]=d};d.prototype.updateRange=function(a,d){var p=a.sliderIndex;this.sliders[!p].updateSwingRange(p,d)};d.prototype.reset=function(){var a={};a.conf=this.conf;a.sliderGroup=this;
this.sliders[!1]=new F(!1,a,this._id+"_0");this.sliders[!0]=new F(!0,a,this._id+"_1");this.draw.apply(this,this._drawParams)};d.prototype.clearListeners=function(){this.callbacks.length=0};d.prototype.draw=function(a,d,p){var n=this.sliders,k=n[!1],n=n[!0],w=p.colorRange,r=w.colorRange,t=this._fcChart=p.componentPool.getChart();this.getValueFormPixel=function(a,d,p,n){var k=(d-a)/(n-p);this.getValueFormPixel=function(d){return a+k*d}};this.updateWhenInMove=function(a,d){this.updateWhenInMove=function(p,
n){var k=this.extremes,k=this.getValueFormPixel(p.sliderIndex?k[1]-k[0]+n:n);return k=d?parseFloat(k).toFixed(2)+"%":a.legendValue(k)}};this._drawParams=[a,d,p];this.updateWhenInMove(t.components.numberFormatter,w.mapByPercent);a=k.draw(a,r[0].displayValue,p[p.key],p);a=n.draw(d,r[r.length-1].displayValue,p[p.key],p);k.swing=this.extremes.slice(0);n.swing=this.extremes.slice(0);this.getValueFormPixel(r[0].value,r[r.length-1].value,this.extremes[0],this.extremes[1]);return a};d.prototype.registerListener=
function(a,d,p){this.callbacks.push({fn:a,context:d,params:p||[]})};d.prototype.updateWhenInRest=function(a,d){var p=this.sliders,n=this.extremes,k=a.sliderIndex,w,r=this.callbacks,t,u;k?(w=p[!k].currPos,p=n[1]-n[0]+d):(w=d,p=n[1]-n[0]+p[!k].currPos);n=0;for(k=r.length;n<k;n++)t=r[n],u=t.params.slice(0),u.unshift(this.getValueFormPixel(p)),u.unshift(this.getValueFormPixel(w)),t.fn.apply(t.context,u)};d.prototype.dragStarted=function(a){var d=this.sliders,p=this.extremes,n=a.conf,k=this._fcChart;Z.raiseEvent("legendpointerdragstart",
{pointerIndex:+a.sliderIndex,pointers:[{value:this.getValueFormPixel(d[!1].currPos)},{value:this.getValueFormPixel(p[1]-p[0]+d[!0].currPos)}],legendPointerHeight:n.outerRadius,legendPointerWidth:n.innerRadius,outerRadius:n.outerRadius,innerRadius:n.innerRadius},k.chartInstance,[k.id])};d.prototype.dragCompleted=function(a,d,p){var n=this.sliders,k=this.extremes,w=a.conf,r=this.getValueFormPixel(n[!1].currPos),n=this.getValueFormPixel(k[1]-k[0]+n[!0].currPos),t=this._fcChart,u;a.sliderIndex?(u=r,p=
this.getValueFormPixel(k[1]-k[0]+p)):(u=this.getValueFormPixel(p),p=n);d&&Z.raiseEvent("legendrangeupdated",{previousMinValue:r,previousMaxValue:n,minValue:u,maxValue:p},t.chartInstance,[t.id]);Z.raiseEvent("legendpointerdragstop",{pointerIndex:+a.sliderIndex,pointers:[{value:r},{value:n}],legendPointerHeight:w.outerRadius,legendPointerWidth:w.innerRadius,outerRadius:w.outerRadius,innerRadius:w.innerRadius},t.chartInstance,[t.id])};F.prototype.constructor=F;F.prototype.updateSwingRange=function(a,
d){this.swing[+a]=d};F.prototype.draw=function(a,d,p,n){var k=n.parentLayer,w=this.conf,r=w.outerCircle,t=w.innerCircle,u=Math.ceil(r.rFactor*n.rCalcBase/2),v=Math.ceil(t.rFactor*n.rCalcBase/2),D=u-v,E=this.rangeGroup,N=this.sliderIndex,x,y,$=n.componentPool,F=$.getKeys();w.outerRadius=u;w.innerRadius=v;this._scaleVal=d;t.style["stroke-width"]=D;D=Math.ceil(r.style["stroke-width"]/2);v+=D;y=$.getComponent(this._id,F.KEY_GROUP);k=this.node=y("fc-gl-slider",k).attr({cursor:"pointer",transform:"t0,0"});
"x"===n.key?a=x=a+(N?-v:+v):(x=p,a=p=a+(N?-v:+v));E.initRange(this,a);y=$.getComponent(this._id,F.KEY_CIRCLE,!0);y(k).attr({cx:p,cy:x,r:u}).css(r.style);y(k).attr({cx:p,cy:x,r:v}).css(t.style);d=this.tracker=y(k).attr({cx:p,cy:x,r:u+5,ishot:!0,fill:Jb,stroke:0,cursor:"pointer"}).trackTooltip(w.showTooltip?!0:!1).tooltip(d,null,null,!0);this._dragAPI=n=this.getDragAPI("x"===n.key);d.undrag();d.drag(n.dragging,n.dragStart,n.dragEnd);return{translateAscending:u+D}};F.prototype.getDragAPI=function(a){var d=
this,p=d.node,n=d.sliderIndex,k=d.rangeGroup,w,r,t,u=d.conf.innerRadius,v;return{dragging:function(D,E,N,x,y){var $;y.stopPropagation();y.preventDefault();$=a?E:D;n?(D=w[0]-w[1]+u,E=0):(D=0,E=w[1]-w[0]-u);if(!(d.currPos+$<D||d.currPos+$>E))return p.attr({transform:a?"t0,"+(d.currPos+$):"t"+(d.currPos+$)+",0"}),r=$,t&&clearTimeout(t),t=setTimeout(function(){k.updateWhenInRest(d,d.currPos+$)},100),d.tracker.tooltip(k.updateWhenInMove(d,d.currPos+$),null,null,!0),v=!0},dragStart:function(n,r,t){t.stopPropagation();
t.preventDefault();p.attr({transform:a?"t0,"+d.currPos:"t"+d.currPos+",0"});w=w||d.swing;v=!1;k.dragStarted(d)},dragEnd:function(){var a;k.dragCompleted(d,v,d.currPos+r);v&&(t&&clearTimeout(t),t=setTimeout(function(){k.updateWhenInRest(d,d.currPos)},100),d.currPos+=r,a=w[+n]+d.currPos,k.updateRange(d,a))}}};a.prototype.constructor=a;a.prototype.getValueRatio=function(){var a=this.colorRange,d,p,n=a.length,k=this.valueRatio,w=a[0].value,r=a[n-1].value-w,t=0;if(k)return k;k=this.valueRatio=[];for(p=
0;p<n;p++)d=a[p],d=(d.value-w)/r,k.push(100*(d-t)),t=d;return k};a.prototype.getCumulativeValueRatio=function(){var a=this.colorRange,d,p,n=a.length,k=a[0].value,w=a[n-1].value,r=[];for(p=0;p<n;p++)d=a[p],r.push((d.value-k)/(w-k)*100);return r};a.prototype.getBoxFill=function(a){var d=this.colorRange,p,n=d.length,k=[],w;w=a?90:0;for(p=0;p<n;p++)a=d[p],k.push(a.code);d={FCcolor:{alpha:"100,100,100",angle:w,color:k.join(","),ratio:this.getValueRatio().join(",")}};return ya(d)};a.prototype.getColorByValue=
function(a){var d=this.values,p=this.colorRange,n,k,w,r;if(void 0!==a&&null!==a){k=0;for(n=d.length;k<n;k++)if(a===d[k]){r=p[k].code;break}else if(!k&&a<d[k]){w=!0;break}else if(k===n-1&&a>d[k]){w=!0;break}else if(a>d[k]&&a<d[k+1]){d=p[k];n=p[k+1];p=d.value;k=Pb(d.code);d=n.value;n=Pb(n.code);r=r=void 0;r=d-p;r=[Math.round(k[0]+(n[0]-k[0])/r*(a-p)),Math.round(k[1]+(n[1]-k[1])/r*(a-p)),Math.round(k[2]+(n[2]-k[2])/r*(a-p))];r=Tb(r);break}if(!w)return r}};la.prototype=Object.create(oa.prototype);la.prototype.constructor=
la;FusionCharts.register("component",["gradientLegend","gradientLegend",{pIndex:1,enabled:!1,init:function(d){function u(k){p.data=d.chart.jsonData.colorrange;(r=p.nData=Ja.legacyDataParser(p.data,k))?(p.drawOptions={smartLabel:n.linkedItems.smartLabel,colorRange:p.colorRange=w=new a(r,k,t),maxOtherSide:k.maxOtherSide},p._dontPlot=!1,w&&w._preparationGoneWrong&&(p._dontPlot=!0),p._recalculateLogicalSpace=!0,p._configure()):p._dontPlot=!0}var p=this,n=d.chart,k,w,r,t;Ja.init(d);t=p._chart=d.chart;
p._cpool=jb(t);if(!(k=d.dataExtremes))return u;u(k)},_configure:function(){var a=this._chart,d=a.jsonData.chart,p=this.conf={},n=d.outcnvbasefont,k=d.outcnvbasefontsize,w=d.outcnvbasefontcolor,a=a.config.dataLabelStyle,r,t,u,v,D,E,N;p.caption=x(d.legendcaption);p.legendPosition=x(d.legendposition,"bottom").toLowerCase();p.showLegend=ua(d.showlegend,1);p.interactiveLegend=ua(d.interactivelegend,1);p.showLegendLabels=ua(d.showlegendlabels,1);r=d.legenditemfontcolor||w;t=d.legenditemfont||n;u=d.legenditemfontsize||
k;v=ua(d.legenditemfontbold,0);w=d.legendcaptionfontcolor||w;n=d.legendcaptionfont||n;k=d.legendcaptionfontsize||k;D=ua(d.legendcaptionfontbold,1);N=(E=d.legendaxisbordercolor?$(nb(d.legendaxisbordercolor)):void 0)?ua(d.legendaxisborderalpha,100)/100:void 0;p.axisTextItemConf={style:{fill:r?na(x(r)):a.color,fontFamily:t?x(t):a.fontFamily,fontSize:u?ua(u):a.fontSize.match(/\d+/)[0],fontWeight:v?"bold":a.fontWeight}};p.legendCaptionConf={style:{fill:w?na(x(w)):a.color,fontFamily:n?x(n):a.fontFamily,
fontSize:k?ua(k):a.fontSize.match(/\d+/)[0],fontWeight:D?"bold":a.fontWeight,fontStyle:"normal"}};p.legendAxisConf={legendAxisHeight:11,style:{stroke:E,"stroke-opacity":N},line:{style:{stroke:na(x(d.legendscalelinecolor,"FFF8E9"),ua(d.legendscalelinealpha,100)),"stroke-width":ua(d.legendscalelinethickness)}}};p.sliderGroupConf={showTooltip:ua(d.showtooltip,1),outerCircle:{rFactor:ua(d.sliderdiameterfactor),style:{stroke:na(x(d.legendpointerbordercolor,"757575"),ua(d.legendpointerborderalpha,100))}},
innerCircle:{rFactor:ua(d.sliderholediameterfactor),style:{stroke:na(x(d.legendpointercolor,"FFFFFF"),ua(d.legendpointeralpha,100))}}};p.legendCarpetConf={spreadFactor:ua(d.legendspreadfactor),allowDrag:!!ua(d.legendallowdrag,0),captionAlignment:x(d.legendcaptionalignment,"center"),style:{fill:na(x(d.legendbgcolor,"e4d9c1"),ua(d.legendbgalpha,100)),stroke:na(x(d.legendbordercolor,"c4b89d"),ua(d.legendborderalpha,100)),"stroke-width":ua(d.legendborderthickness,1)}}},postConfigureInit:function(){var a=
this.conf,v,p,n,k,w,r,t;this.elem={};a.caption&&(w=I(Ja.getDefaultConf("legendCaptionConf"),a.legendCaptionConf),v=new ta(a.caption,w));a.interactiveLegend&&(w=I(Ja.getDefaultConf("sliderGroupConf"),a.sliderGroupConf),this.elem.sGroup=k=new d(w),this.listeners&&0<this.listeners.length&&k.registerListener.apply(k,this.listeners));w=I(Ja.getDefaultConf("legendCarpetConf"),a.legendCarpetConf);"bottom"===a.legendPosition?(this.drawOptions.refSideKey="canvasWidth",this.drawOptions.refOffsetKey="canvasLeft",
p=new Ka(w),r=new ja(this.drawOptions.colorRange,Ja.getDefaultConf("legendBodyConf")),n=new u(I(Ja.getDefaultConf("legendAxisConf"),a.legendAxisConf)),w=I(Ja.getDefaultConf("axisTextItemConf"),a.axisTextItemConf),a.showLegendLabels&&(t=new xa(w)),a=new Ia(w)):(this.drawOptions.refSideKey="canvasHeight",this.drawOptions.refOffsetKey="canvasTop",p=new Oa(w),r=new pa(this.drawOptions.colorRange,Ja.getDefaultConf("legendBodyConf")),n=new Ba(I(Ja.getDefaultConf("legendAxisConf"),a.legendAxisConf)),w=I(Ja.getDefaultConf("axisTextItemConf"),
a.axisTextItemConf),a.showLegendLabels&&(t=new Aa(w)),a=new y(w));k&&n.addCompositions(k,"RANGE");t&&r.addCompositions(t,"LEGEND_LABEL");r.addCompositions(n,"LEGEND_AXIS");r.addCompositions(a,"AXIS_VALUE");v&&p.addCompositions(v,"CAPTION");p.addCompositions(r,"LEGEND_BODY");this.elem.gl=new la(p,this._cpool)},notifyWhenUpdate:function(a,d,p){var n;(n=this.elem&&this.elem.sGroup)?n.registerListener(a,d,p):this.listeners=[a,d,p]},dispose:function(){this.elem&&this.elem.gl&&this.elem.gl.dispose();this.elem=
{}},getLogicalSpace:function(a){var d=this.conf,p={height:0,width:0},n=this.drawOptions,k=this._chart;if(!this._recalculateLogicalSpace)return d=n.refSideKey,n=n.refOffsetKey,this.drawOptions.refSide=k.config[d],this.drawOptions.refOffset=k.config[n],(this._logicalArea=this.elem.gl.getLogicalSpace(this.drawOptions,!0))||p;if(this._dontPlot)return p;this._recalculateLogicalSpace=!1;this.postConfigureInit();if(!d.showLegend)return p;d=n.refSideKey;n=n.refOffsetKey;this.drawOptions.refSide=k.config[d];
this.drawOptions.refOffset=k.config[n];this.drawOptions.maxOtherSide=a||this.drawOptions.maxOtherSide;return this.elem.gl&&(this._logicalArea=this.elem.gl.getLogicalSpace(this.drawOptions,!0))},resetLegend:function(){var a;(a=this.elem&&this.elem.sGroup)&&a.reset()},clearListeners:function(){var a;(a=this.elem&&this.elem.sGroup)&&a.clearListeners()},draw:function(a,d,p){var n=this.conf;this._dontPlot||(this._cpool.init(p.paper),n.showLegend?(this.drawOptions.paper=p.paper,this.drawOptions.parentGroup=
p.parentGroup,this.drawOptions.x=a,this.drawOptions.y=d,this.drawOptions.maxOtherSide=this.drawOptions.maxOtherSide||p.maxOtherSide,a=this.elem.gl.draw(this.drawOptions),a=a.getBBox(),n.xPos=a.x,n.yPos=a.y,n.height=a.height,n.width=a.width,this.enabled=!0):this.enabled=!1)}}])}]);
FusionCharts.register("module",["private","modules.renderer.js-component-toolbox",function(){function I(a){"number"===typeof a&&(a="'"+a+"'");return a.split("").reduce(function(a,d){a=(a<<5)-a+d.charCodeAt(0);return a&a},0)}function v(a,d){var u;if(a.getBBox)return a;u=a.getBoundingClientRect();a.getBBox=function(){return{x:d.x,y:d.y,width:u.right-u.left,height:u.bottom-u.top,isArtificial:!0}};return a}function Da(a,d,u){var v,x;for(v in a)x=a[v],void 0!==x&&null!==x&&(u?d[v]||(d[v]=x):d[v]=x)}function Fa(a,
d){switch(a){case "click":return function(a){oa.dem.listen(d,"click",function(d){d.target&&d.target.parentNode&&a.call(d.target)})};case "hover":return function(a,u){oa.dem.listen(d,"pointerhover",function(d){d.target&&d.target.parentNode&&("start"===d.state?a:u).call(d.target)})}}}var oa=this.hcLib,Ka=oa.Raphael,Oa=this.window.document,ta=oa.graphics,ja=ta.convertColor,pa=ta.getLightColor,xa=ta.rawRGBtoHEX,Aa=oa.pluckNumber,Ia=oa.pluck,y={},u={},Ba={},d=oa.extend2,F,a,la,Z,W=function(){},ua=ja("FFFFFF",
0),x=0,ya;F=function(a,d,u){return["M",a-u,d-u]};a=function(a,d,u){var v=u/4;return["M",a-3*v,d,"L",a-v,d+u,a+u,d-u]};la=function(){Ka.addSymbol("Internal_CB",F);return{register:function(){var a,d,u;if(1===arguments.length){d=arguments[0];if(null==d||"object"!==typeof d)return;u=d}else if(1<arguments.length){a=arguments[0];d=arguments[1];if("string"!==typeof a||"function"!==typeof d)return;u={};u[a]=d}else return;for(a in u)d=u[a],{}.hasOwnProperty.call(u,a)&&Ka.addSymbol(a,d)}}}();ya=function(){function a(){this.pool=
{}}function d(a){var u,v,x,D,y,F;if(a)for(u in a)for(v in x=a[u],x)if(D=x[v],D instanceof Array)for(y=0,F=D.length;y<F;y++)D[y].hide&&D[y].hide();else D.hide&&D.hide()}var u={},v,x,y,F,I={};a.prototype.constructor=a;x={KEY_RECT:"rect",KEY_TEXT:"text",KEY_GROUP:"group",KEY_SCROLLER:"scoller",KEY_BUTTON:"button",KEY_PATH:"path",KEY_DIV:"div"};u[x.KEY_DIV]=function(){return Oa.createElement("div")};u[x.KEY_RECT]=function(a){return F.paper.rect(a)};u[x.KEY_TEXT]=function(a){return F.paper.text(a)};u[x.KEY_GROUP]=
function(a,d){return F.paper.group(a,d)};u[x.KEY_SCROLLER]=function(a,d,u,v,x,D,y){return F.paper.scroller(a,d,u,v,x,D,y)};u[x.KEY_BUTTON]=function(a,d,u,v,x,D){return F.paper.button(a,d,u,v,x,D)};u[x.KEY_PATH]=function(a,d){return F.paper.path(a,d)};return{init:function(u,x){var y;F=u;y=I[x]||(I[x]={});d(y.pool);y.initialized||(v=y.pool=(new a).pool,v._tmp=x,y.initialized=!0)},isInitialized:function(){},getCreationStatus:function(){return y},emptyPool:function(a){a=I[a]||{};a.pool&&(a.pool={})},
hideRecursive:function(a){d((I[a]||{}).pool)},getComponent:function(a,d,v,x){d=(I[d||0]||{}).pool;var D=d[a],F,K,W,p=0;D||(D=d[a]={});return(K=D[v])&&!(K instanceof Array)||K instanceof Array&&0<K.length?function(){y=!1;return x?(W=K[p++])?W.show():K[p]=u[v].apply(this,arguments):K.show&&"function"===typeof K.show&&K.show()||K}:function(){y=!0;return x?(F=D[v]||(D[v]=[]),K=u[v].apply(this,arguments),F.push(K),K.show&&"function"===typeof K.show&&K.show()||K):D[v]=u[v].apply(this,arguments)}},getKeys:function(){return x}}}();
Z=function(){function x(a){a=a||{};this.name=a.name;this.handler=a.handler||W;this.action=a.action&&a.action.toLowerCase()||"click";this.eventMap={};this.style={padding:"3px 8px",margin:"2px 0px",fontFamily:Ba.baseFontFamily,fontSize:Ba.baseFontSize+"px"};this.hoverOverStyle=a.hoverOverStyle||{};this.hoverOutStyle=a.hoverOutStyle||{};Da(a.style||{},this.style);this.node=this.subConRef=void 0}function Z(a,d){var k=this,u,r;u=d&&d.top||0;var t=d&&d.left,v=d&&d.right;this.container=a;this.position=Z.POSITION_BOTTOM;
this.atomicLists=[];this.refContainers=[];this.parentListCon=void 0;this.hideFnIds=[];this.target=void 0;t&&v||(this.positionCalculation=!0);this.hoverOverStyle={background:"#333333",color:"#FFFFFF",cursor:"pointer"};this.hoverOutStyle={background:"#FFFFFF",color:"#000000"};this._defaultStyle={position:"absolute","z-index":50,top:void 0===u?"auto":u+"px",right:void 0===v?"auto":v+"px",left:void 0===t?"auto":t+"px",overflow:"hidden",background:"#ffffff",border:"1px solid #646464","box-shadow":"#999999 2px 2px 5px",
padding:"5px 3px",display:"none"};u=this.container.style;for(r in this._defaultStyle)u[r]=this._defaultStyle[r];ba.linkedItems&&(ba.linkedItems.container.appendChild(this.container),r=Fa("hover",this.container),r(function(){k.show(this)},function(){k.hide(300,this)}))}function $(a){this.listContainer=this.container=void 0;this.measurement=a}function na(a,d,k,u){this.symbol=a;this._id="TB_SYMBOL"+(k||0);this.node=void 0;this.pId=u;this.isPlaintext=d;this.conf={btnTextStyle:{"stroke-width":"1px",stroke:"none"}};
this.evt={tooltext:void 0,click:W,hover:[W,W]}}function oa(a,d,k,u){na.call(this,"Internal_CB");this._id="TB_CBSYMBOL"+(k||0);this.symbol="Internal_CB";this.text={plaintext:a,node:void 0,style:jb};this.pId=u;this.checked=!!d;this.textNode=void 0;this.interPadding=3;this.pos={};this.regSymbolCmd=void 0;this.checked?this.check():this.uncheck()}function ta(a,d,k){na.call(this);this._id="TB_SCROLLER"+(d||0);this.pId=k;this.conf={};this.userConf=u;this.setConfiguaration(a);this.evt.scroll=W;return this}
function ia(a,d,k){var u;na.call(this,a,void 0,d,k);this.rawContextDefinitation=void 0;this.listContainerManager=(new $(this.position)).init(k);u=this.listContainerManager.getFirstContainer();this.evt.hover=[function(a){u.show(v(a.target||a.fromElement,a))},function(a){u.hide(300,a.target)}]}function Ia(a,n){this.preId=a||0;this.id=void 0;this.symbolList=[];this.groupRect=void 0;this.pId=n;d(this.btnConfig={},y);d(this.groupConfig={},Ua)}function Ka(a,d){Ja[this.id="TB_MASTER"+a||I((new Date).getTime())]=
this;this.toolbarRect=void 0;this.componentGroups=[];this.toolbarConfig=Fb;this.group=void 0;this.pId=d}var Ja={},Ua={hPadding:3,vPadding:3,borderRadius:2,fill:ja("DBDBDB",100),borderColor:ja("B2B1B1",100),borderThickness:1,offsetAdjustment:1,radius:1,spacing:6},Fb={hPadding:3,vPadding:3,borderRadius:0,fill:ja("EBEBEB",100),borderColor:ja("D1D0D0",100),borderThickness:1,offsetAdjustment:1,radius:0},jb={fontFamily:"Verdana,sans",fontSize:"12px",fill:void 0,fontStyle:"normal",fontWeight:"normal"},cb,
K,ba;x.prototype.assignSubContainer=function(a){a instanceof Z&&(this.subConRef=a)};x.prototype.stickIntoContainer=function(a,d){var k=this.node=Oa.createElement("div"),u=this.style,r,t,v,x=this;this.handler&&(this.eventMap[this.action]=this.handler);a.appendChild(k);k.innerHTML=this.name;t=k.style;for(r in u)t[r]=u[r];u=Fa("hover",k);Fa("click",k)(function(){x.handler&&((v=x.eventMap.click)&&v.apply(x,[ba]),d.hide())});u(function(){var a,d=k.style,p=x.hoverOverStyle;for(a in p)d[a]=p[a];x.subConRef&&
x.subConRef.show(this)},function(){var a,d=k.style,p=x.hoverOutStyle;for(a in p)d[a]=p[a];x.subConRef&&x.subConRef.hide(300,this)})};x.prototype.setStyle=function(a){Da(a||{},this.style)};x.prototype.dispose=function(){var a=this.node;a&&a.remove&&a.remove();this.node=void 0};Z.POSITION_TOP="top";Z.POSITION_BOTTOM="bottom";Z.prototype.addAtomicListItem=function(a){a instanceof x&&(this.atomicLists.push(a),a.stickIntoContainer(this.container,this))};Z.prototype.show=function(a){var d=this.hideFnIds,
k=ba.config.width,u=this.positionCalculation,r=0,t;this.target=this.target||a;for(t=d.length;r<t;r++)clearTimeout(d[r]);d.length=0;(d=this.parentListCon)?(d.show(this.target),this.container.style.left=d.container.offsetLeft+d.container.offsetWidth+"px",this.container.style.top=d.container.offsetTop+this.target.offsetTop+"px"):(d=a&&a.nodeName&&"DIV"===a.nodeName.toUpperCase()?!0:!1,d||(a=a.getBBox(),u&&(this.container.style.display="block",u=this.container.offsetWidth,u+a.x>k?(this.container.style.left=
"auto",this.container.style.right=k-a.x-a.width+"px"):(this.container.style.left=a.x+"px",this.container.style.right="auto"),this.container.style.display="none"),this.position===ia.POSITION_BOTTOM?(k=a.isArtificial?.5:1.5,this.container.style.top=a.y+a.height*k+"px",this.container.style.bottom="auto"):(this.container.style.bottom=ba.config.height-a.y+"px",this.container.style.top="auto")));this.container.style.display="block"};Z.prototype.hide=function(a){var d=this.container,k;(k=this.parentListCon)&&
k.hide(300);this.hideFnIds.push(setTimeout(function(){d.style.display="none"},a))};Z.prototype.dispose=function(){var a=this.atomicLists,d=this.refContainers,k,u;k=this.hideFnIds.length=0;for(u=a.length;k<u;k++)a[k].dispose();k=a.length=0;for(u=d.length;k<u;k++)d[k].dispose();d.length=0};$.prototype.init=function(a){var d=ya.getKeys();this.container||(a=ya.getComponent("div0",a,d.KEY_DIV),(a=a())&&(a.innerHTML=""),this.container=new Z(a,this.measurement));return this};$.prototype.getFirstContainer=
function(){return this.container};$.prototype.appendAsList=function(a,d){var k=this,u,r=this.container.hoverOverStyle,t=this.container.hoverOutStyle;(function da(a,d){var p,n=0,v,y,F,I,$,K,ba,pa;ba=d?d:k.container;p=a instanceof Array?a:[a];for(v=p.length;n<v;n++){y=p[n];F=new x({hoverOverStyle:r,hoverOutStyle:t});for(I in y)F.name=I,$=y[I],F.action=$.action,F.setStyle($.style),-1!==I.search(/^<[^<]+>$/)&&(F.hoverOverStyle={},F.hoverOutStyle={},$.handler=W),K=$.handler,"function"!==typeof K?pa=da(K,
new Z(Oa.createElement("div"))):F.handler=$.handler;ba.addAtomicListItem(F);pa&&(pa.parentListCon=ba,ba.refContainers.push(pa),F.assignSubContainer(pa));pa=void 0}return u=ba})(a,d);return u};$.prototype.dispose=function(){this.container.dispose();this.container=void 0};na.prototype.registerSymbol=function(a){la.register(this.symbol,a)};na.prototype._setConfiguaration=function(a){this.conf?Da(a,this.conf,!0):this.conf=a};na.prototype.attachEventHandlers=function(a,d){var k=this.evt,u=a.tooltext,r=
a.click||W,t=a.hover,v=d&&d.click||W,x=this;u&&(k.tooltext=u);k.click="function"===typeof r?function(){v();r.apply(x,arguments)}:function(){var a=r.fn,d=r.context,p=(r.args||[]).slice(0);r.hasOwnProperty("context")?p.push(x):d=x;[].push.apply(p,arguments);v();a.apply(d,p)};t&&t instanceof Array&&(k.hover=t);this.node&&this.node.tooltip(this.evt.tooltext).buttonclick(this.evt.click).hover(this.evt.hover[0],this.evt.hover[1]);return x};na.prototype.getLogicalSpace=function(){return{width:this.conf.width,
height:this.conf.height}};na.prototype.show=function(){var a=this.node;a&&a.css({display:"block"})};na.prototype.hide=function(){var a=this.node;a&&a.css({display:"none"})};na.prototype.draw=function(a,d,k){var u=this.conf||{},r,t,v=ya.getKeys(),x=ba.get("config","animationObj"),y=x.animObj,E=x.dummyObj,D=x.duration;this.isPlaintext?t=this.symbol:r=this.symbol;void 0!==k.idCount&&(this._id+=k.idCount);u.hoverFill=u.hoverFill?ja(u.hoverFill):ja(pa(xa(u.fill),80));k=this.node=ya.getComponent(this._id,
this.pId,v.KEY_BUTTON,!0)(a,d,t,r,{width:u.width,height:u.height,r:u.radius,verticalPadding:u.symbolHPadding*u.scale,horizontalPadding:u.symbolHPadding},k.parentLayer).labelcss(this.conf.btnTextStyle);k.attr({ishot:!0,fill:[u.fill,u.labelFill,u.symbolFill,u.hoverFill,!0],stroke:[u.stroke,u.symbolStroke],"stroke-width":[u.strokeWidth,u.symbolStrokeWidth]}).tooltip(this.evt.tooltext).buttonclick(this.evt.click).hover(this.evt.hover[0],this.evt.hover[1]);ya.getCreationStatus()||(this.node.unclick(),
this.node.animateWith(E,y,{"button-repaint":[a,d,u.width,u.height,u.radius]},D,x.animType),this.node.attr({"button-label":t,"button-padding":[u.symbolHPadding,u.symbolHPadding*u.scale]}),this.node.buttonclick(this.evt.click));k.getBBox=function(){return{x:a,y:d,width:u.width,height:u.height}};return k};na.prototype.dispose=function(){var a=this.node;a&&a.remove();this.node=void 0};oa.prototype=Object.create(na.prototype);oa.prototype.constructor=oa;oa.prototype.check=function(){var d=this.pos;this.checked=
!0;this.regSymbolCmd=a;this.node&&(this.registerSymbol(this.regSymbolCmd),this.node.attr({"button-repaint":[d.x,d.y,d.width,d.height,d.r]}))};oa.prototype.uncheck=function(){var a=this.pos;this.checked=!1;this.regSymbolCmd=F;this.node&&(this.registerSymbol(this.regSymbolCmd),this.node.attr({"button-repaint":[a.x,a.y,a.width,a.height,a.r]}))};oa.prototype.click=function(){this.checked?this.uncheck():this.check()};oa.prototype.attachEventHandlers=function(a){var d=this;na.prototype.attachEventHandlers.apply(this,
[a,{click:function(){d.click()}}])};oa.prototype.getLogicalSpace=function(){var a=ba.linkedItems.smartLabel,d=this.text.style,k;k=na.prototype.getLogicalSpace.apply(this,arguments);a.useEllipsesOnOverflow(ba.config.useEllipsesWhenOverflow);a.setStyle(d);a=a.getSmartText(this.text.plaintext);return{width:a.width+this.interPadding+k.width,height:Math.max(k.height,a.height)}};oa.prototype.draw=function(a,d,k){var u,r=this.conf,t;t=ba.linkedItems.smartLabel;var v=cb.colorManager,x=this.text.plaintext,
y,E=ya.getKeys();this.registerSymbol(this.regSymbolCmd);u=this.node=na.prototype.draw.apply(this,arguments);this.pos={x:a,y:d,width:r.width,height:r.height,r:r.radius};y=this.text.style;y.fill=y.fill||"#"+v.getColor("baseFontColor");t.useEllipsesOnOverflow(ba.config.useEllipsesWhenOverflow);t.setStyle(y);t=t.getSmartText(x);u=u.getBBox();v=ya.getComponent(this._id,this.pId,E.KEY_TEXT);this.textNode=v(k.parentLayer).attr({text:x,x:u.x+u.width+t.width/2+this.interPadding,y:u.y+u.height/2}).css(y);r=
r.height>t.height?r.height:t.height;v=ya.getComponent(this._id,this.pId,E.KEY_RECT);return v(k.parentLayer).attr({height:r,width:u.width+t.width+this.interPadding,x:a,y:d,stroke:ua})};oa.prototype.dispose=function(){this.textNode&&this.textNode.remove();this.textNode=void 0;na.prototype.dispose.call(this)};ta.prototype=Object.create(na.prototype);ta.prototype.constructor=oa;ta.prototype.setConfiguaration=function(a){var d=cb.colorManager;u.color||(u.color="#"+d.getColor("altHGridColor"));Da(u,this.conf);
Da(a,this.conf)};ta.prototype.getLogicalSpace=function(){var a=this.conf,d={};Da(u,d);Da(d,a);return na.prototype.getLogicalSpace.call(this)};ta.prototype.getDefaultLayer=function(){var a=ya.getKeys();return ya.getComponent(this._id,this.pId,a.KEY_GROUP)("scroll")};ta.prototype.registerSymbol=void 0;ta.prototype._setConfiguaration=function(){};ta.prototype.attachEventHandlers=function(a){a&&a.scroll&&"function"===typeof a.scroll&&(this.evt.scroll=a.scroll);na.prototype.attachEventHandlers.apply(this,
arguments);return this};ta.prototype.draw=function(){var a,d,k,v,r,t,x,y,D,E,N,F,I,$,K,W;K=this.conf;var Z,pa=ya.getKeys(),la={},ia=ba.get("config","animationObj"),oa=ia.animObj,na=ia.dummyObj;k={};var ja=ia.duration;1===arguments.length?(K=arguments[0],a=K.x,d=K.y,x=K.parentLayer,r=!!K.sepLayer):(a=arguments[0],d=arguments[1],r=arguments[2],K&&r?Da(r,K):r={},x=r.parentLayer,r=!!r.sepLayer);Da(u,k);K.isHorizontal?delete k.width:delete k.height;Da(k,K);d+=K.padding;k=K.height;v=K.width;t=K.isHorizontal;
W=K.startPercent;y=K.scrollRatio;D=K.showButtons;E=K.displayFlat;N=K.fullCanvasWidth;F=K.windowedCanvasWidth;I=K.color;$=K.roundEdges;la["scroll-repaint"]=[a,d,v,k];x=x?x:this.getDefaultLayer();Z=ya.getComponent(this._id,this.pId,pa.KEY_RECT);x=r?Z("scroll-child"):x;Z=ya.getComponent(this._id,this.pId,pa.KEY_SCROLLER);this.node=Z(a,d,v,k,t,{scrollPosition:K.scrollPosition||Aa(W,0),displayStyleFlat:E,showButtons:D},x).data("fullCanvasWidth",N).data("windowedCanvasWidth",F).attr({"scroll-ratio":y,fill:I,
r:$&&2||0}).scroll(this.evt.scroll);ya.getCreationStatus()||(this.node.undrag(),this.node.animateWith(na,oa,la,ja,ia.animType),this.node.attr({"scroll-display-style":E?"flat":"3d","scroll-position":K.scrollPosition||Aa(W,0)}).scroll(this.evt.scroll));return this.node};ia.POSITION_TOP="top";ia.POSITION_BOTTOM="bottom";ia.prototype=Object.create(na.prototype);ia.prototype.constructor=ia;ia.allNodes=[];ia.prototype.getListRefernce=function(){return this.listContainerManager};ia.prototype.attachEventHandler=
function(a){var d=this.evt;if(a=a.tooltext)d.tooltext=a};ia.prototype.getLogicalSpace=function(){var a=this.listContainerManager.getFirstContainer().atomicLists;return a&&0===a.length?{width:0,height:0}:na.prototype.getLogicalSpace.call(this)};ia.prototype.draw=function(){var a=this.listContainerManager.getFirstContainer().atomicLists;if(a&&0===a.length)return this.hide(),{getBBox:function(){return{width:0,height:0}}};a=na.prototype.draw.apply(this,arguments);ia.allNodes.push(this.node);return a};
ia.prototype.dispose=function(){this.listContainerManager&&this.listContainerManager.dispose();this.listContainerManager=void 0;na.prototype.dispose.call(this)};Ia.prototype.addSymbol=function(a,d){var k=this.symbolList;d?k.unshift(a):k.push(a)};Ia.prototype.setConfiguaration=function(a){var d=a.buttons;a=a.group;d&&Da(d,this.btnConfig);a&&Da(a,this.groupConfig)};Ia.prototype.draw=function(a,d,k){var u=this.preId,r=this.symbolList,t,v,x=this.groupConfig,y=this.btnConfig,E=d.x,D=d.y,F=0,I=0,$=Number.NEGATIVE_INFINITY;
t=ya.getKeys();u=this.id=u.toString()+k;K.toolbarGroup=K.toolbar||{};k=ya.getComponent(this.id,this.pId,t.KEY_GROUP);a=k("toolbar-group"+u,a).trackTooltip(!0);k=ya.getComponent(this.id,this.pId,t.KEY_RECT);u=this.groupRect=k(a).attr({height:0,width:0,x:E,y:D});E+=x.hPadding;D+=x.vPadding;I+=x.hPadding;F+=x.vPadding;t=0;for(k=r.length;t<k;t++)v=r[t],v._setConfiguaration(y),v=v.draw(E,D,{parentLayer:a}),v=v.getBBox(),$<v.height&&($=v.height),E+=v.width+(v=y.spacing);I+=E+x.hPadding-d.x-v-x.offsetAdjustment;
F+=$+x.vPadding+x.offsetAdjustment;isFinite(F)||(F=0);isFinite(I)||(I=0);u.attr({height:F,width:I}).attr({fill:x.fill,r:x.radius,stroke:x.borderColor,"stroke-width":x.borderThickness});v=u.getBBox();return{height:v.height,width:v.width}};Ia.prototype.getLogicalSpace=function(){var a=this.symbolList,d,k,u,v=0,t=0,x=Number.NEGATIVE_INFINITY,y=0;k=0;for(u=a.length;k<u;k++)d=a[k],d._setConfiguaration(this.btnConfig),d=d.getLogicalSpace(),t+=d.width+this.btnConfig.spacing,y+=d.width,x=x<d.height?d.height:
x;if(!y)return{width:0,height:0};x!==Number.NEGATIVE_INFINITY&&t&&(t-=this.btnConfig.spacing-2*this.groupConfig.hPadding-this.groupConfig.offsetAdjustment,v=x+2*this.groupConfig.vPadding+this.groupConfig.offsetAdjustment);return{width:t,height:v}};Ia.prototype.dispose=function(){for(var a=this.symbolList,d=0,k=a.length;d<k;d++)a[d].dispose();a.length=0;this.groupRect.remove()};Ka.prototype.getId=function(){return this.id};Ka.prototype.addComponent=function(a){this.componentGroups.push(a)};Ka.prototype.draw=
function(a,d){var k=this.componentGroups,u,v,t,x;x=this.id;var y=a,D=d,E,N=this.toolbarConfig,F,I=Number.NEGATIVE_INFINITY;v=ya.getKeys();K.toolbar=K.toolbar||{};E=ya.getComponent(this.id,this.pId,v.KEY_GROUP,!0);this.group=x=E(x);E=ya.getComponent(this.id,this.pId,v.KEY_RECT,!0);E=this.toolbarRect=E(x).attr({height:0,width:0,x:y,y:D});y+=N.hPadding;D+=N.vPadding;v=0;for(t=k.length;v<t;v++)u=k[v],F=u.groupConfig.spacing||1,u=u.draw(x,{x:y,y:D},v),y+=u.width+F,I=I>u.height?I:u.height;k=I;y=y-F-N.hPadding-
a;isFinite(k)||(k=0);isFinite(y)||(y=0);E.attr({height:k+=2*N.vPadding,width:y+=2*N.hPadding}).attr({fill:N.fill,r:N.radius,stroke:N.borderColor,"stroke-width":N.borderThickness});return{height:k,width:y}};Ka.prototype.getLogicalSpace=function(){var a=this.componentGroups,d,u,v,r=d=0,t=Number.NEGATIVE_INFINITY,x,y=0;d=0;for(u=a.length;d<u;d++)v=a[d],x=v.getLogicalSpace(),v=v.groupConfig.spacing||1,r+=x.width+v,y+=x.width,t=t<x.height?x.height:t;if(!y)return{width:0,height:0};r-=v-2*this.toolbarConfig.hPadding;
d=t+2*this.toolbarConfig.vPadding;return{width:r,height:d}};Ka.prototype.dispose=function(){for(var a=this.componentGroups,d=0,u=a.length;d<u;d++)a[d].dispose();a.length=0;this.toolbarRect.remove();ya.emptyPool(this.pId)};return{init:function(a){K=a.graphics;ba=a.chart;cb=a.components},HorizontalToolbar:Ka,ComponentGroup:Ia,Symbol:na,CheckboxSymbol:oa,Scroller:ta,SymbolWithContext:ia,getInstanceById:function(a){return Ja[a]}}}();FusionCharts.register("component",["toolbox","toolbox",{onceInitialized:!1,
ALIGNMENT_HORIZONTAL:0,ALIGNMENT_VERTICAL:1,POSITION_TOP:0,POSITION_RIGHT:1,POSITION_BOTTOM:2,POSITION_LEFT:3,init:function(a){if(this.onceInitialized)return this.configure(),this._iCount;Z.init(a);this._options=a;this._chart=a.chart;this._iCount=++x;this.configure();this.onceInitialized=!0;return this._iCount},configure:function(){var a=this._chart.jsonData.chart,d;Z.init(this._options);y.scale=Aa(a.toolbarbuttonscale,1.15);y.width=Aa(a.toolbarbuttonwidth,15);y.height=Aa(a.toolbarbuttonheight,15);
y.radius=Aa(a.toolbarbuttonradius,2);y.spacing=Aa(a.toolbarbuttonspacing,5);y.fill=ja(Ia(a.toolbarbuttoncolor,"ffffff"));y.labelFill=ja(Ia(a.toolbarlabelcolor,"cccccc"));y.symbolFill=ja(Ia(a.toolbarsymbolcolor,"ffffff"));y.hoverFill=Ia(a.toolbarbuttonhovercolor);y.stroke=ja(Ia(a.toolbarbuttonbordercolor,"bbbbbb"));y.symbolStroke=ja(Ia(a.toolbarsymbolbordercolor,"9a9a9a"));y.strokeWidth=Aa(a.toolbarbuttonborderthickness,1);y.symbolStrokeWidth=Aa(a.toolbarsymbolborderthickness,1);d=y.symbolPadding=
Aa(a.toolbarsymbolpadding,5);y.symbolHPadding=Aa(a.toolbarsymbolhpadding,d);y.symbolVPadding=Aa(a.toolbarsymbolvpadding,d);u.color=a.scrollcolor&&ja(a.scrollcolor);u.padding=Aa(a.scrollpadding,0);u.height=Aa(a.scrollheight,12);u.width=Aa(a.scrollwidth,12);u.displayFlat=Aa(a.flatscrollbars,0);u.scrollBar3DLighting=Aa(a.scrollbar3dlighting,1);u.startPercent=Math.min(1,Math.max(0,parseFloat(a.scrolltoend)||0));u.showButtons=!!Aa(a.scrollshowbuttons,1);u.buttonPadding=Aa(a.scrollbtnpadding,0);Ba.baseFontFamily=
Ia(a.basefont,"Verdana,sans");Ba.baseFontSize=Aa(a.basefontsize,10);Ba.baseFontColor=Ia(a.basefontcolor,"595959")},getAPIInstances:function(a){var d=this._chart,u={};switch(a){case this.ALIGNMENT_HORIZONTAL:u.Toolbar=Z.HorizontalToolbar}ya.init(d.components,this._iCount);u.ComponentGroup=Z.ComponentGroup;u.Symbol=Z.Symbol;u.Scroller=Z.Scroller;u.SymbolWithContext=Z.SymbolWithContext;u.SymbolStore=la;u.CheckboxSymbol=Z.CheckboxSymbol;return u},getDefaultConfiguration:function(){return y},clean:function(){ya.hideRecursive(this._iCount)}}])}]);
FusionCharts.register("module",["private","modules.renderer.js-powercharts",function(){var I=this,v=I.hcLib,Da=v.Raphael,Fa="VML"===Da.type,oa=I.window,Ka=oa.Image,Oa=oa.document,ta=v.preDefStr,ja=ta.colors.B90000,pa=ta.line,xa=ta.column,Aa=ta.bar,Ia=ta.volume,y=v.BLANKSTRING,u=v.BLANKSTRING,Ba=v.parseTooltext,d=v.pluck,F=v.getValidValue,a=v.pluckNumber,la=v.getFirstValue,Z=v.parseUnsafeString,W=v.extend2,ua=v.getDashStyle,x=v.toRaphaelColor,ya=v.toPrecision,D=v.hasSVG,nb=v.isIE,$=v.regex.dropHash,
na=v.HASHSTRING,Tb=v.hashify,ta=v.setAttribDefs,Pb=v.parseConfiguration,ia=v.attrTypeNum,Zb=function(b,g){var e;b||(b={});for(e in g)b[e]=g[e];return b},Jb=v.COMMASPACE,Ja=v.chartPaletteStr={chart2D:{bgColor:"bgColor",bgAlpha:"bgAlpha",bgAngle:"bgAngle",bgRatio:"bgRatio",canvasBgColor:"canvasBgColor",canvasBaseColor:"canvasBaseColor",divLineColor:"divLineColor",legendBgColor:"legendBgColor",legendBorderColor:"legendBorderColor",toolTipbgColor:"toolTipbgColor",toolTipBorderColor:"toolTipBorderColor",
baseFontColor:"baseFontColor",anchorBgColor:"anchorBgColor"},chart3D:{bgColor:"bgColor3D",bgAlpha:"bgAlpha3D",bgAngle:"bgAngle3D",bgRatio:"bgRatio3D",canvasBgColor:"canvasBgColor3D",canvasBaseColor:"canvasBaseColor3D",divLineColor:"divLineColor3D",divLineAlpha:"divLineAlpha3D",legendBgColor:"legendBgColor3D",legendBorderColor:"legendBorderColor3D",toolTipbgColor:"toolTipbgColor3D",toolTipBorderColor:"toolTipBorderColor3D",baseFontColor:"baseFontColor3D",anchorBgColor:"anchorBgColor3D"}},Ua=v.each,
Fb=v.addEvent,jb=v.removeEvent,cb=v.getTouchEvent,K=v.componentDispose,ba=function(b){return void 0!==b&&null!==b},p="rgba(192,192,192,"+(nb?.002:1E-6)+")",n=v.TOUCH_THRESHOLD_PIXELS,k=v.CLICK_THRESHOLD_PIXELS,w=8===oa.document.documentMode?"visible":u,r=v.BGRATIOSTRING,t=Math,T=t.sin,da=t.cos,ga=t.round,E=t.min,N=t.max,Ca=t.abs,Ub=t.PI,cc=t.ceil,Vb=t.floor,lc=t.sqrt,mc=t.pow,dc=Ub/180,qb=v.hasTouch,Pa=qb?n:k,Ha=v.getFirstColor,ec=v.setLineHeight,hb=v.pluckFontSize,Za=v.getFirstAlpha,nc=v.graphics.getDarkColor,
ob=v.graphics.getLightColor,ea=v.graphics.convertColor,Wb=v.POSITION_TOP,Qb=v.POSITION_BOTTOM,fc=v.POSITION_RIGHT,gc=v.POSITION_LEFT,oc=v.bindSelectionEvent,M=v.chartAPI,pc=v.graphics.mapSymbolName,Xb=v.COMMASTRING,La=v.HUNDREDSTRING,Rb=v.getMouseCoordinate,n=!/fusioncharts\.com$/i.test(oa.location.hostname),za=v.plotEventHandler,hc=I.xssEncode,Cb=v.SHAPE_RECT,k=v.graphics,qc=k.parseColor,rc=k.getValidColor,Sb=function(){this.data("move",!1);clearTimeout(this._longpressactive);delete this._longpressactive},
sc=v.createElement;v.eventList.chartupdated="FC_ChartUpdated";v.eventList.dataposted="FC_DataPosted";v.eventList.dataposterror="FC_DataPostError";v.eventList.datarestored="FC_DataRestored";I.addEventListener("rendered",function(b){b=b.sender;var g=b.__state,e=b.jsVars&&b.jsVars.instanceAPI;!g.listenersAdded&&e&&"function"===typeof e.getCollatedData&&(b.addEventListener(["chartupdated","dataupdated","rendered"],function(b){delete b.sender.__state.hasStaleData}),g.listenersAdded=!0)});M("spline",{friendlyName:"Spline Chart",
standaloneInit:!0,singleseries:!0,creditLabel:n,defaultDatasetType:"msspline",defaultPlotShadow:1,applicableDSList:{spline:!0},getSplineExtremities:function(b,g,e,c,h){var f=[],a=!1;c=c||0;for(h=h||{max:Number.MIN_VALUE,min:Number.MAX_VALUE};c<b.length;++c)if(a)if(isNaN(b[c].config.setValue)||null===b[c].config.setValue){if(!e)break}else f.push({index:c,y:b[c].config.setValue});else isNaN(b[c].config.setValue)||null===b[c].config.setValue||(a=!0,f.push({index:c,y:b[c].config.setValue}));2<f.length&&
this.evalSplineExtremities(f,g,h);c<b.length&&!e&&this.getSplineExtremities(b,g,e,c,h);return h},evalSplineExtremities:function(b,g,e){var c={},h,f,a;for(f=0;f<b.length;++f)h=b[f].index,c["D"+h]=0;for(h=0;10>h;++h)for(f=0;f<b.length;++f)a=0===f?(3*(b[f+1].y-b[f].y)-c["D"+b[f+1].index])/2:f===b.length-1?(3*(b[f].y-b[f-1].y)-c["D"+b[f-1].index])/2:(3*(b[f+1].y-b[f-1].y)-c["D"+b[f+1].index]-c["D"+b[f-1].index])/4,c["D"+b[f].index]=a;g=ga(g/(b.length-1));for(f=1;f<b.length;++f)this.getSegmentExtremities(f,
b,c,e,g)},getSegmentExtremities:function(b,g,e,c,h){var f,a,l,m,d;f=e["D"+g[0].index];a=e["D"+g[b].index];e=g[0].y;l=3*(g[b].y-g[0].y)-2*f-a;b=2*(g[0].y-g[b].y)+f+a;g=c.max;a=c.min;for(m=0;m<=h;m++)d=m/h,d=e+f*d+l*d*d+b*d*d*d,d<a&&(a=d),d>g&&(g=d);c.max=g;c.min=a}},M.sscartesian,{zeroplanethickness:1,zeroplanealpha:40,showzeroplaneontop:0});M("splinearea",{friendlyName:"Spline Area Chart",standaloneInit:!0,hasLegend:!1,singleseries:!0,creditLabel:n,defaultDatasetType:"mssplinearea",defaultPlotShadow:0,
anchorAlpha:"100"},M.spline);M("msspline",{standaloneInit:!0,friendlyName:"Multi-series Spline  Chart",creditLabel:n,defaultDatasetType:"msspline",applicableDSList:{msspline:!0},defaultPlotShadow:1,getSplineExtremities:M.spline.getSplineExtremities,evalSplineExtremities:M.spline.evalSplineExtremities,getSegmentExtremities:M.spline.getSegmentExtremities},M.mscartesian);M("mssplinearea",{friendlyName:"Multi-series Spline Area Chart",standaloneInit:!0,creditLabel:n,defaultDatasetType:"mssplinearea",
defaultPlotShadow:0},M.msspline);M("mssplinedy",{friendlyName:"Multi-series Dual Y-Axis Spline Chart",standaloneInit:!0,creditLabel:n,isDual:!0,defaultDatasetType:"msspline",applicableDSList:{msspline:!0},getSplineExtremities:M.spline.getSplineExtremities,evalSplineExtremities:M.spline.evalSplineExtremities,getSegmentExtremities:M.spline.getSegmentExtremities},M.msdybasecartesian);M("msstepline",{friendlyName:"Multi-series Step Line Chart",standaloneInit:!0,creditLabel:n,defaultDatasetType:"msstepline",
defaultPlotShadow:1,applicableDSList:{msstepline:!0}},M.mscartesian);M("multiaxisline",{friendlyName:"Multi-axis Line Chart",standaloneInit:!0,creditLabel:n,defaultDatasetType:"multiaxisline",defaultPlotShadow:1,axisPaddingLeft:0,axisPaddingRight:0,applicableDSList:{LINE:!0},_createDatasets:function(){var b=this.components,g=this.config,e=this.jsonData,c=e.axis,h,f,a,l,m=0,A,B,q=this.defaultDatasetType,P=this.applicableDSList,ra=b.legend.components.items||[],V,pb,p,k,Gb=this.isStacked,z,X={},C=0,
n;if(c){h=c.length;this.config.categories=e.categories&&e.categories[0].category;e=b.dataset||(b.dataset=[]);l=e.length;n=g.axisDataSetMap=[];for(f=0;f<h;f++)if(a=c[f].dataset,n[f]=[],a)for(B=a.length,m+=B,g=0;g<B;g++)if(k=a[g],k.seriesname&&(k.seriesname=Z(k.seriesname)),A=k.parentyaxis||u,pb=(pb=this.isDual&&"s"===A.toLowerCase()?d(k.renderas,this.sDefaultDatasetType):d(k.renderas,q))&&pb.toLowerCase(),P[pb]||(pb=q),A=FusionCharts.get("component",["dataset",pb]))void 0===X[pb]?X[pb]=0:X[pb]++,z=
"datasetGroup_"+pb,p=FusionCharts.register("component",["datasetGroup",pb]),V=b[z],p&&!V&&(V=b[z]=new p,V.chart=this,V.init()),e[C]?(A=e[C],V=A.JSONData,V=V.data?V.data.length:0,pb=k.data?k.data.length:0,V>pb&&A.removeData(pb-1,V-pb,!1),A.JSONData=k,A.index=f,A.axisIndex=f,A.configure(),n[f].push(C),C+=1):(A=new A,e.push(A),A.chart=this,A.index=f,A.axisIndex=f,n[f].push(C),C+=1,V&&(Gb?V.addDataSet(A,0,X[pb]):V.addDataSet(A,X[pb],0)),A.init(k));if(l>m){b=l-m;for(g=m;g<l;g++)K.call(e[g]);e.splice(m,
b);ra.splice(m,b)}}else this.setChartMessage()},_createAxes:function(){var b=this.components,g=FusionCharts.register("component",["axis","cartesian"]);b.yAxis=[];b.xAxis=[];b.xAxis[0]=b=new g;b.chart=this;b.init();this._setCategories()},_feedAxesRawData:function(){var b=this.components,g=this.config,e=b.colorManager,c=b.numberFormatter,h=this.jsonData,f=h.chart,s,l,m=this.is3d;l=m?Ja.chart3D:Ja.chart2D;var A=FusionCharts.register("component",["axis","cartesian"]),B,q,P,ra,V,u,k,p,Gb,z,X,C;s=!1;var n=
0;s={outCanfontFamily:d(f.outcnvbasefont,f.basefont,"Verdana,sans"),outCanfontSize:hb(f.outcnvbasefontsize,f.basefontsize,10),outCancolor:d(f.outcnvbasefontcolor,f.basefontcolor,e.getColor(l.baseFontColor)).replace(/^#? ([a-f0-9]+)/ig,"#$1"),axisNamePadding:f.xaxisnamepadding,axisValuePadding:f.labelpadding,axisNameFont:f.xaxisnamefont,axisNameFontSize:f.xaxisnamefontsize,axisNameFontColor:f.xaxisnamefontcolor,axisNameFontBold:f.xaxisnamefontbold,axisNameFontItalic:f.xaxisnamefontitalic,axisNameBgColor:f.xaxisnamebgcolor,
axisNameBorderColor:f.xaxisnamebordercolor,axisNameAlpha:f.xaxisnamealpha,axisNameFontAlpha:f.xaxisnamefontalpha,axisNameBgAlpha:f.xaxisnamebgalpha,axisNameBorderAlpha:f.xaxisnameborderalpha,axisNameBorderPadding:f.xaxisnameborderpadding,axisNameBorderRadius:f.xaxisnameborderradius,axisNameBorderThickness:f.xaxisnameborderthickness,axisNameBorderDashed:f.xaxisnameborderdashed,axisNameBorderDashLen:f.xaxisnameborderdashlen,axisNameBorderDashGap:f.xaxisnameborderdashgap,useEllipsesWhenOverflow:f.useellipseswhenoverflow,
divLineColor:d(f.vdivlinecolor,f.divlinecolor,e.getColor(l.divLineColor)),divLineAlpha:d(f.vdivlinealpha,f.divlinealpha,m?e.getColor("divLineAlpha3D"):e.getColor("divLineAlpha")),divLineThickness:a(f.vdivlinethickness,f.divlinethickness,1),divLineIsDashed:Boolean(a(f.vdivlinedashed,f.vdivlineisdashed,f.divlinedashed,f.divlineisdashed,0)),divLineDashLen:a(f.vdivlinedashlen,f.divlinedashlen,4),divLineDashGap:a(f.vdivlinedashgap,f.divlinedashgap,2),showAlternateGridColor:a(f.showalternatevgridcolor,
0),alternateGridColor:d(f.alternatevgridcolor,e.getColor("altVGridColor")),alternateGridAlpha:d(f.alternatevgridalpha,e.getColor("altVGridAlpha")),numDivLines:f.numvdivlines,labelFont:f.labelfont,labelFontSize:f.labelfontsize,labelFontColor:f.labelfontcolor,labelFontBold:f.labelfontbold,labelFontItalic:f.labelfontitalic,labelFontAlpha:f.labelalpha,maxLabelHeight:f.maxlabelheight,axisName:f.xaxisname,axisMinValue:f.xaxisminvalue,axisMaxValue:f.xaxismaxvalue,setAdaptiveMin:f.setadaptivexmin,adjustDiv:f.adjustvdiv,
labelDisplay:f.labeldisplay,showLabels:f.showlabels,rotateLabels:f.rotatelabels,slantLabel:a(f.slantlabels,f.slantlabel),labelStep:a(f.labelstep,f.xaxisvaluesstep),showAxisValues:a(f.showxaxisvalues,f.showxaxisvalue),showLimits:f.showvlimits,showDivLineValues:a(f.showvdivlinevalues,f.showvdivlinevalues),showZeroPlane:f.showvzeroplane,zeroPlaneColor:f.vzeroplanecolor,zeroPlaneThickness:f.vzeroplanethickness,zeroPlaneAlpha:f.vzeroplanealpha,showZeroPlaneValue:f.showvzeroplanevalue,trendlineColor:f.trendlinecolor,
trendlineToolText:f.trendlinetooltext,trendlineThickness:f.trendlinethickness,trendlineAlpha:f.trendlinealpha,showTrendlinesOnTop:f.showtrendlinesontop,showAxisLine:a(f.showxaxisline,f.showaxislines,f.drawAxisLines,0),axisLineThickness:a(f.xaxislinethickness,f.axislinethickness,1),axisLineAlpha:a(f.xaxislinealpha,f.axislinealpha,100),axisLineColor:d(f.xaxislinecolor,f.axislinecolor,"#000000")};l={outCanfontFamily:d(f.outcnvbasefont,f.basefont,"Verdana,sans"),outCanfontSize:hb(f.outcnvbasefontsize,
f.basefontsize,10),outCancolor:d(f.outcnvbasefontcolor,f.basefontcolor,e.getColor(l.baseFontColor)).replace(/^#? ([a-f0-9]+)/ig,"#$1"),useEllipsesWhenOverflow:f.useellipseswhenoverflow,showAlternateGridColor:0,axisNameFont:f.yaxisnamefont,axisNameFontSize:f.yaxisnamefontsize,axisNameFontColor:f.yaxisnamefontcolor,axisNameFontBold:f.yaxisnamefontbold,axisNameFontItalic:f.yaxisnamefontitalic,axisNameBgColor:f.yaxisnamebgcolor,axisNameBorderColor:f.yaxisnamebordercolor,axisNameAlpha:f.yaxisnamealpha,
axisNameFontAlpha:f.yaxisnamefontalpha,axisNameBgAlpha:f.yaxisnamebgalpha,axisNameBorderAlpha:f.yaxisnameborderalpha,axisNameBorderPadding:f.yaxisnameborderpadding,axisNameBorderRadius:f.yaxisnameborderradius,axisNameBorderThickness:f.yaxisnameborderthickness,axisNameBorderDashed:f.yaxisnameborderdashed,axisNameBorderDashLen:f.yaxisnameborderdashlen,axisNameBorderDashGap:f.yaxisnameborderdashgap};m=b.xAxis[0];m.setCommonConfigArr(s,!1,!1,!1);m.configure();g.axesArr={leftAxes:[],rightAxes:[],axesMap:[],
checkBox:[],leftSideSelected:!1};m=g.axesArr.leftAxes=[];u=g.axesArr.rightAxes=[];k=g.axesArr.axesMap=[];B=h.axis||[];q=0;for(P=B.length;q<P;q+=1){b.yAxis[q]?h=b.yAxis[q]:(h=b.yAxis[q]=new A,h.chart=this,h.init());V=B[q];s=!1;C=0;for(ra=V.dataset?V.dataset.length:0;C<ra;C+=1)0!==Number(V.dataset[C].visible)&&(s=!0);C=a(V.showaxis,1);ra=e.getPlotColor(q);p=d(V.color,f.axiscolor,ra);ea(p,100);Gb=a(V.divlinethickness,f.divlinethickness,1);z=a(V.tickwidth,f.axistickwidth,2);X=a(V.axislinethickness,f.axislinethickness,
2);(ra=!a(V.axisonleft,1))?(k.push({side:"r",index:u.length,showAxis:C,checkBoxChecked:s}),u.push({index:q,showAxis:C,checkBoxChecked:s})):(C&&(g.axesArr.leftSideSelected=!0),k.push({side:"l",index:m.length,showAxis:C,checkBoxChecked:s}),m.push({index:q,showAxis:C,checkBoxChecked:s}));l.labelStep=a(V.yaxisvaluesstep,V.yaxisvaluestep,f.yaxisvaluesstep,f.yaxisvaluestep);l.axisMaxValue=V.maxvalue;l.axisMinValue=V.minvalue;l.setAdaptiveMin=a(V.setadaptiveymin,f.setadaptiveymin);l.numDivLines=a(V.numdivlines,
f.numdivlines,4);l.adjustDiv=a(V.adjustdiv,f.adjustdiv);l.showAxisValues=a(V.showyaxisvalues,V.showyaxisvalue,f.showyaxisvalues,f.showyaxisvalue,1);l.showLimits=a(V.showlimits,f.showyaxislimits,f.showlimits,l.showAxisValues);l.showDivLineValues=a(V.showdivlinevalue,f.showdivlinevalues,V.showdivlinevalues,l.showAxisValues);l.showZeroPlane=a(V.showzeroplane,f.showzeroplane);l.showZeroPlaneValue=a(V.showzeroplanevalue,f.showzeroplanevalue);l.zeroPlaneColor=V.zeroplanecolor;l.zeroPlaneThickness=a(V.zeroplanethickness,
V.divlinethickness,g.zeroplanethickness,2);l.zeroPlaneAlpha=a(V.zeroplanealpha,V.divlinealpha,g.zeroplanealpha);l.showZeroPlaneOnTop=g.showzeroplaneontop;l.divLineColor=d(V.divlinecolor,p);l.divLineAlpha=a(V.divlinealpha,f.divlinealpha,e.getColor("divLineAlpha"),100);l.divLineThickness=Gb;l.divLineIsDashed=Boolean(a(V.divlinedashed,V.divlineisdashed,f.divlinedashed,f.divlineisdashed,0));l.divLineDashLen=a(V.divlinedashlen,f.divlinedashlen,4);l.divLineDashGap=a(V.divlinedashgap,f.divlinedashgap,2);
l.showAxisLine=1;l.axisLineThickness=X;l.axisLineAlpha=100;l.axisLineColor=p;l.tickLength=z;l.tickColor=p;l.tickAlpha=100;l.tickWidth=X;l.axisName=V.title;l.rotateAxisName=1;h.setCommonConfigArr(W({},l),!0,!1,ra);h.configure();c.parseMLAxisConf(V,q);0===a(V.showaxis)?(h.hide(),h.setAxisConfig({axisIndex:q,drawAxisLineWRTCanvas:!1,drawLabels:!1,drawPlotlines:!1,drawAxisLine:!1,drawPlotBands:!1,drawAxisName:!1,drawTrendLines:!1,drawTrendLabels:!1,drawTick:!1,drawTickMinor:!1})):(h.show(),h.setAxisConfig({axisIndex:q,
drawAxisLineWRTCanvas:!1,drawLabels:!0,drawPlotlines:!0,drawAxisLine:!0,drawPlotBands:!0,drawAxisName:!0,drawTrendLines:!0,drawTrendLabels:!0,drawTick:!0,drawTickMinor:!0}));n+=1}q=n;for(P=b.yAxis.length;q<P;q+=1)b.yAxis[q].hide()},_setAxisLimits:function(){var b=this.components,g=this.config.axisDataSetMap,e=b.dataset,b=b.yAxis,c=g.length,h,f=-Infinity,a=Infinity,l,m,d;for(h=0;h<c;h+=1){l=0;for(m=g[h].length;l<m;l+=1)d=e[g[h][l]].getDataLimits(),f=N(f,d.max),a=E(a,d.min);Infinity===a&&(a=0);-Infinity===
f&&(f=a+1);b[h].setDataLimit(f,a);f=-Infinity;a=Infinity}},_spaceManager:function(){var b,g,e=this.config,c=e.axesArr,h=this.components;g=e.legendPosition;var f=h.xAxis,s=h.yAxis,l=this.hasLegend,m=e.yDepth;b=h.legend;var d=e.axesPadding,B=0,q=0,P=e.axisDataSetMap.length,ra,V,u,k=this.jsonData.chart,p=a(k.showborder,this.is3D?0:1),h=h.canvas.config.canvasBorderWidth;ra=e.borderWidth=p?a(k.borderthickness,1):0;var Gb=e.canvasMarginTop,z=e.canvasMarginBottom,X=e.canvasMarginLeft,k=e.canvasMarginRight,
C=e.height,p=e.width;this._allocateSpace({top:ra,bottom:ra,left:ra,right:ra});this._allocateSpace({left:e.canvasMarginLeft,right:e.canvasMarginRight});ra=c.axesMap;V=c.leftAxes;c=c.rightAxes;u="right"===g?.3*e.canvasWidth:.3*e.canvasHeight;!1!==l&&f&&this._allocateSpace(b._manageLegendPosition(u));for(l=0;l<P;l+=1)0!==ra[l].showaxis&&(b=.7*e.canvasWidth,b=s[l].placeAxis(b),s[l]&&this._allocateSpace(b),u=ra[l],"r"===u.side?(c[u.index].width=b.right,B+=d):(V[u.index].width=b.left,q+=d));g=g===Qb?.225*
e.canvasHeight:.225*e.canvasWidth;this._manageChartMenuBar(g);b=.7*e.canvasWidth;b>B+q&&this._allocateSpace({left:q,right:B});g=.6*e.canvasHeight;f[0]&&this._allocateSpace(f[0].placeAxis(g));g=.325*e.canvasHeight;this._getDSspace&&this._allocateSpace(this._getDSspace(g));m&&this._allocateSpace({bottom:m});this._allocateSpace({top:h,bottom:h,left:h,right:h});f=Gb>e.canvasTop?Gb-e.canvasTop:0;m=z>C-e.canvasBottom?z+e.canvasBottom-C:0;B=X>e.canvasLeft?X-e.canvasLeft:0;q=k>p-e.canvasRight?k+e.canvasRight-
p:0;this._allocateSpace({top:f,bottom:m,left:B,right:q});e.actualCanvasMarginTop=f;e.actualCanvasMarginLeft=B;e.actualCanvasMarginRight=q;e.actualCanvasMarginBottom=m},_postSpaceManagement:function(){var b=this.config,g=this.components,e=g.xAxis&&g.xAxis[0],c=g.legend,h=b.xDepth,f=g.canvas.config,g=f.canvasBorderWidth,a=f.canvasPadding,l=f.canvasPaddingLeft,f=f.canvasPaddingRight;e&&e.setAxisDimention({x:b.canvasLeft+(h||0)+N(l,a),y:b.canvasBottom+(b.shift||0)+g,opposite:b.canvasTop-g,axisLength:b.canvasWidth-
(h||0)-N(l,a)-N(f,a)});e&&e.shiftLabels(-h,0);c.postSpaceManager()},_resuffelAxis:function(){var b=this.data("axisDetails"),g=b.iapi,e=g.config.axesArr,c,h,f,a,l;c=e.leftAxes;h=e.rightAxes;if("l"===b.position){for(a=c.length-1;a>b.index;a--)if(c[a].showAxis){f=a;l=b.index;break}void 0!==f&&(b=W({},c[l]),c[l]=W({},c[f]),c[f]=W({},b));if(e.leftSideSelected&&void 0===f)return;e.leftSideSelected=!0}else{for(a=0;a<b.index;a++)if(h[a].showAxis){f=a;l=b.index;break}void 0!==f&&(b=W({},h[l]),h[l]=W({},h[f]),
h[f]=W({},b));if(!e.leftSideSelected&&void 0===f)return;e.leftSideSelected=!1}g._drawAxis(!0)},_dolegendInteraction:function(b,g){var e=g.components.dataset,c=g.components.legend,h;if(this.checked)for(h in e)e.hasOwnProperty(h)&&(e[h].visible||e[h].axisIndex!==b||e[h].show());else for(h in e)e.hasOwnProperty(h)&&e[h].visible&&e[h].axisIndex===b&&e[h].hide();c.drawLegend()},_drawAxis:function(b){var g=this.config,e=g.axesArr,c=this.components,h=c.yAxis||[],f=c.xAxis||[],a=c.paper,l=g.allowAxisShift,
m=g.allowSelection,d=this.graphics.axisHotElement||[],B=this.graphics.trackerContainer,q=this.graphics.buttonGroup,P=c.canvas.config,ra=P.canvasBorderWidth,V=P.canvasPaddingTop,P=P.canvasPaddingBottom,k=g.axesPadding,ic=this.components.tb,qa=0,Gb=0,z=0,X,C,n,v,t,r,H,J,R,w,Q,y,U,E,L,Y,Sa=!1,N=0,aa,G;R=this.get("config","animationObj");aa=R.animObj;G=R.dummyObj;Q=R.transposeAnimDuration;y=R.animType;R=c.tb||(c.tb=new (FusionCharts.register("component",["toolbox","toolbox"])));R.init({iAPI:this,graphics:this.graphics,
chart:this,components:c});w=c.toolBoxAPI.CheckboxSymbol;t=e.leftAxes;c=e.rightAxes;E=e.checkBox;for(r in E)E.hasOwnProperty(r)&&E[r].checkbox.hide();J={cursor:"col-resize",stroke:p,fill:p,ishot:!0,visibility:!0};for(r=t.length-1;0<=r;--r)if(0!==t[r].showAxis&&(X=g.canvasLeft-ra-qa-k,C=g.canvasTop+V,n=g.canvasHeight-V-P,v=t[r].width,U=t[r].index,H=h[U],H.setAxisDimention({x:X,y:C,opposite:g.canvasRight+ra,axisLength:n}),qa+=v+k,!Sa&&e.leftSideSelected?(H.setAxisConfig({isActive:!0,axisNameAlignCanvas:!0,
drawAxisNameFromBottom:!0}),Sa=!0):H.setAxisConfig({isActive:!1,axisNameAlignCanvas:!0,drawAxisNameFromBottom:!0}),m&&(E[U]?(H=E[U],L=X-v-E[U].checkboxPrePos.x,Y=C+n+4-E[U].checkboxPrePos.y,H.checkbox.show(),H.checkbox.attachEventHandlers({click:{fn:this._dolegendInteraction,args:[U,this]}}),Q?H.checkbox.node.animateWith(G,aa,{transform:"t"+L+","+Y},Q,y):H.checkbox.node.attr({transform:"t"+L+","+Y})):(H=E[U]={},H.checkbox=new w(u,!0,N++,ic.pId),H.checkbox.conf=R.getDefaultConfiguration(),H.checkbox.attachEventHandlers({click:{fn:this._dolegendInteraction,
args:[U,this]}}),H.checkbox.draw(X-v,C+n+4,{parentLayer:q}),H.checkboxPrePos={x:X-v,y:C+n+4}),H.checkbox.node.attr({stroke:x({color:g.checkBoxColor,alpha:100})}),H.checkbox.node.attr({"stroke-width":[1,2]}),g.axisConfigured&&(t[r].checkBoxChecked?H.checkbox.check():H.checkbox.uncheck())),l)){J.x=X-v;J.y=C;J.width=v;J.height=n;if(d[z])for(n=d[z].attr(J),n.show(),X=0,C=n.events.length;X<C;X++)n.events[X].unbind(),n.events.splice(X,1),--C;else n=d[z]=a.rect(J,B);n.data("axisDetails",{iapi:this,position:"l",
index:r});qb?n.touchstart(this._resuffelAxis):n.mousedown(this._resuffelAxis);z+=1}r=0;for(qa=c.length;r<qa;r+=1)if(0!==c[r].showAxis&&(U=c[r].index,H=h[U],X=g.canvasRight+ra+Gb+k,C=g.canvasTop+V,n=g.canvasHeight-V-P,v=c[r].width,H.setAxisDimention({x:X,y:C,opposite:g.canvasLeft-ra,axisLength:n}),Gb+=c[r].width+k,Sa||e.leftSideSelected?H.setAxisConfig({isActive:!1,axisNameAlignCanvas:!0,drawAxisNameFromBottom:!0}):(H.setAxisConfig({isActive:!0,axisNameAlignCanvas:!0,drawAxisNameFromBottom:!0}),Sa=
!0),t=H.getAxisData("axisNamePadding"),m&&(E[U]?(H=E[U],L=X-v-H.checkboxPrePos.x,Y=C+n+4-H.checkboxPrePos.y,H.checkbox.show(),H.checkbox.attachEventHandlers({click:{fn:this._dolegendInteraction,args:[U,this]}}),Q?H.checkbox.node.animateWith(G,aa,{transform:"t"+L+","+Y},Q,y):H.checkbox.node.attr({transform:"t"+L+","+Y})):(H=E[U]={},H.checkbox=new w(u,!0,N++,ic.pId),H.checkbox.conf=R.getDefaultConfiguration(),H.checkbox.attachEventHandlers({click:{fn:this._dolegendInteraction,args:[U,this]}}),H.checkbox.draw(X+
t,C+n+4,{parentLayer:q}),H.checkboxPrePos={x:X-v,y:C+n+4}),H.checkbox.node.attr({stroke:x({color:g.checkBoxColor,alpha:100})}),H.checkbox.node.attr({"stroke-width":[1,2]}),g.axisConfigured&&(c[r].checkBoxChecked?H.checkbox.check():H.checkbox.uncheck())),l)){J.x=X;J.y=C;J.width=v;J.height=n;if(d[z])for(n=d[z].attr(J),n.show(),X=0,C=n.events.length;X<C;X++)n.events[X].unbind(),n.events.splice(X,1),--C;else n=d[z]=a.rect(J,B);n.data("axisDetails",{iapi:this,position:"r",index:r});qb?n.touchstart(this._resuffelAxis):
n.mousedown(this._resuffelAxis);z+=1}this.graphics.axisHotElement=d;r=z;for(qa=d.length;r<qa;r+=1)d[r].hide();if(!b)for(r=0,qa=f.length;r<qa;r++)f[r].draw();r=0;for(qa=h.length;r<qa;r++)h[r].draw();g.axisConfigured=!1}},M.mscartesian,{zeroplanethickness:1,zeroplanealpha:40,showzeroplaneontop:0});M("inversemsline",{friendlyName:"Inverted Y-Axis Multi-series Line Chart",standaloneInit:!0,creditLabel:n,defaultDatasetType:pa,defaultPlotShadow:1,applicableDSList:{LINE:!0}},M.msinversecartesian,{zeroplanethickness:1,
zeroplanealpha:40,showzeroplaneontop:0});M("inversemsarea",{friendlyName:"Inverted Y-Axis Multi-series Area Chart",standaloneInit:!0,creditLabel:n,defaultDatasetType:"area",applicableDSList:{area:!0}},M.msinversecartesian);M("inversemscolumn2d",{friendlyName:"Inverted Y-Axis Multi-series Column Chart",standaloneInit:!0,creditLabel:n,defaultDatasetType:xa,applicableDSList:{COLUMN:!0}},M.msinversecartesian);M("logmsline",{standaloneInit:!0,friendlyName:"Multi-series Line Chart",creditLabel:n,defaultDatasetType:pa,
defaultPlotShadow:1,applicableDSList:{LINE:!0}},M.mslog);M("logmscolumn2d",{friendlyName:"Multi-series Log Column Chart",standaloneInit:!0,creditLabel:n,defaultDatasetType:xa,applicableDSList:{COLUMN:!0}},M.mslog);M("logstackedcolumn2d",{friendlyName:"Stacked Log Column Chart",standaloneInit:!0,creditLabel:n,isStacked:!0},M.logmscolumn2d);M("errorbar2d",{friendlyName:"Error Bar Chart",standaloneInit:!0,creditLabel:n,showValues:0,isErrorChart:!0,fireGroupEvent:!0,hasLegend:!0,defaultDatasetType:"errorbar2d",
applicableDSList:{errorbar2d:!0},eiMethods:{}},M.mscartesian);FusionCharts.register("component",["dataset","ErrorBar2D",{configure:function(){var b=this.chart,g=this.config,e=this.JSONData,c=e.data,h=b.config.categories,f=E(h&&h.length,c&&c.length),s=b.jsonData.chart,l=b.components.colorManager,m,A=l.getPlotColor(this.index||this.positionIndex),B=a(e.dashed,s.plotborderdashed),q=a(s.useplotgradientcolor,1),P=v.parseUnsafeString,ra=P(s.yaxisname),V=P(s.xaxisname),k=P(d(s.tooltipsepchar,", ")),p=a(s.seriesnameintooltip,
1),qa=v.parseTooltext,n,z,X,C,r,t,w,y,H,J,R,tb,Q,S,U,D,L,Y,Sa,$b,aa,G,I,K,O,ha,T,ka,M=v.getDashStyle,$=this.components.data,ma=b.components.numberFormatter,W=b.isBar,Z=b.is3D;L=b.isStacked;var va,ca,ba;m={};m=m.dataObj||(m.dataObj={});J=m.chart||(m.chart={});g.legendSymbolColor=A;m=g.showplotborder=a(s.showplotborder,Z?0:1);g.plotDashLen=w=a(s.plotborderdashlen,5);g.plotDashGap=y=a(s.plotborderdashgap,4);g.plotfillAngle=R=a(360-s.plotfillangle,W?180:90);g.plotFillAlpha=tb=d(e.alpha,s.plotfillalpha,
La);g.plotColor=d(e.color,A);g.legendSymbolColor=g.plotColor;g.isRoundEdges=H=a(s.useroundedges,0);g.plotRadius=a(s.useRoundEdges,g.isRoundEdges?1:0);g.plotFillRatio=Q=d(e.ratio,s.plotfillratio);g.plotgradientcolor=S=v.getDefinedColor(s.plotgradientcolor,l.getColor("plotGradientColor"));!q&&(S=u);g.plotBorderAlpha=U=m?d(s.plotborderalpha,tb,La):0;g.plotBorderColor=D=d(s.plotbordercolor,Z?"#ffffff":l.getColor("plotBorderColor"));g.plotBorderThickness=q=a(s.plotborderthickness,1);g.plotBorderDashStyle=
B=B?M(w,y,q):"none";g.showValues=a(e.showvalues,s.showvalues,1);g.valuePadding=a(s.valuepadding,2);g.enableAnimation=va=a(s.animation,s.defaultanimation,1);g.animation=va?{duration:1E3*a(s.animationduration,1)}:!1;J.transposeAnimation=g.transposeAnimation=a(s.transposeanimation,J.transposeAnimation,va);g.transposeAnimDuration=1E3*a(s.transposeanimduration,.2);g.showShadow=H||Z?a(s.showshadow,1):a(s.showshadow,l.getColor("showShadow"));g.showHoverEffect=J=a(s.plothovereffect,s.showhovereffect,void 0);
g.showTooltip=l=a(s.showtooltip,1);g.stack100Percent=va=a(b.stack100percent,s.stack100percent,0);g.definedGroupPadding=N(a(s.plotspacepercent),0);g.plotSpacePercent=N(a(s.plotspacepercent,20)%100,0);g.maxColWidth=a(W?s.maxbarheight:s.maxcolwidth,50);g.showPercentValues=a(s.showpercentvalues,L&&va?1:0);g.showPercentInToolTip=a(s.showpercentintooltip,L&&va?1:0);g.plotPaddingPercent=a(s.plotpaddingpercent);g.rotateValues=a(s.rotatevalues)?270:0;g.placeValuesInside=a(s.placevaluesinside,0);g.includeInLegend=
a(e.includeinlegend,1);g.errorInPercent=ca=a(e.errorinpercent,s.errorinpercent);g.use3DLighting=a(s.use3dlighting,1);g.parentYAxis=va="s"===d(e.parentyaxis&&e.parentyaxis.toLowerCase(),"p")?1:0;$||($=this.components.data=[]);for(ba=0;ba<f;ba++)t=c&&c[ba],L=(C=$[ba])&&C.config,C||(C=$[ba]={graphics:{}}),C.config||(L=$[ba].config={}),L.showValue=a(t.showvalue,g.showValues),L.setValue=C=ma.getCleanValue(t.value),L.setLink=d(t.link),L.toolTipValue=z=ma.dataLabels(C,va),L.setDisplayValue=A=P(t.displayvalue),
L.displayValue=d(A,z),z=a(t.dashed),A=a(t.dashlen,w),n=y=a(t.dashgap,y),L.plotBorderDashStyle=n=1===z?M(A,n,q):0===z?"none":B,A=d(t.color,g.plotColor),tb=d(t.alpha,g.plotFillAlpha),0>C&&!H&&(r=R,R=W?180-R:360-R),L.colorArr=Y=v.graphics.getColumnColor(A+","+S,tb,Q,R,H,D,U.toString(),W?1:0,Z?!0:!1),L.label=z=F(P(d(h[ba].tooltext,h[ba].label))),0!==J&&(Sa=d(t.hovercolor,e.hovercolor,s.plotfillhovercolor,s.columnhovercolor,A),$b=d(t.hoveralpha,e.hoveralpha,s.plotfillhoveralpha,s.columnhoveralpha,tb),
aa=d(t.hovergradientcolor,e.hovergradientcolor,s.plothovergradientcolor,S),!aa&&(aa=u),G=d(t.hoverratio,e.hoverratio,s.plothoverratio,Q),I=a(360-t.hoverangle,360-e.hoverangle,360-s.plothoverangle,R),K=d(t.borderhovercolor,e.borderhovercolor,s.plotborderhovercolor,D),O=d(t.borderhoveralpha,e.borderhoveralpha,s.plotborderhoveralpha,s.plotfillhoveralpha,U,tb),tb=a(t.borderhoverthickness,e.borderhoverthickness,s.plotborderhoverthickness,q),ha=a(t.borderhoverdashed,e.borderhoverdashed,s.plotborderhoverdashed),
T=a(t.borderhoverdashgap,e.borderhoverdashgap,s.plotborderhoverdashgap,w),ka=a(t.borderhoverdashlen,e.borderhoverdashlen,s.plotborderhoverdashlen,y),ha=ha?M(ka,T,tb):n,1==J&&Sa===A&&(Sa=ob(Sa,70)),A=v.graphics.getColumnColor(Sa+","+aa,$b,G,I,H,K,O.toString(),W?1:0,Z?!0:!1),L.setRolloutAttr={fill:Z?[x(Y[0]),!g.use3DLighting]:x(Y[0]),stroke:m&&x(Y[1]),"stroke-width":q,"stroke-dasharray":n},L.setRolloverAttr={fill:Z?[x(A[0]),!g.use3DLighting]:x(A[0]),stroke:m&&x(A[1]),"stroke-width":tb,"stroke-dasharray":ha}),
n=L.toolTipValue,A=F(P(d(t.tooltext,e.plottooltext,s.plottooltext))),L.setErrorValue=Y=ma.getCleanValue(t.errorvalue),L.errorInPercent=a(t.errorinpercent,ca,0),L.errorInPercent&&(L.setErrorValue=Y=a((Y/100*C).toFixed(2))),L.positiveErrorValue=ma.getCleanValue(t.positiveerrorvalue),L.errorInPercent&&L.positiveErrorValue&&(L.positiveErrorValue=a((L.positiveErrorValue/100*C).toFixed(2))),L.negativeErrorValue=ma.getCleanValue(t.negativeerrorvalue),L.errorInPercent&&L.negativeErrorValue&&(L.negativeErrorValue=
a((L.negativeErrorValue/100*C).toFixed(2))),L.errorToolTipValue=Sa=ma.dataLabels(Y,va),L.negativeErrorToolTipValue=ma.dataLabels(L.negativeErrorValue,va),L.positiveErrorToolTipValue=ma.dataLabels(L.positiveErrorValue,va),L.errorPercentValue=$b=ga(Y/C*La*La)/La+"%",l?null===n?t=!1:void 0!==A?(C=[1,2,3,4,5,6,7,99,100,101,102,120,121],z={yaxisName:ra,xaxisName:V,formattedValue:n,errorValue:Y,errorDataValue:Sa,errorPercentValue:$b,errorPercentDataValue:$b,positiveErrorValue:L.positiveErrorToolTipValue,
negativeErrorValue:L.negativeErrorToolTipValue,label:z},t=qa(A,C,z,t,s,e)):(p&&(X=la(e&&e.seriesname)),t=X?X+k:u,t+=z?z+k:u):t=!1,L.toolText=t,L.setTooltext=t,r&&(R=r);g=this.config.includeInLegend;!1!==b.hasLegend&&g&&this._addLegend();this.ErrorValueConfigure()},ErrorValueConfigure:function(){var b=this.chart,g=this.config,e=this.JSONData,c=e.data,h=b.config.categories,h=E(h&&h.length,c&&c.length),f=b.jsonData.chart,b=v.parseUnsafeString,s,l,m,A=this.components.data,B=b(f.yaxisname),q=b(f.xaxisname),
P=a(f.seriesnameintooltip,1),ra,V=b(d(f.tooltipsepchar,", ")),k,p,qa,n,z,X,C,t=-Infinity,r=Infinity,x,w,H,J,R=function(b){g.showTooltip?null===z?b=!1:void 0!==b?(k=[1,2,3,4,5,6,7,99,100,101,102,120,121],p={yaxisName:B,xaxisName:q,formattedValue:m.toolTipValue,errorValue:n,errorDataValue:m.errorToolTipValue,errorPercentValue:m.errorPercentValue,errorPercentDataValue:m.errorPercentValue,positiveErrorValue:m.positiveErrorToolTipValue,negativeErrorValue:m.negativeErrorToolTipValue,label:m.label},b=Ba(b,
k,p,s,f,e)):(P&&(ra=la(e&&e.seriesname)),b=ra?ra+V:u,b+=m.label?m.label+V:u):b=!1;return b},y;g.showValues=a(e.showvalues,f.showvalues,0);g.errorBarShadow=C=a(f.errorbarshadow,f.showshadow,1);g.ignoreEmptyDatasets=a(e.ignoreemptydatasets,0);w=a(f.halferrorbar,1);g.notHalfErrorBar=!a(f.halferrorbar,1);qa=Za(d(e.errorbaralpha,f.errorbaralpha,g.plotFillAlpha));g.errorBarWidthPercent=a(e.errorbarwidthpercent,f.errorbarwidthpercent,70);g.errorBarColor=ea(Ha(d(e.errorbarcolor,f.errorbarcolor,"AAAAAA")),
qa);g.errorBarThickness=a(e.errorbarthickness,f.errorbarthickness,1);g.shadowOpacity=C?qa/250:0;for(y=0;y<h;y++)if(s=c&&c[y],m=(l=A[y])&&l.config,C=qa=void 0,void 0!==a(s.value)){l||(l=A[y]={graphics:{}});l.config||(m=A[y].config={});m.notHalfErrorBar=g.notHalfErrorBar;m.halfErrorBar=w;x=m.setValue;m.showValue=a(s.showvalue,g.showValues);m.hasErrorValue=void 0!==a(s.errorvalue)?1:0;n=m.setErrorValue;m.errorValue=n;z=l=m.errorToolTipValue;X=F(b(d(s.errorplottooltext,e.errorplottooltext,f.errorplottooltext,
z)));l=R(X);(X=F(b(d(s.errorplottooltext,e.errorplottooltext,f.errorplottooltext,m.positiveErrorToolTipValue))))&&m.positiveErrorToolTipValue&&(qa=R(X));(X=F(b(d(s.errorplottooltext,e.errorplottooltext,f.errorplottooltext,m.negativeErrorToolTipValue))))&&m.negativeErrorToolTipValue&&(C=R(X));H=m.positiveErrorValue;J=m.negativeErrorValue;if(H||J)m.halfErrorBar=0,m.notHalfErrorBar=!0;X=x+(null!==H?H:n);x-=m.halfErrorBar?0:0>J&&0>x?0:null!=J?J:n;t=N(t,X,x);r=E(r,X,x);null==n&&(n=void 0);m.errorValueArr=
[];m.errorValueArr.push({errorValue:null!=J?J:null!==H?n:-n,tooltext:C||l});m.notHalfErrorBar&&m.errorValueArr.push({errorValue:null!==H?-H:null!=J?-n:n,tooltext:qa||l})}g.maxValue=t;g.minValue=r},init:function(b){var g=this.chart,e=g.components,e=g.isDual?e.yAxis[this.yAxis||0]:e.yAxis[0];if(!b)return!1;this.JSONData=b;this.yAxis=e;this.chartGraphics=g.chartGraphics;this.components={};this.graphics={};this.visible=1===a(this.JSONData.visible,!Number(this.JSONData.initiallyhidden),1);this.configure()},
draw:function(){var b=this,g=b.JSONData,e=b.chart.jsonData.chart,c=b.config,h=b.groupManager,f=b.index,s=b.chart.config.categories,l=g.data,m,A,B,q,P=b.visible,ra=b.chart,V=ra.components.paper,k=ra.components.xAxis[0],n=ra.components.yAxis[0];m=ra.graphics.columnGroup;var qa,t,z=ra.graphics,X=v.parseUnsafeString,C=v.getValidValue,r=v.Raphael,w=c.showTooltip,y=k.getAxisPosition(0),ac=k.getAxisPosition(1),H=c.groupMaxWidth=ac-y,J=c.definedGroupPadding,R=c.plotSpacePercent/200,tb=h.getDataSetPosition(b),
y=h.manageClip,Q=c.maxColWidth,S=ra.get("config","animationObj"),ac=S.animType,U=S.animObj,N=S.dummyObj,S=S.duration,H=(1-.01*J)*H||E(H*(1-2*R),1*Q),H=a(tb.columnWidth,H/1),L,J=tb.xPosOffset||0,tb=tb.height,Y,Sa,R=b.components.data,D,aa,G,F,I,O;F={};O={};var Q=n.getLimit(),K=Q.min,Q=0<Q.max&&0>K,K=n.getAxisBase(),T=n.yBasePos=n.getAxisPosition(K),M=0,$=c.showShadow,W=c.plotBorderThickness,ma=c.plotRadius,Z=b.graphics.container,ba=b.graphics.trackerContainer,va=b.graphics.dataLabelContainer,ca=b.graphics.shadowContainer,
ga=b.graphics.errorGroupContainer,pa=b.graphics.errorTrackerContainer,ea=b.graphics.errorShadowContainer;q=z.trackerGroup;var da,ia,z=!0,la=!1,oa=!1,na,Ga=(b.components.removeDataArr||[]).length,ja=b.components.pool||[],c=c.showHoverEffect,ta=function(b){return function(c){0!==this.data("showHoverEffect")&&b.attr(this.data("setRolloverAttr"));za.call(this,ra,c,"DataPlotRollOver")}},ya=function(b){return function(c){0!==this.data("showHoverEffect")&&b.attr(this.data("setRolloutAttr"));za.call(this,
ra,c,"DataPlotRollOut")}},sa=function(b){za.call(this,ra,b)},ua=function(){!1!==b.visible||!1!==b._conatinerHidden&&void 0!==b._conatinerHidden||(Z.hide(),ba.hide(),ca.hide(),va&&va.hide(),ga&&ga.hide(),pa&&pa.hide(),ea&&ea.hide(),b._conatinerHidden=!0)},Aa=function(){b.drawLabel();b.drawErrorValue()};Z||(Z=b.graphics.container=V.group("columns",m),P||Z.hide());ba||(ba=b.graphics.trackerContainer=V.group("col-hot",q),P||ba.hide());ca||(ca=b.graphics.shadowContainer=V.group("shadow",m).toBack(),P||
ca.hide());m=k.getCategoryLen();for(q=0;q<m;q++)if(A=l&&l[q],F=(O=(D=R[q])&&D.config)&&O.setValue,na=!1,void 0!==D&&void 0!==F&&null!==F){qa=0<=F;G=O.setLink;da=O.colorArr;D.graphics||(R[q].graphics={});I=O.displayValue;qa=qa?O.previousPositiveY:O.previousNegativeY;Sa=C(X(d(A.tooltext,g.plottooltext,e.plottooltext)));L=n.getAxisPosition(qa||K);A=k.getAxisPosition(q)+J;0!==tb?(qa=n.getAxisPosition(F+(qa||0)),Y=Ca(L-qa)):(Y=0,qa=L);qa=E(qa,L);!Q&&y&&P&&0<W&&(Y+=W,h.manageClip=!1);D._oriXPos=A;D._oriYPos=
qa;D._oriHeight=Y;D._oriWidth=H;h.isCrisp?(t=r.crispBound(A,qa,H,Y,W),A=t.x,qa=t.y,L=t.width,Y=t.height):L=H;Sa=O.toolText+(Sa?u:O.toolTipValue);ia=O.plotBorderDashStyle;I={index:q,link:G,value:F,displayValue:I,categoryLabel:s[q].label,toolText:Sa,id:u,datasetIndex:f,datasetName:g.seriesname,visible:P};F=O.setRolloutAttr;O=O.setRolloverAttr;S||(T=qa,M=Y);B={x:A,y:T,width:L,height:M||1,r:ma,ishot:!w,fill:x(da[0]),stroke:x(da[1]),"stroke-width":W,"stroke-dasharray":ia,"stroke-linejoin":"miter",visibility:P};
D._xPos=A;D._yPos=qa;D._height=Y;D._width=L;D.graphics.element?(la=oa=!0,aa=D.graphics.element,B={x:A,y:qa,width:L,height:Y||1},aa.animateWith(N,U,B,S,ac,z&&ua),aa.attr({r:ma,ishot:!w,fill:x(da[0]),stroke:x(da[1]),"stroke-width":W,"stroke-dasharray":ia,"stroke-linejoin":"miter",visibility:P})):(ja.element&&ja.element.length?(aa=D.graphics.element=ja.element.shift(),aa.show()):(aa=D.graphics.element=V.rect(B,Z),na=!0),aa.attr(B),aa.animateWith(N,U,{y:qa,height:Y||1},S,ac,z&&Aa),S?z=!1:la=oa=!0);aa.shadow({opacity:$},
ca).data("BBox",t);if(G||w)Y<Pa&&(qa-=(Pa-Y)/2,Y=Pa),B={x:A,y:qa,width:L,height:Y,r:ma,cursor:G?"pointer":u,stroke:p,"stroke-width":W,fill:p,ishot:!0,visibility:P},D.graphics.hotElement?D.graphics.hotElement.attr(B):(ja.hotElement&&ja.hotElement.length?(G=D.graphics.hotElement=ja.hotElement.shift(),G.show()):(G=D.graphics.hotElement=V.rect(B,ba),na=!0),G.attr(B));G=D.graphics.hotElement;(G||aa).data("eventArgs",I).data("groupId",void 0).data("showHoverEffect",c).data("setRolloverAttr",O).data("setRolloutAttr",
F);na&&(G||aa).click(sa).hover(ta(aa),ya(aa));w?(G||aa).tooltip(Sa):(G||aa).tooltip(!1)}Ga&&b.remove();la&&b.drawLabel();oa&&b.drawErrorValue()},show:function(){var b=this.graphics&&this.graphics.container,g=this.graphics&&this.graphics.trackerContainer,e=this.graphics&&this.graphics.dataLabelContainer,c=this.graphics&&this.graphics.shadowContainer,h=this.graphics&&this.graphics.errorGroupContainer,f=this.graphics&&this.graphics.errorTrackerContainer,a=this.graphics&&this.graphics.errorShadowContainer,
l=this.chart.is3D,d=this.components.data,A=this.chart.config.categories,B=this.yAxis,q=this.chart,A=E(this.JSONData.data&&this.JSONData.data.length,A&&A.length);q._chartAnimation();this.visible=!0;this._conatinerHidden=!1;if(l)for(b=0;b<A;b++)d[b].graphics.element&&d[b].graphics.element.attr({visibility:"visible"}),d[b].graphics.hotElement&&d[b].graphics.hotElement.attr({visibility:"visible"});else b.show(),g.show();c.show();e&&e.show();h&&h.show();f&&f.show();a&&a.show();q._setAxisLimits();B.draw();
q._drawDataset()},hide:function(){var b=this.yAxis,g=this.chart;g._chartAnimation();this.visible=!1;g._setAxisLimits();b.draw();g._drawDataset()},drawErrorValue:function(){var b=this.config,g=this.chart.config.categories,e=this.JSONData.data,c=g&&g.length,h=e&&e.length,f,a=this.visible,l=this.chart,d=l.graphics.columnGroup,e=l.components.paper,g=l.components.yAxis[0],A=this.components.data,B=this.groupManager.getDataSetPosition(this).height,q=l.get("config","animationObj"),P=q.animType,ra=q.animObj,
V=q.dummyObj,q=q.duration,k=b.errorBarThickness,n=b.errorBarWidthPercent,qa=b.errorBarColor,t=b.showTooltip,b=b.shadowOpacity,z=this.graphics.errorGroupContainer,X=this.graphics.errorTrackerContainer,C=this.graphics.errorShadowContainer,v=l.graphics.trackerGroup,r,x,w,H,J,R,y,Q,S,U,D,L,Y,N=function(b){za.call(this,l,b)},F=function(b){za.call(this,l,b,"DataPlotRollOver")},aa=function(b){za.call(this,l,b,"DataPlotRollOut")},G=function(b){return function(){void 0!==b&&l.linkClickFN.call({link:b},l)}};
z||(z=this.graphics.errorGroupContainer=e.group("errorBar",d),a||z.hide());X||(X=this.graphics.errorTrackerContainer=e.group("error-hot",v),a||X.hide());C||(C=this.graphics.errorShadowContainer=e.group("error-shadow",d).toBack(),a||C.hide());c=E(c,h);for(h=0;h<c;h++)if(w=(v=(d=A[h])&&d.config)&&v.setValue,!d||void 0!==w&&null!==w||(d.graphics.element&&(d.graphics.element.hide(),d.graphics.element.shadow(!1)),d.graphics.hotElement&&d.graphics.hotElement.hide(),d.graphics.error&&d.graphics.error[0]&&
(d.graphics.error[0].hide(),d.graphics.error[0].shadow({opacity:0})),d.graphics.error&&d.graphics.error[1]&&(d.graphics.error[1].hide(),d.graphics.error[1].shadow({opacity:0})),d.graphics.errorTracker&&d.graphics.errorTracker[0]&&(d.graphics.errorTracker[0].hide(),d.graphics.errorTracker[0].shadow({opacity:0})),d.graphics.errorTracker&&d.graphics.errorTracker[1]&&(d.graphics.errorTracker[1].hide(),d.graphics.errorTracker[1].shadow({opacity:0}))),void 0!==d&&void 0!==w&&null!==w)if(Q=v.errorValueArr,
S=Q.length,!d.graphics.error&&(d.graphics.error=[]),!d.graphics.errorTracker&&(d.graphics.errorTracker=[]),v.errorValue===u||void 0===v.errorValue||null===v.errorValue&&null===v.positiveErrorValue&&null===v.negativeErrorValue)d.graphics.error&&d.graphics.error[0]&&(d.graphics.error[0].hide(),d.graphics.error[0].shadow({opacity:0})),d.graphics.error&&d.graphics.error[1]&&(d.graphics.error[1].hide(),d.graphics.error[1].shadow({opacity:0})),d.graphics.errorTracker&&d.graphics.errorTracker[0]&&(d.graphics.errorTracker[0].hide(),
d.graphics.errorTracker[0].shadow({opacity:0})),d.graphics.errorTracker&&d.graphics.errorTracker[1]&&(d.graphics.errorTracker[1].hide(),d.graphics.errorTracker[1].shadow({opacity:0}));else{a=v.setLink;U=0>w;r=d._oriXPos;D=d._oriYPos;L=d._oriWidth;Y=d._oriHeight;w=U?D+Y:D;for(x=r+L/2;S--;)if(R=H=null,R=Q[S],r=R.tooltext,f=w,H=R.errorValue,null===H||isNaN(H))d.graphics.error&&d.graphics.error[S]&&(d.graphics.error[S].hide(),d.graphics.error[S].shadow({opacity:S})),d.graphics.errorTracker&&d.graphics.errorTracker[S]&&
(d.graphics.errorTracker[S].hide(),d.graphics.errorTracker[S].shadow({opacity:S}));else{R=n/100*L;R/=2;J=0===B?0:1;y=D+(g.getAxisPosition(0)-g.getAxisPosition(1))*H*J;U&&(y+=Y);H=y;J=x;H=ga(y)+k%2/2;J=ga(x)+k%2/2;R=["M",J,f,"V",H,"M",J-R,H,"H",J+R];d.graphics.error[S]?(f={path:R},H=d.graphics.error[S],H.animateWith(V,ra,f,q,P),H.attr({stroke:qa,ishot:!t,"stroke-width":k,cursor:a?"pointer":u,"stroke-linecap":"round"})):H=d.graphics.error[S]=e.path(R,z).attr({stroke:qa,ishot:!t,"stroke-width":k,cursor:a?
"pointer":u,"stroke-linecap":"round"});H.show();H.shadow({opacity:b},C);f={path:R,stroke:p,"stroke-width":k<Pa?Pa:k,cursor:a?"pointer":u,ishot:!!a};if(d.graphics.errorTracker[S])d.graphics.errorTracker[S].show(),d.graphics.errorTracker[S].attr(f);else if(a||t)R=d.graphics.errorTracker[S]=e.path(X).attr(f);f=d.graphics.element&&(d.graphics.element.data("eventArgs")||d.graphics.hotElement.data("eventArgs"));(R=d.graphics.errorTracker[S])&&R.data("eventArgs",f);R&&R.click(N).data("groupId",void 0).hover(F,
aa);t?R&&R.tooltip(r):R&&R.tooltip(!1);(a||t)&&R&&R.click(G(a))}v.notHalfErrorBar||(d.graphics.error&&d.graphics.error[1]&&d.graphics.error[1].hide()&&d.graphics.error[1].shadow({opacity:0}),d.graphics.errorTracker&&d.graphics.errorTracker[1]&&d.graphics.errorTracker[1].hide()&&d.graphics.errorTracker[1].shadow({opacity:0}))}},remove:function(){var b=this.components,g=b.removeDataArr,e=b.pool||(b.pool={element:[],hotElement:[],label:[]}),c=g.length,h,f=this.maxminFlag,a,d;for(d=0;d<c;d++)h=g[0],g.splice(0,
1),h&&h.graphics&&(a=h.graphics,a.element&&a.element.hide()&&a.element.shadow({opacity:0}),a.error&&a.error[0]&&a.error[0].hide()&&a.error[0].shadow({opacity:0}),a.error&&a.error[1]&&a.error[1].hide()&&a.error[1].shadow({opacity:0}),a.errorTracker&&a.errorTracker[0]&&a.errorTracker[0].hide()&&a.errorTracker[0].shadow({opacity:0}),a.errorTracker&&a.errorTracker[1]&&a.errorTracker[1].hide()&&a.errorTracker[1].shadow({opacity:0}),a.hotElement&&a.hotElement.hide()&&a.hotElement.attr({width:0}),h.graphics.element&&
(e.element=e.element.concat(h.graphics.element)),h.graphics.hotElement&&(e.hotElement=e.hotElement.concat(h.graphics.hotElement)),h.graphics.label&&(e.label=e.label.concat(h.graphics.label)));b.pool=e;f&&this.setMaxMin()}},"Column"]);FusionCharts.register("component",["datasetGroup","errorbar2d",{},xa]);M("errorline",{friendlyName:"Error Line Chart",useErrorGroup:!0,isErrorChart:!0,fireGroupEvent:!0,creditLabel:n,defaultPlotShadow:1,axisPaddingLeft:0,axisPaddingRight:0,canvasPaddingModifiers:["anchor",
"errorbar"],defaultDatasetType:"errorline",applicableDSList:{errorline:!0}},M.mscartesian,{zeroplanethickness:1,zeroplanealpha:40,showzeroplaneontop:0});FusionCharts.register("component",["dataset","ErrorLine",{type:pa,ErrorValueConfigure:function(){var b=this.chart,g=this.config,e=g.parentYAxis,c=this.JSONData,h=c.data,f=b.jsonData.chart,s=b.components.xAxis[0].getCategoryLen(),l=v.parseUnsafeString,m,A,B,q=this.components.data,b=b.components.numberFormatter,P,ra,V,k,p=g.lineThickness,n=-Infinity,
t=Infinity,z,X=l(f.yaxisname),C=l(f.xaxisname),r=d(f.tooltipsepchar,", "),x,w,y,H=a(f.seriesnameintooltip,1),J=function(b){g.showTooltip?null===V?b=!1:void 0!==b?(x=[1,2,3,4,5,6,7,99,100,101,102],w={yaxisName:X,xaxisName:C,formattedValue:B.toolTipValue,errorValue:ra,errorDataValue:B.errorToolTipValue,errorPercentValue:B.errorPercentValue,errorPercentDataValue:B.errorPercentValue,label:B.label},b=Ba(b,x,w,m,f,c)):(H&&(y=la(c&&c.seriesname)),b=y?y+r:u,b+=B.label?B.label+r:u):b=!1;return b};g.errorBarShadow=
k=a(f.errorbarshadow,f.showshadow,1);g.ignoreEmptyDatasets=a(c.ignoreemptydatasets,0);z=a(f.halferrorbar,1);g.notHalfErrorBar=!a(f.halferrorbar,1);P=Za(d(c.errorbaralpha,f.errorbaralpha,g.lineAlpha));g.errorBarWidth=a(c.errorbarwidth,f.errorbarwidth,5);g.errorBarColor=ea(Ha(d(c.errorbarcolor,f.errorbarcolor,"AAAAAA")),P);A=a(c.errorbarthickness,f.errorbarthickness,1);g.errorBarThickness=A>p?p:A;g.shadowOpacity=k?P/250:0;for(P=0;P<s;P++)h&&(m=h&&h[P],B=(A=q[P])&&A.config,A||(A=q[P]={graphics:{}}),
A.config||(B=q[P].config={}),p=B.setValue,ra=b.getCleanValue(m.errorvalue),B.errorToolTipValue=b.dataLabels(ra,e),ga(ra/p*La*La),B.hasErrorValue=void 0!==a(m.errorvalue)?1:0,ra=b.getCleanValue(m.errorvalue),V=A=B.errorToolTipValue,A=F(l(d(m.errorplottooltext,c.errorplottooltext,f.errorplottooltext,V))),B.errorValue=m.errorvalue,k=p+ra,p-=z?0:ra,n=N(n,k,p),t=E(t,k,p),A=J(A),B.errorValueArr=[],B.errorValueArr.push({errorValue:-ra,tooltext:A}),g.notHalfErrorBar&&B.errorValueArr.push({errorValue:ra,tooltext:A}),
B.toolText=J(B.setTooltext));g.maxValue=n;g.minValue=t},init:function(b){var g=this.chart,e=g.components,c=g.isDual;this.chart=g;this.yAxis=c?e.yAxis[this.yAxis||0]:e.yAxis[0];this.components={};this.graphics={};this.JSONData=b;this.visible=1===a(this.JSONData.visible,!Number(this.JSONData.initiallyhidden),1);this.configure()},show:function(){var b=this.chart,g=this.yAxis,e=this.graphics&&this.graphics.container,c=this.graphics&&this.graphics.trackerContainer,h=this.graphics&&this.graphics.dataLabelContainer,
f=this.graphics&&this.graphics.errorGroupContainer,a=this.graphics&&this.graphics.errorTrackerContainer,d=this.graphics&&this.graphics.errorShadowContainer;b._chartAnimation();e.lineGroup.show();e.anchorGroup.show();e.anchorShadowGroup.show();e.lineShadowGroup.show();c.show();h.show();this.visible=!0;f&&f.show();a&&a.show();d&&d.show();this._conatinerHidden=!1;b._setAxisLimits();g.draw();b._drawDataset()},hide:function(){var b=this.chart,g=this.yAxis;b._chartAnimation();this.visible=!1;b._setAxisLimits();
g.draw();b._drawDataset()},drawErrorValue:function(){var b=this.config,g=this.chart,e=g.graphics.datasetGroup,c=g.components,h=c.xAxis[0].getCategoryLen(),f,a,d=this.visible,c=c.paper,m=this.yAxis,A=this.components.data,B=g.get("config","animationObj"),q=B.animType,P=B.animObj,ra=B.dummyObj,B=B.duration,V=b.errorBarThickness,k=b.errorBarWidth,n=b.errorBarColor,qa=b.showTooltip,t=b.shadowOpacity,z=this.graphics.container.lineGroup,X=this.graphics.errorGroupContainer,C=this.graphics.errorTrackerContainer,
v=this.graphics.errorShadowContainer;a=g.graphics.trackerGroup;var r=this.graphics.trackerContainer,x,w,H,J,y,E,Q,S,U,D=function(b){za.call(this,g,b)},L=function(b){za.call(this,g,b,"DataPlotRollOver")},Y=function(b){za.call(this,g,b,"DataPlotRollOut")},N=function(b){return function(){void 0!==b&&g.linkClickFN.call({link:b},g)}};X||(X=this.graphics.errorGroupContainer=c.group("errorBar",e).insertAfter(z),d||X.hide());C||(C=this.graphics.errorTrackerContainer=c.group("error-hot",a).insertBefore(r),
d||C.hide());v||(v=this.graphics.errorShadowContainer=c.group("error-shadow",e).insertBefore(X),d||v.hide());for(e=0;e<h;e++)if(a=(x=(z=A[e])&&z.config)&&x.setValue,void 0===z||void 0===a||null===a){if(z.graphics.error)for(a=0;a<z.graphics.error.length;a++)z.graphics.error[a].hide(),z.graphics.errorTracker[a].hide(),z.graphics.error[a].shadow(!1)}else if(a=x.errorValueArr,r=a.length,!z.graphics.error&&(z.graphics.error=[]),!z.graphics.errorTracker&&(z.graphics.errorTracker=[]),x.errorValue===u||void 0===
x.errorValue)z.graphics.error&&z.graphics.error[0]&&(z.graphics.error[0].hide(),z.graphics.error[0].shadow({opacity:0})),z.graphics.error&&z.graphics.error[1]&&(z.graphics.error[1].hide(),z.graphics.error[1].shadow({opacity:0}));else{x=x.setLink;w=z._xPos;J=U=z._yPos;for(H=w;r--;){Q=y=null;Q=a[r];w=Q.tooltext;f=J;E=Q.errorValue;Q=k/2;y=d?1:0;y=S=U+(m.getAxisPosition(0)-m.getAxisPosition(1))*E*y;E=H;y=ga(S)+V%2/2;E=ga(H)+V%2/2;Q=["M",E,f,"V",y,"M",E-Q,y,"H",E+Q];z.graphics.error[r]?(f={path:Q},y=z.graphics.error[r],
y.animateWith(ra,P,f,B,q),y.attr({stroke:n,ishot:!qa,"stroke-width":V,cursor:x?"pointer":u,"stroke-linecap":"round"})):y=z.graphics.error[r]=c.path(Q,X).attr({stroke:n,ishot:!qa,"stroke-width":V,cursor:x?"pointer":u,"stroke-linecap":"round"});y.show();y.shadow({opacity:t},v);f={path:Q,stroke:p,"stroke-width":V<Pa?Pa:V,cursor:x?"pointer":u,ishot:!!x};if(z.graphics.errorTracker[r])z.graphics.errorTracker[r].attr(f);else if(x||qa)Q=z.graphics.errorTracker[r]=c.path(C).attr(f);f=z.graphics.element&&z.graphics.element.data("eventArgs")||
z.graphics.hotElement&&z.graphics.hotElement.data("eventArgs");(Q=z.graphics.errorTracker[r])&&Q.show();Q&&Q.data("eventArgs",f);Q&&Q.click(D).data("groupId",void 0).hover(L,Y);qa?Q&&Q.tooltip(w):Q&&Q.tooltip(!1);(x||qa)&&Q&&Q.click(N(x))}b.notHalfErrorBar||(z.graphics.error&&z.graphics.error[1]&&z.graphics.error[1].hide()&&z.graphics.error[1].shadow({opacity:0}),z.graphics.errorTracker&&z.graphics.errorTracker[1]&&z.graphics.errorTracker[1].hide()&&z.graphics.errorTracker[1].shadow({opacity:0}))}},
manageSpace:function(){var b=.5*this.config.errorBarWidth,g=this.chart,e=g.config.dataLabelStyle,c=(this.components||{}).data||[],h=c[0],c=c[c.length-1],f,d;f={};var l,m,A,B=g.linkedItems.smartLabel,q={paddingLeft:0,paddingRight:0};h&&(h=h.config,A=h.showValue,d=h&&h.anchorProps||{},A&&(f=h.displayValue,B.useEllipsesOnOverflow(g.config.useEllipsesWhenOverflow),B.setStyle(e),f=B.getOriSize(f)),h.setValue&&(l=N(a(d.radius,0),b)+a(d.borderThickness,0),m=(f.width||0)/2),q.paddingLeft=N(l,m));c&&(h=c.config,
A=h.showValue,d=h&&h.anchorProps||{},A&&(f=h.displayValue,B.setStyle(e),f=B.getOriSize(f)),h.setValue&&(l=N(a(d.radius,0),b)+a(d.borderThickness,0),m=(f.width||0)/2),q.paddingRight=N(l,m));return q},_removeDataVisuals:function(b){b&&(b=b.graphics,b.element&&b.element.hide()&&b.element.shadow({opacity:0}),b.error&&b.error[0]&&b.error[0].hide()&&b.error[0].shadow({opacity:0}),b.error&&b.error[1]&&b.error[1].hide()&&b.error[1].shadow({opacity:0}),b.errorTracker&&b.errorTracker[0]&&b.errorTracker[0].hide()&&
b.errorTracker[0].shadow({opacity:0}),b.errorTracker&&b.errorTracker[1]&&b.errorTracker[1].hide()&&b.errorTracker[1].shadow({opacity:0}),b.hotElement&&b.hotElement.hide()&&b.hotElement.attr({width:0}))}},pa]);M("errorscatter",{friendlyName:"Error Scatter Chart",isXY:!0,standaloneInit:!0,creditLabel:n,defaultDatasetType:"errorscatter",applicableDSList:{errorscatter:!0},defaultZeroPlaneHighlighted:!1,useErrorGroup:!0,isErrorChart:!0,fireGroupEvent:!0,initAnimation:!0},M.scatterBase);FusionCharts.register("component",
["dataset","ErrorScatter",{ErrorValueConfigure:function(){var b=this.chart,g=b.components,e=this.config,c=this.JSONData,h=b.config.categories,f=b.jsonData.chart,s=c.data,l=g.xAxis[0].getCategoryLen(),l=s&&s.length||l,m=v.parseUnsafeString,A,B,q,P=this.components.data,ra=g.numberFormatter,V,k,u,p,n,z,X,C,t,r,x,w,H,J,R=d(f.tooltipsepchar,", "),D=m(f.yaxisname),Q=m(f.xaxisname),S=e.parentYAxis,U,I,L,Y,Sa,K,aa,G,T,M=-Infinity,O=Infinity,ha=Infinity,W=-Infinity,ka=function(b,g){var h;e.showTooltip?null===
I?h=!1:void 0!==b?(Sa=[1,2,3,4,5,6,7,8,9,10,11,99,100,101,102,103,104,105,106,107,109],K={yaxisName:D,xaxisName:Q,yDataValue:I,xDataValue:q.label,formattedValue:q.toolTipValue,horizontalErrorValue:t,horizontalErrorDataValue:x,verticalErrorValue:r,verticalErrorDataValue:H,horizontalErrorPercent:L,verticalErrorPercent:Y,label:q.label,errorValue:g,errorDataValue:g,errorPercentValue:q.errorPercentValue,errorPercentDataValue:q.errorPercentValue},h=Ba(b,Sa,K,A,f,c)):null===I?h=!1:(e.seriesNameInTooltip&&
(aa=v.getFirstValue(c&&c.seriesname)),h=aa?aa+R:y,h+=U.x?ra.xAxis(U.x)+R:y,h+=q.toolTipValue):h=!1;return h};e.errorBarShadow=g=a(f.errorbarshadow,f.showshadow,0);e.ignoreEmptyDatasets=a(c.ignoreemptydatasets,0);e.notHalfErrorBar=!a(f.halferrorbar,1);e.errorBarAlpha=Za(d(c.errorbaralpha,f.errorbaralpha));e.errorBarWidth=k=a(c.errorbarwidth,f.errorbarwidth,5);e.errorBarColor=u=ea(Ha(d(c.errorbarcolor,f.errorbarcolor,"AAAAAA")),void 0);e.errorBarThickness=V=a(c.errorbarthickness,f.errorbarthickness,
1);e.shadowOpacity=g?NaN:0;e.halfHorizontalErrorBar=p=a(f.halfhorizontalerrorbar,1);e.halfVerticalErrorBar=n=a(f.halfverticalerrorbar,1);void 0===e.initAnimation&&(e.initAnimation=b.initAnimation);b=d(c.horizontalerrorbaralpha,c.errorbaralpha,f.horizontalerrorbaralpha,void 0);z=a(c.verticalerrorbaralpha,c.errorbaralpha,f.verticalerrorbaralpha,void 0);X=ea(d(c.horizontalerrorbarcolor,c.errorbarcolor,f.horizontalerrorbarcolor,u),b);u=ea(d(c.verticalerrorbarcolor,c.errorbarcolor,f.verticalerrorbarcolor,
u),z);C=a(c.horizontalerrorbarthickness,c.errorbarthickness,f.horizontalerrorbarthickness,V);V=a(c.verticalerrorbarthickness,c.errorbarthickness,f.verticalerrorbarthickness,V);e.horizontalErrorBarWidth=a(c.horizontalerrorbarwidth,f.horizontalerrorbarwidth,k);e.verticalErrorBarWidth=a(c.verticalerrorbarwidth,f.verticalerrorbarwidth,k);for(k=0;k<l;k++)s&&(A=s&&s[k],q=(B=P[k])&&B.config,B||(B=P[k]={graphics:{}}),B.config||(q=P[k].config={}),B=ra.getCleanValue(A.errorvalue),U=q.setValue,q.errorValue=
A.errorvalue,q.hErrorValue=t=ra.getCleanValue(d(A.horizontalerrorvalue,A.errorvalue)),q.vErrorValue=r=ra.getCleanValue(d(A.verticalerrorvalue,A.errorvalue)),x=ra.dataLabels(t,S),w=F(m(d(A.errorplottooltext,c.errorplottooltext,f.errorplottooltext,x))),H=ra.dataLabels(r,e.parentYAxis),J=F(m(d(A.errorplottooltext,c.errorplottooltext,f.errorplottooltext,H))),h&&h[k]&&(q.label=F(m(d(h[k].tooltext,h[k].label)))),null!==U.x&&(G=U.x+Number(t),T=U.x-(p?0:Number(t)),W=N(W,G,T),ha=E(ha,G,T)),null!==U.y&&(G=
U.y+Number(r),T=U.y-(n?0:Number(r)),M=N(M,G,T),O=E(O,G,T)),q.useHorizontalErrorBar=a(A.usehorizontalerrorbar,c.usehorizontalerrorbar,f.usehorizontalerrorbar,0),q.useVerticalErrorBar=a(A.useverticalerrorbar,c.useverticalerrorbar,f.useverticalerrorbar,1),q.errorValueArr=[],q.errorValueArr.push({errorValue:-t,tooltext:ka(w,x),errorBarColor:X,isHorizontal:1,errorBarThickness:C,shadowOpacity:g?b/250:0}),q.errorValueArr.push({errorValue:t,tooltext:ka(w,x),errorBarColor:X,isHorizontal:1,errorBarThickness:C,
shadowOpacity:g?b/250:0}),q.errorValueArr.push({errorValue:-r,tooltext:ka(J,H),errorBarColor:u,errorBarThickness:V,shadowOpacity:g?z/250:0}),q.errorValueArr.push({errorValue:r,tooltext:ka(J,H),errorBarColor:u,errorBarThickness:V,shadowOpacity:g?z/250:0}),U=q.setValue,ga(B/U*La*La),L=ga(t/U*La*La)/La+"%",Y=ga(r/U*La*La)/La+"%",I=q.formatedVal,e.showTooltip?void 0!==q.setTooltext?(Sa=[1,2,3,4,5,6,7,8,9,10,11,99,100,101,102,103,104,105,106,107,109],K={yaxisName:D,xaxisName:Q,yDataValue:I,xDataValue:q.label,
formattedValue:q.toolTipValue,horizontalErrorValue:t,horizontalErrorDataValue:x,verticalErrorValue:r,verticalErrorDataValue:H,horizontalErrorPercent:L,verticalErrorPercent:Y,label:q.label},B=Ba(q.setTooltext,Sa,K,A,f,c)):null===I?B=!1:(e.seriesNameInTooltip&&(aa=v.getFirstValue(c&&c.seriesname)),B=aa?aa+R:y,B+=U.x?ra.xAxis(U.x)+R:y,B+=q.toolTipValue):B=!1,q.toolText=B);e.xMax=W;e.xMin=ha;e.yMin=O;e.yMax=M},drawErrorValue:function(){var b=this.chart,g=b.components,e=this.parentContainer,c=this.config,
h=this.JSONData.data,h=h&&h.length,f,d=this.visible,l=g.paper,g=g.xAxis[0],m=this.yAxis,A=this.components.data,B,q,P,k,V=b.graphics,n=c.showTooltip,t=c.shadowOpacity,qa=b.get("config","animationObj"),r=qa.animType,z=qa.animObj,X=qa.dummyObj,qa=qa.duration,C=this.graphics.container.lineGroup,v=this.graphics.errorGroupContainer,x=this.graphics.errorTrackerContainer,w=this.graphics.errorShadowContainer,y=this.graphics.trackerContainer,H=V.trackerGroup,J,R,E,Q,S,U,D,L,N,F,V=function(c){za.call(this,b,
c)},I=function(c){za.call(this,b,c,"DataPlotRollOver")},aa=function(c){za.call(this,b,c,"DataPlotRollOut")},G=function(c){return function(){void 0!==c&&b.linkClickFN.call({link:c},b)}};v||(v=this.graphics.errorGroupContainer=l.group("errorBar",e).insertAfter(C),d||v.hide());x||(x=this.graphics.errorTrackerContainer=l.group("error-hot",H).insertBefore(y),d||x.hide());w||(w=this.graphics.errorShadowContainer=l.group("error-shadow",e).insertBefore(v),d||w.hide());for(e=0;e<h;e++)if(J=(y=(C=A[e])&&C.config)&&
y.setValue,H=y.errorValueArr,void 0!==C&&void 0!==J&&null!==J&&H&&(D=H.length,!C.graphics.error&&(C.graphics.error=[]),!C.graphics.errorTracker&&(C.graphics.errorTracker=[]),null===y.vErrorValue&&(C.graphics.error&&C.graphics.error[0]&&(C.graphics.error[0].hide(),C.graphics.error[0].shadow({opacity:0})),C.graphics.error&&C.graphics.error[1]&&(C.graphics.error[1].hide(),C.graphics.error[1].shadow({opacity:0}))),null===y.hErrorValue&&(C.graphics.error&&C.graphics.error[2]&&(C.graphics.error[2].hide(),
C.graphics.error[2].shadow({opacity:0})),C.graphics.error&&C.graphics.error[3]&&(C.graphics.error[3].hide(),C.graphics.error[3].shadow({opacity:0}))),null!==y.hErrorValue||null!==y.vErrorValue))for(J=y.setLink,L=C._xPos,Q=N=C._yPos,E=L,F=0;F<D;F++)if(!y.useHorizontalErrorBar&&(0===F||1===F)||!y.useVerticalErrorBar&&(2===F||3===F)||1===F&&c.halfHorizontalErrorBar||3===F&&c.halfVerticalErrorBar)C.graphics.error&&C.graphics.error[F]&&C.graphics.error[F].hide()&&C.graphics.error[F].shadow({opacity:0}),
C.graphics.errorTracker&&C.graphics.errorTracker[F]&&C.graphics.errorTracker[F].hide()&&C.graphics.errorTracker[F].shadow({opacity:0});else{q=B=null;q=H[F];R=q.tooltext;f=Q;S=q.errorValue;k=q.errorBarColor;B=a(q.isHorizontal,0);q=a(q.errorBarThickness,c.errorBarThickness,1);P=B?c.horizontalErrorBarWidth:c.verticalErrorBarWidth;P=d?P/2:0;U=d?1:0;B?(B=U=L+(g.getAxisPosition(0)-g.getAxisPosition(1))*S*U,S=E,B=ga(f)+q%2/2,S=ga(U)+q%2/2,P=["M",E,B,"H",S,"M",S,B-P,"V",B+P]):(B=U=N+(m.getAxisPosition(0)-
m.getAxisPosition(1))*S*U,S=E,B=ga(U)+q%2/2,S=ga(E)+q%2/2,P=["M",S,f,"V",B,"M",S-P,B,"H",S+P]);C.graphics.error[F]?(B=C.graphics.error[F],f={path:P,"stroke-width":d?q:0},B.animateWith(X,z,f,qa,r),B.attr({stroke:k,ishot:!n,cursor:J?"pointer":u,"stroke-linecap":"round"})):(B=C.graphics.error[F]=l.path(P,v).attr({stroke:k,ishot:!n,"stroke-width":q,cursor:J?"pointer":u,"stroke-linecap":"round"}),c.initAnimation&&B.attr({opacity:0}).animateWith(X,z,{opacity:1},qa,r));B.show();B.shadow({opacity:t},w);f=
{path:P,stroke:p,"stroke-width":d?q<Pa?Pa:q:0,cursor:J?"pointer":u,ishot:!!J};if(C.graphics.errorTracker[F])C.graphics.errorTracker[F].attr(f);else if(J||n)q=C.graphics.errorTracker[F]=l.path(x).attr(f);k=C.graphics.element&&C.graphics.element.data("eventArgs")||C.graphics.hotElement&&C.graphics.hotElement.data("eventArgs");(q=C.graphics.errorTracker[F])&&q.show();q&&q.data("eventArgs",k);q&&q.click(V).data("groupId",void 0).hover(I,aa);n?q&&q.tooltip(R):q&&q.tooltip(!1);(J||n)&&q.click(G(J))}c.initAnimation=
!1},show:function(){var b=this.chart,g=this.yAxis,e=this.graphics&&this.graphics.errorGroupContainer,c=this.graphics&&this.graphics.errorTrackerContainer,h=this.graphics&&this.graphics.errorShadowContainer;b._chartAnimation();this.visible=!0;this._conatinerHidden=!1;e&&e.show();c&&c.show();h&&h.show();b._setAxisLimits();g.draw();this.draw()},remove:function(){var b=this.components,g=b.removeDataArr,e=b.pool||(b.pool={element:[],hotElement:[],label:[]}),c=g.length,h,f=this.maxminFlag,a,d,m;for(d=0;d<
c;d++)if(h=g[0],g.splice(0,1),h&&h.graphics){a=h.graphics;a.element&&a.element.hide()&&a.element.shadow({opacity:0});for(m=0;4>m;m++)a.error&&a.error[m]&&a.error[m].hide()&&a.error[m].shadow({opacity:0}),a.errorTracker&&a.errorTracker[m]&&a.errorTracker[m].hide()&&a.errorTracker[m].shadow({opacity:0});a.hotElement&&a.hotElement.hide()&&a.hotElement.attr({width:0});h.graphics.element&&(e.element=e.element.concat(h.graphics.element));h.graphics.hotElement&&(e.hotElement=e.hotElement.concat(h.graphics.hotElement));
h.graphics.label&&(e.label=e.label.concat(h.graphics.label))}b.pool=e;f&&this.setMaxMin()}},"Scatter"]);FusionCharts.register("component",["dataset","MSStepLine",{type:"stepline",configure:function(){var b=this.JSONData,g=this.config,e=this.chart.jsonData.chart;this.__base__.configure.call(this);g.drawVerticalJoins=a(e.drawverticaljoins,1);g.useForwardSteps=a(e.useforwardsteps,1);g.shadow={opacity:a(e.showshadow,1)?g.lineAlpha/100:0};this.visible=1===a(b.visible,!Number(b.initiallyhidden),1);this._addLegend()},
init:function(b){var g=this.chart,e=g.components;this.chart=g;this.yAxis=e.yAxis[0];this.components={};this.graphics={};this.JSONData=b;this.configure()},_addLegend:function(){var b=this.config,g=this.chart.components.legend,e=a(b.drawAnchors,1),b={enabled:b.includeInLegend,type:pa,drawLine:!0,fillColor:x({color:b.anchorBgColor,alpha:b.anchorBgAlpha}),strokeColor:x({color:d(b.lineColor,b.anchorBorderColor),alpha:d(b.lineAlpha,b.anchorBorderAlpha)}),anchorSide:e?b.anchorSides:0,strokeWidth:b.anchorBorderThickness,
label:la(this.JSONData.seriesname)};this.legendItemId=g.addItems(this,this.legendInteractivity,b)},draw:function(){var b=this,g=b.JSONData,e=b.chart,c=e.components,h=b.config,f=b.index||b.positionIndex,a,l,m=c.paper,A=c.xAxis[0],B=b.yAxis,q,P,k=e.graphics;a=k.datalabelsGroup;var V,n,t,qa,r,z,X=b.components.data,C,v,w,y=e.config.style,E=b.components.removeDataArr||[],H=E.length;l={fontFamily:y.fontFamily,fontSize:y.fontSize,lineHeight:y.lineHeight,fontWeight:y.fontWeight,fontStyle:y.fontStyle,color:y.color};
var y=h.lineThickness,J=b.graphics.container,R=b.graphics.trackerContainer;q=k.trackerGroup;var D=h.connectNullData,Q=k.datasetGroup,S,k=h.shadow,U,F=b.graphics.dataLabelContainer,L={},Y,L=e.get("config","animationObj"),I=L.dummyObj,K=L.animObj,aa=L.duration,G=b.components.pool||[],T,M=function(){!1!==b.visible||!1!==b._conatinerHidden&&void 0!==b._conatinerHidden||(J.lineGroup.hide(),J.lineShadowGroup.hide(),J.anchorShadowGroup.hide(),J.anchorGroup.hide(),R.hide(),F&&F.hide(),b._conatinerHidden=
!0)},O=function(){Q.lineConnector.attr({"clip-rect":null});Q.lineConnector.node&&Q.lineConnector.node.removeAttribute("clip-path");!1!==b.visible&&(J.lineShadowGroup.show(),J.anchorShadowGroup.show(),J.anchorGroup.show(),R.show(),F&&F.show());e._animCallBack()},ha=!0,W,ka=B.getAxisBase(),ka=B.yBasePos=B.getAxisPosition(ka),$=c.canvas.config.clip,c=$["clip-canvas-init"].slice(0),$=$["clip-canvas"].slice(0),Z=h.lineDashStyle,ma={color:h.lineColor,alpha:h.lineAlpha},ba,ga,va,ca,ea=[],da=0,ia=[],la=null,
ja,na=[],oa=!1,za,Ga=b.graphics.lineElement,ta=b.visible,ya=h.drawVerticalJoins,ua=h.useForwardSteps,sa,Aa=L.animType,Ha;Q.lineConnector=Q.lineConnector||m.group("line-connector",Q);J||(J=b.graphics.container={lineShadowGroup:m.group("connector-shadow",Q.lineConnector),anchorShadowGroup:m.group("anchor-shadow",Q.lineConnector),lineGroup:m.group(pa,Q.lineConnector),anchorGroup:m.group("anchors",Q.lineConnector)},ta||(J.lineShadowGroup.hide(),J.anchorShadowGroup.hide(),J.lineGroup.hide(),J.anchorGroup.hide()));
R||(R=b.graphics.trackerContainer=m.group("line-hot",q),ta||R.hide());X||(X=b.components.data=[]);e._addCSSDefinition(".fusioncharts-datalabels .fusioncharts-label",l);F||(F=b.graphics.dataLabelContainer=b.graphics.dataLabelContainer||m.group("datalabel",a),ta||F.hide());ta&&(J.lineShadowGroup.show(),J.anchorShadowGroup.show(),J.lineGroup.show(),J.anchorGroup.show(),R.show(),F.show());a=A.getCategoryLen();for(l=0;l<a;l++)if(C=X[l])Y=C.config,r=Y.setValue,qa=Y.setLink,V=Y.setLevelTooltext,T=Y.showValue,
L=Y.anchorProps,v=L.symbol,U=L.shadow,z=Y.displayValue,n=C.graphics.element,w=C.graphics.image,t=C.graphics.hotElement,sa=C.graphics.label,C||(C=X[l]={graphics:{}}),null===r?(na.length=0,D||(la=null),n&&n.hide(),w&&w.hide(),sa&&sa.hide(),t&&t.hide()):(ca={color:Y.color,alpha:Y.alpha},W=Y.dashStyle,q=A.getAxisPosition(l),P=!b.visible&&aa?ka:B.getAxisPosition(r),S=Y.hoverEffects,L.isAnchorHoverRadius=S.anchorRadius,Ha=A.getLabel(l),V=V=Y.toolText+(V?u:Y.toolTipValue),r={index:l,link:qa,value:r,displayValue:z,
categoryLabel:Ha,toolText:V,id:h.userID,datasetIndex:f,datasetName:g.seriesname,visible:ta},z=!1,L.imageUrl?(C._xPos=q,C._yPos=P,U=new Ka,U.onload=this._onAnchorImageLoad(b,l,r,q,P),U.onerror=this._onErrorSetter(q,P,l,b),U.src=L.imageUrl):(w&&w.hide(),w=[v[1]||2,q,P,L.radius,L.startAngle,L.dip],v={fill:x({color:L.bgColor,alpha:L.bgAlpha}),stroke:x({color:L.borderColor,alpha:L.borderAlpha}),"stroke-width":L.borderThickness,visibility:L.radius?ta:"hidden"},n||(G.element&&G.element.length?n=C.graphics.element=
G.element.shift():(z=!0,n=C.graphics.element=m.polypath(J.anchorGroup),n.attr({polypath:w}))),n.show().animateWith(I,K,{polypath:w},aa,Aa,ha&&M),n.attr(v).shadow(U,J.anchorShadowGroup),ha=!1),U=C.graphics.connector,S.enabled&&(w={polypath:[S.anchorSides||2,q,P,S.anchorRadius,S.startAngle,S.dip],fill:x({color:S.anchorColor,alpha:S.anchorBgAlpha}),stroke:x({color:S.anchorBorderColor,alpha:S.anchorBorderAlpha}),"stroke-width":S.anchorBorderThickness},v={polypath:[L.sides,q,P,L.radius,L.startAngle,0],
fill:x({color:L.bgColor,alpha:L.bgAlpha}),stroke:x({color:L.borderColor,alpha:L.borderAlpha}),"stroke-width":L.borderThickness},n&&n.data("anchorRadius",L.radius).data("anchorHoverRadius",S.anchorRadius).data("setRolloverAttr",w).data("setRolloutAttr",v)),v=N(L.radius,S&&S.anchorRadius||0,Pa),qa={cx:q,cy:P,r:v,cursor:qa?"pointer":u,stroke:p,"stroke-width":L.borderThickness,fill:p,ishot:!0,visibility:ta},t||(G.hotElement&&G.hotElement.length?t=C.graphics.hotElement=G.hotElement.shift():(z=!0,t=C.graphics.hotElement=
m.circle(R))),t.show().attr(qa),z&&(t||n).click(b.getPlotClickFn(e)).hover(b.rolloverResponseSetter(C,e),b.rolloutResponseSetter(C,e)),(t||n).data("eventArgs",r).data("groupId",void 0).data("dataset",b).data("hoverEnabled",S.enabled).tooltip(V),va=va!==[x(ca||ma),W||Z].join(":"),null!==la?(na.length&&(ea=ea.concat(na),na.length=0),ea.join(u)||ea.push("M",ja,la),ua?(ea.push("H",q),ya?ea.push("V",P):ea.push("M",q,P)):(ya?ea.push("V",P):ea.push("M",ja,P),ea.push("H",q)),va&&(da?ia=ia.concat(ea):(U||
(U=C.graphics.connector=m.path(J.lineGroup),oa=!0),U.animateWith(I,K,{path:ea},aa,Aa,ha&&M),U.attr({"stroke-dasharray":ga,"stroke-width":y,stroke:ba,"stroke-linecap":"round","stroke-linejoin":2<y?"round":"miter"}).shadow(za,J.lineShadowGroup),ha=!1),ea=[]),va||U&&U.hide()):na.push("M",q,P),ja=q,la=P,ba=x(ca||ma),za=ca?{opacity:ca&&ca.alpha/100}:k,ga=W||Z,da=void 0===d(Y.color,Y.alpha,Y.dashed)?1:0,va=[ba,ga].join(":"),C._xPos=q,C._yPos=P,T&&!L.imageUrl?T&&!L.imageUrl&&this.drawLabel(l):sa&&sa.hide());
ea.length&&(ia=ia.concat(ea));g={path:ia};v={"stroke-dasharray":Z,"stroke-width":y,stroke:x(ma),"stroke-linecap":"round","stroke-linejoin":2<=y?"round":"miter"};Ga||(Ga=b.graphics.lineElement=m.path({path:ia},J.lineGroup),oa=!0);Ga.show().animateWith(I,K,g,aa,Aa,ha&&M);Ga.attr(v).shadow(k,J.lineShadowGroup);ha=!1;aa&&ta&&oa&&(J.anchorGroup.hide(),J.lineShadowGroup.hide(),J.anchorShadowGroup.hide(),F.hide(),Q.lineConnector.attr({"clip-rect":c}).animateWith(I,K,{"clip-rect":$},aa,"normal",O));for(l=
0;l<H;l++)b._removeDataVisuals(E.shift());b.drawn=!0}},pa]);FusionCharts.register("component",["dataset","multiaxisline",{type:"multiaxisline",pIndex:2,customConfigFn:"_createDatasets",configure:function(){var b=this.chart,g=this.JSONData,e=this.config,c=b.config,h=b.components,f=b.jsonData,s=f.chart,l=f.axis[this.axisIndex],m=b.singleseries,f=FusionCharts.get("component",["dataset",pa]).prototype;f.configure.call(this);this.yAxis=h.yAxis[this.axisIndex];c.axesPadding=5;c.allowAxisShift=a(s.allowaxisshift,
1);c.allowSelection=a(s.allowselection,1);c.checkBoxColor=d(s.checkboxcolor,"#2196f3");c.axisConfigured=!0;e.lineThickness=a(g.linethickness,l.linethickness,s.linethickness,m?4:2);e.lineDashLen=a(g.linedashlen,l.linedashlen,s.linedashlen,5);e.lineDashGap=a(g.linedashgap,l.linedashgap,s.linedashgap,4);e.lineAlpha=a(g.alpha,l.linealpha,s.linealpha,La);e.lineColor=d(g.color,l.linecolor,l.color,s.linecolor,e.plotColor);e.legendSymbolColor=this.type===pa?e.lineColor:e.plotFillColor;h=a(g.dashed,l.linedashed,
s.linedashed);c=v.getDashStyle(e.lineDashLen,e.lineDashGap,e.lineThickness);e.anchorBorderColor=d(g.anchorbordercolor,s.anchorbordercolor,e.lineColor,e.plotColor);e.lineDashStyle=h?c:"none";f._setConfigure.call(this);!1!==b.hasLegend&&this._addLegend()},init:function(b){this.chart=this.chart;this.components={};this.conf={};this.graphics={};this.JSONData=b;this.visible=1===a(this.JSONData.visible,!Number(this.JSONData.initiallyhidden),1);this.configure()},legendInteractivity:function(b,g){var e=b.chart,
c=e.components.dataset,h=this.config,f=b.visible,a=g.config,d=g.graphics,m=h.itemHiddenStyle.color,h=h.itemStyle.color,A=a.fillColor,a=a.strokeColor,B=b.axisIndex,q=!0,P,e=e.config.axesArr.checkBox;f?b.hide():b.show();if(f){for(P in c)c.hasOwnProperty(P)&&c[P].visible&&c[P].axisIndex===B&&(q=!1);q&&e[B]&&e[B].checkbox.uncheck()}else e[B]&&e[B].checkbox.check();f?(d.legendItemSymbol&&d.legendItemSymbol.attr({fill:m,stroke:m}),d.legendItemText&&d.legendItemText.attr({fill:m}),d.legendIconLine&&d.legendIconLine.attr({stroke:m})):
(d.legendItemSymbol&&d.legendItemSymbol.attr({fill:A,stroke:a}),d.legendItemText&&d.legendItemText.attr({fill:h}),d.legendIconLine&&d.legendIconLine.attr({stroke:A}))}},pa]);M("waterfall2d",{standaloneInit:!0,friendlyName:"Waterfall Chart",creditLabel:n,defaultDatasetType:"Waterfall2D",applicableDSList:{Waterfall2D:!0},singleseries:!0,hasLegend:!1,_dataSegregator:function(b){var g=[],e=[];Ua(b,function(b,h){"true"!==b.vline&&!0!==b.vline&&1!==b.vline&&"1"!==b.vline?g.push(b):e.push({index:h,data:b})});
return{data:g,catData:e}}},M.sscartesian);M("multilevelpie",{standaloneInit:!0,friendlyName:"Multi-level Pie Chart",creditLabel:n,defaultDatasetType:"multiLevelPie",applicableDSList:{multiLevelPie:!0},is3d:!0,hasLegend:!1,hasCanvas:!1,_createDatasets:function(){var b=this.components,g=this.jsonData,e=g.dataset||[],c=e.length,h,f,a=this.defaultDatasetType,l=this.applicableDSList,m;h=[];var A={};h=this.config.categories=g.category||[];g=h.length;!c&&g&&(e=h,c=g);g||this.setChartMessage();h=b.dataset||
(b.dataset=[]);for(b=0;b<c;b+=1)if(g=e[b],g.seriesname&&(g.seriesname=Z(g.seriesname)),f=g.parentyaxis||u,f=(f="s"===f.toLowerCase()?d(g.renderas,this.sDefaultDatasetType):d(g.renderas,a))&&f.toLowerCase(),l[f]||(f=a),m=FusionCharts.get("component",["dataset",f]))void 0===A[f]?A[f]=0:A[f]++,h[0]?(f=h[0],f.JSONData=g):(f=new m,h.push(f),f.chart=this,f.index=b),f.init(e)},_spaceManager:function(){this._manageChartMenuBar(.225*this.config.canvasHeight)}},M.guageBase);FusionCharts.register("component",
["dataset","multiLevelPie",{init:function(b){!this.components&&(this.components={data:[]});this.conf={};this.graphics={};this.JSONData=b;this.configure()},configure:function(){var b,g,e=this,c=e.chart,h=c.config,f=e.conf||(e.conf={}),s=f.dataLabelOptions||(f.dataLabelOptions={}),l=f.piePlotOptions,m=c.config.style,A=e.JSONData,c=c.jsonData.chart;b=f.enableAnimation=a(c.animation,c.defaultanimation,1);var B=a(-c.centerangle,180),q=a(c.totalangle,360);f.animation=b?{duration:1E3*a(c.animationduration,
c.moveduration,1)}:!1;f.showShadow=a(c.showshadow,0);b=f.useHoverColor=Boolean(a(c.usehovercolor,1));f.hoverFillColor=ea(d(c.hoverfillcolor,"FF5904"),a(c.hoverfillalpha,100));f.pierad=parseInt(c.pieradius,10);g=(g=la(c.valuebordercolor,y))?ea(g,a(c.valueborderalpha,c.valuebgalpha,c.valuealpha,100)):y;!s.style&&(s.style={fontFamily:d(c.valuefont,m.fontFamily),fontSize:a(c.valuefontsize,parseInt(m.fontSize,10))+"px",color:ea(d(c.valuefontcolor,m.color),a(c.valuefontalpha,c.valuealpha,100)),fontWeight:a(c.valuefontbold)?
"bold":"normal",fontStyle:a(c.valuefontitalic)?"italic":"normal",backgroundColor:c.valuebgcolor?ea(c.valuebgcolor,a(c.valuebgalpha,c.valuealpha,100)):y,border:g||c.valuebgcolor?a(c.valueborderthickness,1)+"px solid":y,borderPadding:a(c.valueborderpadding,2),borderThickness:a(c.valueborderthickness,m.borderThickness,1),borderRadius:a(c.valueborderradius,m.borderRadius,0),borderColor:g,borderDash:a(c.valueborderdashed,0)?ua(a(c.valueborderdashlen,4),a(c.valueborderdashgap,2),a(c.valueborderthickness,
1)):"none"});!l&&(l=f.piePlotOptions={});l.allowPointSelect=!1;f.borderColor=ea(d(c.plotbordercolor,c.piebordercolor,"FFFFFF"),"0"!=c.showplotborder?d(c.plotborderalpha,c.pieborderalpha,100):0);f.showTooltip=a(c.showtooltip,1);f.borderWidth=a(c.pieborderthickness,c.plotborderthickness,1);l.startingAngle=0;l.size="100%";f.showLabels=a(c.showlabels,1);f.showValues=a(c.showvalues,0);f.showValuesInTooltip=a(c.showvaluesintooltip,c.showvalues,0);f.showPercentValues=a(c.showpercentvalues,c.showpercentagevalues,
0);f.showPercentInTooltip=a(c.showpercentintooltip,0);f.toolTipSepChar=d(c.tooltipsepchar,c.hovercapsepchar,Jb);f.labelSepChar=d(c.labelsepchar,f.toolTipSepChar);f.tooltext=c.plottooltext;f.alpha=d(c.plotfillalpha,c.piefillalpha,100);f.startAngle=Ub/180*(B-q/2);f.endtAngle=Ub/180*(B+q/2);f.initialAngle=f.endtAngle;f.originX=a(c.originx);f.originY=a(c.originy);b&&(f.events={mouseOver:function(){for(var b=this.data("plotItem").selfRef,c=e.conf;b.graphics.element;)b.graphics.element.attr({fill:c.hoverFillColor}),
b=b.linkedItems.parent},mouseOut:function(){for(var b=this.data("plotItem"),c=b.selfRef;c.graphics.element;)c.graphics.element.attr({fill:(c.config||b).color}),c=c.linkedItems.parent}});h.plotBorderWidth=0;h.plotBorderWidth=0;f.maxLevel=e.addMSPieCat(A,1,e,f.startAngle,f.endtAngle);f.pieRadius=parseInt(c.pieradius,10);s.distance=0;s.placeLabelsInside=!0},removalFn:function(b,g,e){var c,h,f=this.pool||(this.pool={});c=this.chart.get("config","animationObj");var a=c.duration,d=c.dummyObj,m=c.animObj,
A=c.animType,B=function(b){(b||this).hide()};!f[e]&&(f[e]=[]);"element"===e?(h=b.attr("ringpath"),c=(h[4]+h[5])/2,g?b.animateWith(d,m,{ringpath:[h[0],h[1],h[2],h[3],c,c]},a,A,B):f[e].push(b)):g?B(b):f[e].push(b)},removeGraphics:function(b,g){var e,c,h=b.components&&b.components.data,f,a=b.graphics;if(h)for(f=h.length,e=0;e<f;e+=1)this.removeGraphics(h[e]);if(b.graphics)for(c in a)a.hasOwnProperty(c)&&this.removalFn(b.graphics[c],g,c)},removeChild:function(b,g,e){var c,h;if(b.length)for(c=0;c<b.length;c+=
1)h=b[c],e?this.removalFn(h,g,e):this.removeGraphics(h,g);else for(c in b)this.removeChild(b[c],g,c)},addMSPieCat:function(b,g,e,c,h){var f,s,l,m=b.length,A=this,B=e.components.data,q=A.chart.components,P=A.conf,k=P.borderWidth,V=P.borderColor,u=q.numberFormatter,q=q.colorManager,p,n=0,t,z,X=P.labelSepChar,C,r,v,x,w,H=g,J=B.length,E=function(){A.removeChild.apply(A,arguments)},D=b.length;p=h-c;var Q=0,S;for(z=0;z<m;z+=1)h=b[z],h._userValue=u.getCleanValue(h.value,!0),h._value=a(h._userValue,1),n+=
h._value;n=n||1;p/=n;for(z=m-1;0<=z;--z)h=b[z],t=p*h._value,f=Z(d(h.label,h.name)),r=null!==h._userValue?u.dataLabels(h._userValue):y,v=u.percentValue(h._value/n*100),C=a(h.alpha,P.alpha),w=P.showLabels?f:y,P.showValues&&(P.showPercentValues?w+=w!==y?X+v:v:void 0!==r&&r!==y&&(w+=w!==y?X+r:r)),x=P.showTooltip?Z(d(h.tooltext,h.hovertext,P.tooltext)):void 0,x===y?(x=f,P.showValuesInTooltip&&(P.showPercentInTooltip?x+=x!==y?X+v:v:void 0!==r&&r!==y&&(x+=x!==y?X+r:r))):x=Ba(x,[1,2,3,14],{percentValue:v,
label:f,formattedValue:r},h),f=B[z],r=c+Q,Q+=t,f||(f=B[z]={components:{data:[]},linkedItems:{},config:{},graphics:{}}),f.graphics.element&&(S=f.config.startAngle+f.config.angleStrech),f.config={initialAngle:S||(e.conf||e.config).initialAngle,startAngle:r,angleStrech:t,level:g,displayValue:w,toolText:x,link:F(h.link),doNotSlice:!0,color:ea(h.color||q.getPlotColor(),C),borderWidth:a(h.borderwidth,k),borderColor:d(h.bordercolor,V),dashStyle:a(h.valueborderdashed,0)?ua(a(h.borderdashlen,4),a(h.borderdashgap,
2),a(h.borderthickness,1)):"none",shadow:{opacity:.01*ga(50<C?C*C*C*1E-4:C*C*.01)},isSingleTon:1<m?!1:!0},f.linkedItems.parent=e,h.category?(H=N(H,A.addMSPieCat(h.category,g+1,f,r,t+r)),(s=f.components.data.length)>(l=h.category.length)&&E(f.components.data.splice(s-1,l))):(s=f.components.data.length)&&E(f.components.data.splice(0,s));J>D&&E(B.splice(J-1,D));return H},draw:function(b){var g,e,c,h=this.conf||{},f=this.chart,d=f.config,l=f.graphics;c=this.components;var m=c.data.length,A=d.dataLabelStyle;
g=h.showShadow;var B=f.components.paper,q=d.textDirection,P=d.tooltip||{},P=P&&!1!==P.enabled,k,V=d.canvasWidth;k=d.canvasHeight;var p=a(h.originX,d.canvasLeft+.5*V),d=a(h.originY,d.canvasTop+.5*k),n,t,r,z,X,C,v=l.datasetGroup.trackTooltip(!0),w=f.get("config","animationObj"),y=w.duration||0,F=w.dummyObj,H=w.animObj,w=w.animType,J,R,D,Q,S=h.events||{};D=function(b){var c=S.mouseOver;za.call(this,f,b,"DataPlotRollOver");c&&c.call(this)};e=function(b){var c=S.mouseOut;za.call(this,f,b,"DataPlotRollOut");
c&&c.call(this)};var U=function(b){var c=S.mouseOver;za.call(this,f,b,"DataPlotRollOver");c&&c.call(this)},N=function(b){var c=S.mouseOut;za.call(this,f,b,"DataPlotRollOut");c&&c.call(this)},L=function(b){za.call(this,f,b)},Y=function(b,c){return function(b,c){return function(){K.show();c===m-1&&(K.show(),f._animCallBack())}}(b,c)},I=this.pool||(this.pool={});c=(c=c.removeDataArr)&&c.length;k=a(2*h.pieRadius,E(V,k))/(2*h.maxLevel);var K=l.datalabels||(l.datalabels=B.group("datalabels").insertAfter(v));
c&&this.remove();y&&K.hide();!b&&(b=this);m=b.components.data.length;for(h=0;h<m;h+=1)this.draw(b.components.data[h]);V=b.config;(c=V.level)?(l=c*k,c=(c-1)*k,J=b.graphics,t=V.angleStrech,r=V.displayValue,k=V.toolText,z=!!V.link,n=V.color,X=V.startAngle,C=X+V.angleStrech,Q=V.initialAngle,R=J.element,R||(I.element&&I.element.length?(R=J.element=I.element.shift(),R.show()):R=J.element=B.ringpath(v).mouseover(D).mouseout(e).mouseup(L),R.attr({ringpath:[p,d,l,c,Q,Q]})),b={chart:f,link:V.link,value:t,color:n,
labelText:r,graphics:{element:R},selfRef:b},v={link:V.link,label:V.displayValue,toolText:V.toolText},R.attr({"stroke-width":V.borderWidth,stroke:V.borderColor,fill:x(V.color),"stroke-dasharray":V.dashStyle,ishot:!P,cursor:z?"pointer":u}).tooltip(V.toolText).shadow(g&&!!V.shadow).data("plotItem",b).data("eventArgs",v),D=J.label,void 0!==r&&r!==u?(g=(X+C)/2,e=0===c&&V.isSingleTon?0:c+(l-c)/2,D=J.label,D||(D=I.label&&I.label.length?J.label=I.label.shift():J.label=B.text(K).mouseover(U).mouseout(N).mouseup(L)),
b.label=D,D.attr({text:r,fill:A.color||"#000000",direction:q,ishot:z,cursor:z?"pointer":u,x:p+e*da(g),y:d+e*T(g),"text-bound":[A.backgroundColor,A.borderColor,A.borderThickness,A.borderPadding,A.borderRadius,A.borderDash]}).show().css(A).data("plotItem",b).data("eventArgs",v),P&&D.tooltip(k)):D&&D.hide(),R.animateWith(F,H,{ringpath:[p,d,l,c,X,C]},y,w,!h&&Y(void 0,void 0))):this.removeChild(this.pool,!0)}},"Pie2D"]);M("radar",{friendlyName:"Radar Chart",standaloneInit:!0,creditLabel:n,defaultDatasetType:"radar",
applicableDSList:{radar:!0},hasLegend:!0,areaAlpha:50,showValues:0,defaultPlotShadow:0,_postSpaceManagement:function(){var b=this.components,g=this.config,e=b.legend;(b.yAxis&&b.yAxis[0]).setAxisDimention({x:g.canvasLeft+g.canvasWidth/2,y:g.canvasTop,axisLength:g.canvasHeight/2});e.postSpaceManager()}},M.mspolar);M("dragbase",{configure:function(){var b=this.jsonData.chart,g,e;this.base.base.configure.call(this);e=this.config;e.formAction=F(b.formaction);"0"!==b.submitdataasxml||b.formdataformat||
(b.formdataformat=I.dataFormats.CSV);e.formDataFormat=d(b.formdataformat,I.dataFormats.XML);e.formTarget=d(b.formtarget,"_self");e.formMethod=d(b.formmethod,"POST");e.submitFormAsAjax=a(b.submitformusingajax,1);e.restoreBtnTitle=d(b.restorebtntitle,"Restore");e.submitBtnTitle=d(b.formbtntitle,"Submit");e.showFormBtn=a(b.showformbtn,1)&&e.formAction;e.showRestoreBtn=a(b.showrestorebtn,1);e.formBtnTitle=d(b.formbtntitle,"Submit");e.formBtnBorderColor=d(b.formbtnbordercolor,"CBCBCB");e.formBtnBgColor=
d(b.formbtnbgcolor,"FFFFFF");e.btnPadding=a(b.btnpadding,7);e.btnSpacing=a(b.btnspacing,5);e.formBtnStyle={fontSize:e.style.outCanfontSize,fontFamily:e.style.outCanfontFamily,fontWeight:"bold"};e.formBtnLabelFill=e.style.outCancolor;b.btntextcolor&&(e.formBtnLabelFill=b.btntextcolor.replace($,na));0<=(g=a(b.btnfontsize))&&(e.formBtnStyle.fontSize=g+"px");e.restoreBtnWidth=a(b.restorebtnwidth,0);e.formBtnWidth=a(b.formbtnwidth,0);e.restoreBtnBorderColor=d(b.restorebtnbordercolor,e.formBtnBorderColor);
e.restoreBtnBgColor=d(b.restorebtnbgcolor,e.formBtnBgColor);e.restoreBtnStyle={fontSize:e.formBtnStyle.fontSize,fontFamily:e.formBtnStyle.fontFamily,fontWeight:"bold"};e.restoreBtnLabelFill=e.formBtnLabelFill},_createToolBox:function(){var b=this,g=b.components.tb||(b.components.tb=new (FusionCharts.register("component",["toolbox","toolbox"]))),e,c,h;h=b.components;var f,a,d=b.linkedItems.smartLabel,m=b.config,A=m.showRestoreBtn,B=m.formAction,q=m.restoreBtnTitle,P=m.submitBtnTitle,k=m.formBtnStyle,
V=m.restoreBtnStyle,u=m.restoreBtnWidth,p=m.restoreBtnBgColor,n=m.restoreBtnBorderColor,t=m.formBtnBgColor,z=m.formBtnBorderColor,r=m.restoreBtnLabelFill,C=m.formBtnLabelFill,v=m.btnSpacing,x=m.btnPadding,w=m.formBtnWidth;e=h.chartMenuBar;e&&e.drawn||(e=g.init({graphics:b.graphics||(b.graphics={}),chart:b,components:b.components}),g.pId=e,e=h.toolBoxAPI=g.getAPIInstances(g.ALIGNMENT_HORIZONTAL),c=e.ComponentGroup,h=e.Toolbar,f=e.Symbol,g.getDefaultConfiguration(),e=g.getDefaultConfiguration(),a=new f(q,
!0,(g.idCount=g.idCount||0,g.idCount++),g.pId),f=new f(P,!0,g.idCount++,g.pId),M.mscartesian._createToolBox.call(b),b.addConfigureOptions&&b.addConfigureOptions(),c=new c(g.idCount++,g.pId),d.useEllipsesOnOverflow(m.useEllipsesWhenOverflow),d.setStyle(V),q=d.getOriSize(q),u=N(q.width,u),m=q.height,d.setStyle(k),q=d.getOriSize(P),w=N(w,q.width),d=q.height,a.conf.width=u+x,f.conf.width=w+x,a.conf.stroke=ea(n,100),a.conf.height=m+x,f.conf.height=d+x,f.conf.fill=ea(t,100),f.conf.labelFill=ea(C,100),a.conf.fill=
ea(p,100),a.conf.labelFill=ea(r,100),f.conf.stroke=ea(z,100),f.conf.btnTextStyle.fontSize=k.fontSize,a.conf.btnTextStyle.fontSize=V.fontSize,e.spacing=v,c.setConfiguaration({buttons:e,group:{fill:ea("FFFFFF",0),borderThickness:0}}),A&&(c.addSymbol(a),a.attachEventHandlers({click:function(){b.restoreData()}})),B&&(c.addSymbol(f),f.attachEventHandlers({click:function(){b.submitData(I)}})),g=new h(g.idCount++,g.pId),g=b.components.actionBar=g,g.addComponent(c),g.toolbarConfig.fill=ea("EBEBEB",0),g.toolbarConfig.borderThickness=
0)},addConfigureOptions:function(){var b=this,g=b.chartMenuTools,e=b.components.chartMenuBar.componentGroups[0].symbolList[0].getListRefernce(),c=a(b.jsonData.chart.allowaxischange,1),g=g.set,h=[{"Increase Upper Limit":{handler:function(){var c=b.components.yAxis[0].config.axisRange;b.changeUpperLimits(c.max+c.tickInterval)},action:"click"}},{"Increase Lower Limit":{handler:function(){var c=b.components.yAxis[0].config.axisRange;b.changeLowerLimits(c.min+c.tickInterval)},action:"click"}},{"Decrease Upper Limit":{handler:function(){var c=
b.components.yAxis[0].config.axisRange;b.changeUpperLimits(c.max-c.tickInterval)},action:"click"}},{"Decrease Lower Limit":{handler:function(){var c=b.components.yAxis[0].config.axisRange;b.changeLowerLimits(c.min-c.tickInterval)},action:"click"}}];c&&(g(h),e.appendAsList(h))},_manageActionBarSpace:function(){var b=this.components.actionBar,b=b&&b.getLogicalSpace()||{};this.config.actionBarHeight=b.height;return{bottom:b.height||0}},drawAxisUpdateUI:function(){var b=this,g=b.components.yAxis[0],e=
g.config.axisRange,c=g.graphics.labels||[],h=b.config,g=e.min,e=e.max,f=c[c.length-1],c=c[0],a=b.linkedItems.container,d=b.config.inCanvasStyle||{},m=Zb({outline:"none","-webkit-appearance":"none",filter:"alpha(opacity=0)",position:"absolute",background:"transparent",border:"1px solid #cccccc",textAlign:"right",top:0,left:0,width:50,zIndex:20,opacity:0,borderRadius:0},d),A={max:{label:f,value:e},min:{label:c,value:g}};Ua(["max","min"],function(c){var g=A[c],e=g.label,f=g.value,V=g.oldValue=f,g=e&&
e.getBBox(),k="max"===c?!0:!1,p,n,t,z,r,C,x=function(c,g,e){return c===g+u?null:e?b.changeUpperLimits(c):b.changeLowerLimits(c)},w=function(){return function(){var b={opacity:1,filter:"alpha(opacity=100)",color:d.color},c;this.value=f;for(c in b)this.style[c]=b[c];z=C=!0;e.hide()}}(f),y=function(){return function(){var b=this;C&&(C=!1,qb||setTimeout(function(){b.select()},0))}}(),E=function(){return function(){!0!==x(this.value,V,k)&&(this.style.opacity=0,this.style.filter="alpha(opacity=0)",e.show());
nb&&Oa.getElementsByTagName("body")[0].focus&&Oa.getElementsByTagName("body")[0].focus();z=C=!1}}(k,V),H=function(){return function(b){var c=b.originalEvent.keyCode,g=this.value;13===c?(b=x(g,V,k),!1===b&&(this.style.color="#dd0000")):27===c&&(this.value=V,v.dem.fire(this,"blur",b))}}(k,V);if(g&&e){c=g.x+g.width-h.marginLeft;n=h.canvasLeft-c-(D?4:5);p=sc("input",{type:"text",value:f,name:f||u},a,!0);Zb(m,{top:g.y+(D?-1:0)+"px",left:n+"px",width:c+"px"});for(t in m)p.style[t]=m[t];v.dem.listen(p,["focus",
"mouseup","blur","keyup"],[w,y,E,H]);p.setAttribute("isOverlay","true");D?(Fb(a,"defaultprevented",r=function(b){p.parentNode&&v.dem.fire(p,"blur",b)}),Fb(a,"destroy",function(){jb(b,"defaultprevented",r);p.parentNode.removeChild(p)})):(Fb(a,"mousedown",r=function(b){b.srcElement!==p&&z&&v.dem.fire(p,"blur",b)}),Fb(a,"destroy",function(){jb(a,"mousedown",r);p.parentNode.removeChild(p)}))}})},drawActionBar:function(){var b=this.config,g=this.components.actionBar||{},e;e=g.getLogicalSpace();g.toolbarConfig.fill=
p;g.toolbarConfig.vPadding=0;g.toolbarConfig.borderColor=p;g.draw(b.width-b.marginRight-e.width,b.height-b.marginBottom-e.height);g.drawn=!0},changeUpperLimits:function(b){var g=this.components.yAxis[0],e=g.config.axisRange,c=e.min,h=e.max,f=this.config.yMax,e=!1;void 0!==b&&b>f&&b!==h?e=!0:b=f>h?f:h;e&&(g.setAxisData({axisMaxValue:b,axisMinValue:c}),g.setDataLimit(b,c),this._drawAxis(),this._drawDataset())},changeLowerLimits:function(b){var g=this.components.yAxis[0],e=g.config.axisRange,c=this.config.yMin,
h=e.max,f,a=!1,e=e.min;void 0!==b&&b<c&&b!==e?(f=b,a=!0):b=c<e?c:e;a&&(g.setAxisData({axisMaxValue:h,axisMinValue:b}),g.setDataLimit(h,f),this._drawAxis(),this._drawDataset())},eiMethods:{getDataWithId:function(){for(var b=this.jsVars.instanceAPI.getJSONData(),g=[[y]],e=b.dataset,b=b.categories&&b.categories[0]&&b.categories[0].category,c=e&&e.length||0,h=0,f,a,d,m,A,B;c--;)if(a=e[c])for(g[0][c+1]=a.id||a.seriesname,m=a.id||c+1,B=(a=a.data)&&a.length||0,A=0;A<B;A+=1){d=A+1;if(!g[d]){for(f=b&&b[A+
h]||{};f.vline;)h+=1,f=b[A+h]||{};f=f.label||f.name||y;g[d]=[f]}f=g[d];d=a[A].id||d+"_"+m;f[c+1]=[d,Number(a[A].value)]}return g},getData:function(b){var g=this.jsVars.instanceAPI,e=g.getJSONData(),c=[[y]],h=e.dataset,f=e.categories&&e.categories[0]&&e.categories[0].category,a=h&&h.length||0,d=0,m,A;if(b)c=/^json$/ig.test(b)?e:I.core.transcodeData.call(g.chartInstance,e,"json",b);else for(;a--;)if(b=h[a])for(c[0][a+1]=h[a].seriesname,g=(b=h[a]&&h[a].data)&&b.length||0,e=0;e<g;e+=1){A=e+1;if(!c[A]){for(m=
f&&f[e+d]||{};m.vline;)d+=1,m=f[e+d]||{};m=m.label||m.name||y;c[A]=[m]}A=c[A];A[a+1]=Number(b[e].value)}return c}},restoreData:function(){var b=this.components,g=b.yAxis[0],e=b.dataset,b=b.legend,c=e.length,h,a;for(a=0;a<c;a++)h=e[a],h.configure();g.setAxisData({axisMaxValue:void 0,axisMinValue:void 0});this._setAxisLimits();this._drawAxis();this._drawDataset();b._drawPointLegendItem()},submitData:function(b){var g=this.chartInstance,e=new b.ajax,c=this.config,h=b.dataFormats.JSON,a=b.dataFormats.CSV,
d=b.dataFormats.XML,l=c.formAction,m=this.chartInstance,A=c.submitFormAsAjax,B,q,P,k,V;c.formDataFormat===h?(B=h,q=JSON.stringify(this.getJSONData())):this.formDataFormat===a?(B=a,q=g.getCSVString&&g.getCSVString(),void 0===q&&(q=b.core.transcodeData(this.getJSONData(),h,a))):(B=d,q=b.core.transcodeData(this.getJSONData(),h,d));b.raiseEvent("beforeDataSubmit",{data:q},m,void 0,function(){A?(e.onError=function(b,c,g,e){v.raiseEvent("dataSubmitError",{xhrObject:c.xhr,url:e,statusText:b,httpStatus:c.xhr&&
c.xhr.status?c.xhr.status:-1,data:q},m,[m.id,b,c.xhr&&c.xhr.status])},e.onSuccess=function(b,c,g,h){v.raiseEvent("dataSubmitted",{xhrObject:e,response:b,url:h,data:q},m,[m.id,b])},P={},P["str"+B.toUpperCase()]=q,e.open&&e.abort(),e.post(l,P)):(k=oa.document.createElement("span"),k.innerHTML='<form style="display:none" action="'+l+'" method="'+c.formMethod+'" target="'+c.formTarget+'"> <input type="hidden" name="strXML" value="'+hc(q)+'"><input type="hidden" name="dataFormat" value="'+B.toUpperCase()+
'" /></form>',V=k.removeChild(k.firstChild),oa.document.body.appendChild(V),V.submit&&V.submit(),V.parentNode.removeChild(V),k=V=null)},function(){b.raiseEvent("dataSubmitCancelled",{data:q},m)})},getJSONData:function(){var b=this.defaultDatasetType&&this.defaultDatasetType.toLowerCase(),g=this.components,e=g["datasetGroup_"+b],b=g.dataset,c=this.jsonData.dataset,h,a=this.jsonData,d=b.length,g=[],l;if(e)g=e.getJSONData();else for(e=0;e<d;e++)h=b[e],l=h.getJSONData(),h=c[e]||{},delete h.data,g.push(W(h,
l));b=W({},a);b.dataset=g;return b},_setDataLimits:function(){var b=this.components.dataset,g=this.config,e=-Infinity,c=Infinity,h,a,d;a=b.length;for(d=0;d<a;d++)h=b[d],h=h.getDataLimits(),e=N(e,h.max),c=E(c,h.min);g.yMax=e;g.yMin=c}},M.mscartesian);M("dragnode",{friendlyName:"Dragable Node Chart",standaloneInit:!0,hasLegend:!0,numVDivLines:0,numDivLines:0,showLimits:0,setadaptivexmin:1,showdivlinevalues:0,showzeroplane:0,showyaxisvalues:0,dontShowLegendByDefault:!0,creditLabel:n,defaultDatasetType:"dragnode",
configure:function(){var b=this.jsonData.chart,g;M.dragbase.configure.call(this);g=this.config;g.formAction=F(b.formaction);"0"!==b.submitdataasxml||b.formdataformat||(b.formdataformat=I.dataFormats.CSV);g.formDataFormat=d(b.formdataformat,I.dataFormats.XML);g.formTarget=d(b.formtarget,"_self");g.formMethod=d(b.formmethod,"POST");g.submitFormAsAjax=a(b.submitformusingajax,1);g.viewMode=a(b.viewmode,0)},_createDatasets:function(){var b=this.config,g=this.components,e=this.jsonData,c=e.dataset,h=e.connectors,
a=e.labels&&e.labels.label||[],d=c&&c.length,l=h&&h.length,m=a&&a.length||[],A=g.legend,B,q,P,k,V,p,u,n,t,z;n=0;var r=b.datasetMap||(b.datasetMap={connectors:[],dragnode:[],labels:[]}),C,v={connectors:[],dragnode:[],labels:[]},x={};if(c){this.config.categories=e.categories&&e.categories[0].category;q=g.dataset=[];B=FusionCharts.register("component",["datasetGroup","dragnode"]);e=g.datasetGroup_dragnode;B&&!e&&(e=g.datasetGroup_dragnode=new B,e.chart=this,e.init());V=FusionCharts.get("component",["dataset",
"Dragnode"]);p=FusionCharts.get("component",["dataset","Connector"]);u=FusionCharts.get("component",["dataset","DragableLabels"]);for(B=0;B<d;B++)g="dragnode",P=r[g],C=P[0],void 0===x[g]?x[g]=0:x[g]++,C?(k=c[B],t=C.components&&C.components.data||[],v[g].push(C),q.push(C),t=t.length,z=k&&k.data&&k.data.length||0,t>z&&C.removeData(z-1,t-z),C.JSONData=k,C.configure(),P.shift()):(k=c[B],P=new V,P.chart=this,v[g].push(P),q.push(P),P.chart=this,P.index=B,P.init(k),e.addDataset(P,B)),n++;for(B=0;B<l;B++)g=
"connectors",d=h[B],P=r[g],C=P[0],void 0===x[g]?x[g]=0:x[g]++,C?(t=C.components&&C.components.data||[],t=t.length,z=d.connector&&d.connector.length||0,v[g].push(C),q.push(C),t>z&&C.removeData(z-1,t-z),C.JSONData=d,C.configure(),P.shift()):(P=new p,P.chart=this,v[g].push(P),q.push(P),P.init(d),e.addConnectors(P,B)),n++;g="labels";P=r[g];C=P[0];void 0===x[g]?x[g]=0:x[g]++;C?(t=C.JSONData,t=t.length,z=m,v[g].push(C),q.push(C),t>z&&C.removeData(z-1,t-z),C.JSONData=a,C.configure(),P.shift()):(n=new u,
n.chart=this,v[g].push(n),q.push(n),n.init(a),e.addLabels(n,0));this.config._datasetUpdated=!0;for(c in r)if(P=r[c],a=P.length,n=x[c]||-1,a)for(h=0;h<a;h++)"dragnode"===c?(e.removeNodeDataset(n),e._clearConnectors(),A.removeItem(P[h].legendItemId)):"connectors"===c?e.removeConnectorSet(n):e.removeLabelSet(n),K.call(P[h]),n+=1;b.datasetMap=v}else this.setChartMessage()},addConfigureOptions:function(){var b=this.chartMenuTools,g=this.components["datasetGroup_"+this.defaultDatasetType],e=this.components.chartMenuBar.componentGroups[0].symbolList[0].getListRefernce(),
b=b.set,c=this.config.viewMode,h=[{"Add Node":{handler:function(){g.showNodeAddUI()},action:"click"}},{"Add Connector":{handler:function(){g.showConnectorAddUI(g.chart,{})},action:"click"}},{"Add Label":{handler:function(){g.showLabelUpdateUI(g.chart,{})},action:"click"}}];b(h);!c&&e.appendAsList(h)},_redrawDragNode:function(b,g){var e=this.chart;this.draw();v.raiseEvent("chartUpdated",W({sourceEvent:g},b),e.chartInstance,[e.chartInstance.id])},addNode:function(b){var g=this.components.dataset,e=
b.datasetId,c=g.length,h,a,d,l;for(l=0;l<c;l++)if(h=g[l]||{},d=h.config&&h.config.id,void 0!==d&&(d=d.toString()),d===e){a=!0;break}h&&a&&(g=h.groupManager,e=h.components.data,b.add=!0,c=e.length,e={index:c,dataIndex:c,link:b.link,y:b.y,x:b.x,shape:b.shape,width:b.width,height:b.height,radius:b.radius,sides:b.sides,label:b.name,toolText:b.tooltext,id:b.id,datasetIndex:h.index,datasetName:h.JSONData.seriesname,sourceType:"dataplot"},h._setConfigure(c,b),this._redrawDragNode.call(g,e,"nodeAdded"),I.raiseEvent("nodeAdded",
e,this.chartInstance))},updateNode:function(b){var g=this.components["datasetGroup_"+this.defaultDatasetType],e=g.datasets,c=e.length,h,a,d,l,m,A,B;b.update=!0;for(m=0;m<c;m++)for(d=e[m].dataset,A=d.components.data||[],h=A.length,B=0;B<h;B++)if(l=A[B],l.config.id===b.id){a=!0;break}d&&a&&(e={index:B,dataIndex:B,link:b.link,y:b.y,x:b.x,shape:b.shape,width:b.width,height:b.height,radius:b.radius,sides:b.sides,label:b.name,toolText:b.tooltext,id:b.id,datasetIndex:d.index,datasetName:d.JSONData.seriesname,
sourceType:"dataplot"},d._setConfigure(B,b),this._redrawDragNode.call(g,e,"nodeupdated"),I.raiseEvent("nodeupdated",e,this.chartInstance))},deleteNode:function(b){var g=this.components["datasetGroup_"+this.defaultDatasetType].nodes,e=g[b],c,h,a,d,l,m,A,B,q=function(b){for(var c in b)b[c].remove()};if(e){c=e.dataset;h=c.components.data;a=e.config.startConnectors;d=e.config.endConnectors;B=h.length;for(e=0;e<B;e++)if(m=h[e],m.config.id===b){l=!0;break}if(!0===l){h=m.graphics;q(h);for(A in a)l=a[A]||
{},h=l.graphics,q(h),delete l.graphics;for(A in d)l=d[A]||{},h=l.graphics,q(h),delete l.graphics;delete g[b];m.removed=!0;b=m.config||{};c={index:e,dataIndex:e,link:b.link,y:b.y,x:b.x,shape:b.shape,width:b.width,height:b.height,radius:b.radius,sides:b.sides,label:b.displayValue,toolText:b.toolText,id:b.id,datasetIndex:e,datasetName:c.JSONData.seriesname,sourceType:"dataplot"};v.raiseEvent("chartUpdated",W({sourceEvent:"nodedeleted"},c),this.chartInstance,[this.chartInstance.id]);I.raiseEvent("nodedeleted",
c,this.chartInstance)}}},addConnector:function(b){var g=this.components["datasetGroup_"+this.defaultDatasetType],e=g.connectorSet[0].connectors,c=e.components.data.length;b.add=!0;e._setConfigure(c,b);b={arrowAtEnd:Boolean(b.arrowAtEnd),arrowAtStart:Boolean(b.arrowAtStart),fromNodeId:b.from,id:b.id,label:b.label,link:b.connectorLink,sourceType:"connector",toNodeId:b.to};this._redrawDragNode.call(g,b,"connectoradded");I.raiseEvent("connectoradded",b,this.chartInstance)},editConnector:function(b){var g=
this.components["datasetGroup_"+this.defaultDatasetType],e=b.from,c=b.to,h=g.connectorSet,a,d,l,m,A,B,q,P,k=h.length;for(a=0;a<k;a++)for(l=(P=h[a].connectors)&&P.components.data||[],d=l.length,B=0;B<d;B++)if(m=l[B],A=m.config,m=A.from,A=A.to,m===e&&A===c){q=!0;break}b.update=!0;q&&(P._setConfigure(B,b),b={arrowAtEnd:Boolean(b.arrowatend),arrowAtStart:Boolean(b.arrowatstart),fromNodeId:b.from,id:b.id,label:b.label,link:b.link,sourceType:"connector",toNodeId:b.to},this._redrawDragNode.call(g,b,"connectorupdated"),
I.raiseEvent("connectorupdated",b,this.chartInstance))},deleteConnector:function(b){var g=b.from;b=b.to;var e=this.components["datasetGroup_"+this.defaultDatasetType].connectorSet,c,h,a,d,l,m=!1,A=e.length;for(c=0;c<A;c++)for(h=e[c].connectors,d=h.components.data,l=d.length,h=0;h<l;h++)if(a=d[h],a.config.from===g&&a.config.to===b){m=!0;break}if(m){g=a.config||{};g={arrowAtEnd:g.arrowAtEnd,arrowAtStart:g.arrowAtStart,fromNodeId:g.from,id:g.id,label:g.label,link:g.connectorLink,sourceType:"connector",
toNodeId:g.to};b=a.graphics;for(var B in b)b[B].remove();delete a.graphics;a.removed=!0;v.raiseEvent("chartUpdated",W({sourceEvent:"connectordeleted"},g),this.chartInstance,[this.chartInstance.id]);I.raiseEvent("connectordeleted",g,this.chartInstance)}},addLabel:function(b){var g=this.components["datasetGroup_"+this.defaultDatasetType],e=g.labelSet,c=FusionCharts.get("component",["dataset","DragableLabels"]);b.add=!0;e.length?(e=g.labelSet[0].labels,c=e.components.data,c=c.length,e._setConfigure(c,
b)):(e=new c,e.chart=this,e.init([b]),g.addLabels(e,0));e={text:b.text,x:b.x,y:b.y,allowdrag:b.allowdrag,sourceType:"labelnode",link:b.link};this._redrawDragNode.call(g,e,"labeladded");I.raiseEvent("labeladded",e,this.chartInstance);b.add=!0},deleteLabel:function(b){b=this.components["datasetGroup_"+this.defaultDatasetType].labelSet[0].labels.components.data[b];var g,e;if(g=b.graphics.element)e=g.data("eventArgs"),g.remove(),delete b.graphics;v.raiseEvent("chartUpdated",W({sourceEvent:"labeldeleted"},
e),this.chartInstance,[this.chartInstance.id]);I.raiseEvent("labeldeleted",e,this.chartInstance);b.removed=!0},restoreData:function(){var b=this.components["datasetGroup_"+this.defaultDatasetType],g=b.datasets,e=this.components.legend,c=b.connectorSet,a,f,d,l,m=b.labelSet,A=function(b){var c,g;for(c=0;c<b.length;c++)if(d=b[c],delete d.removed,d.config.add)for(g in l=b[c].graphics,l)l[g].remove()};for(a=0;a<g.length;a++)f=g[a].dataset,b=f.components.data,A(b),f.drawn=!1,f.configure();for(a=0;a<c.length;a++)f=
c[a].connectors,b=f.components.data,A(b),f.drawn=!1,f.configure();m.length&&(g=m[0].labels,b=g.components.data,A(b),g.configure());this._setAxisLimits();this._drawAxis();this._drawDataset();e._drawPointLegendItem()},getJSONData:function(){var b=this.defaultDatasetType&&this.defaultDatasetType.toLowerCase(),g=this.components,e=g["datasetGroup_"+b],b=g.dataset,c=this.jsonData,a=b.length,g=[],f;if(e)g=e.getJSONData();else for(e=0;e<a;e++)f=b[e],f=f.getJSONData(),g.push(f);b=W({},c);b.dataset=g.dataset;
b.connectors=g.connectors;b.labels=g.labels;return b},_setCategories:function(){var b=this.jsonData,g=this.components.xAxis,b=b.categories&&b.categories[0].category||[],e=b.length,c=[],a,f;for(a=0;a<e;a++)f=b[a]||{},void 0!==f.x&&c.push(f);g&&g[0].setCategory(c)},_drawDataset:function(){var b=this.components["datasetGroup_"+this.defaultDatasetType];b&&b.draw()},_setAxisLimits:function(){var b=this.components,g=this.jsonData,g=g.categories&&g.categories[0].category||[],e,c=b.dataset,a=b.yAxis,b=b.xAxis,
f,s=c.length,l,m=-Infinity,A=Infinity,B=Infinity,q=-Infinity,P,k,V={},p=[],n=function(b){P=d(b.xMax,-Infinity);k=d(b.xMin,Infinity);m=N(m,b.max);A=E(A,b.min);q=N(q,P);B=E(B,k)};for(l=0;l<s;l++)f=c[l],(e=f.groupManager)?V[f.type]=e:p.push(f);for(e in V)c=V[e].getDataLimits(),n(c);s=p.length;for(l=0;l<s;l++)c=p[l].getDataLimits(),n(c);-Infinity===m&&(m=0);Infinity===A&&(A=0);this.config.yMax=m;this.config.yMin=A;a[0].setAxisConfig({isPercent:this.isStacked?this.config.stack100Percent:0});a[0].setDataLimit(m,
A);if(-Infinity!==q||Infinity!==B){l=0;for(s=g.length;l<s;l++)if(e=g[l],e=e.x)e<B&&(B=e),e>q&&(q=e);b[0].setDataLimit(q,B)}}},M.dragbase);FusionCharts.register("component",["datasetGroup","DragNode",{init:function(){this.connectorSet=[];this.nodes={};this.datasets=[];this.components=[];this.graphics={};this.labelSet=[]},addDataset:function(b,g){var e=this.datasets[g];b.groupManager=this;b.datasetIndex=g;e||(this.datasets[g]={dataset:b})},addLabels:function(b,g){var e=this.labelSet[g];b.groupManager=
this;e||(this.labelSet[g]={labels:b})},addConnectors:function(b,g){var e=this.connectorSet[g];b.groupManager=this;e||(this.connectorSet[g]={connectors:b})},showNodeAddUI:function(){var b=this.chart,g=b.components.dataset,e=u,c,a,f;for(f=0;f<g.length;f++)a=g[f]||{},c=a.config,a=a.plotType,"dragnode"===a&&(e+='<option value="'+c.id+'">'+(c.name!==y&&void 0!==c.name&&c.name+Xb+" "||y)+c.id+"</option>");this.showNodeUpdateUI(b,{dataset:{innerHTML:e}})},showConnectorAddUI:function(){var b=this.chart,g=
this.nodes,e=u,c,a;for(a in g)c=g[a],c=c.config,c=c.id,e+='<option value="'+c+'">'+c+"</option>";this.showConnectorUpdateUI(b,{fromid:{innerHTML:e},toid:{innerHTML:e}})},draw:function(){var b=this.datasets,g=this.connectorSet,e,c,a=this.labelSet,f;this.updateUIvisuals();e=0;for(f=b.length;e<f;e++)c=b[e].dataset,c.draw();e=0;for(f=g.length;e<f;e++)b=g[e].connectors,b.draw();e=0;for(f=a.length;e<f;e++)g=a[e].labels,g.draw();this.drawn=!0},getJSONData:function(){var b=this.datasets,g=this.connectorSet,
e=this.labelSet,c={},a,f,d;c.dataset=[];c.connectors=[];c.labels=[];a=0;for(f=b.length;a<f;a++)d=b[a]&&b[a].dataset,c.dataset[a]||(c.dataset[a]=W({},d.JSONData)),c.dataset[a].data=d.getJSONData();a=0;for(f=g.length;a<f;a++)d=g[a]&&g[a].connectors,c.connectors[a]||(c.connectors[a]=W({},d.JSONData)),c.connectors[a].connector=d.getJSONData();a=0;for(f=e.length;a<f;a++)d=e[a]&&e[a].labels,c.labels[a]||(c.labels[a]={label:[]}),c.labels[a].label=d.getJSONData();return c},clearLongPress:function(){this.data("move",
!1);clearTimeout(this._longpressactive);delete this._longpressactive},createHtmlDialog:function(b,g,e,c,a,f,d){var l=b.components.paper,m=b.config.style.inCanvasStyle||{},A=b.config.width,B=b.config.height,q=b.get("config","animationObj").transposeAnimDuration,P={color:Tb(m.color),textAlign:"center",paddingTop:"1px",border:"1px solid #cccccc",borderRadius:"4px",cursor:"pointer",_cursor:"hand",backgroundColor:"#ffffff",zIndex:21,"-webkit-border-radius":"4px"},k=d;k?q?k.animate({width:A,height:B},q,
"normal"):k.attr({width:A,height:B}):k=l.html("div",{fill:"transparent",width:A,height:B},{fontSize:"10px",lineHeight:"15px",fontFamily:m.fontFamily},b.linkedItems.container);k.veil?q?k.veil.animate({width:A,height:B},q,"normal"):k.veil.attr({width:A,height:B}):k.veil=l.html("div",{fill:"000000",width:A,height:B,opacity:.3},void 0,k);b={x:(A-g)/2,y:(B-e)/2,fill:"efefef",strokeWidth:1,stroke:"000000",width:g,height:e};k.dialog?q?k.dialog.animate({x:b.x,y:b.y,width:b.width,height:b.height},q,"normal"):
k.dialog.attr(b):k.dialog=l.html("div",b,{borderRadius:"5px",boxShadow:"1px 1px 3px #000000","-webkit-border-radius":"5px","-webkit-box-shadow":"1px 1px 3px #000000",filter:'progid:DXImageTransform.Microsoft.Shadow(Strength=4, Direction=135, Color="#000000")'},k);b={x:g-70-5,y:e-23-5,width:65,height:17,text:"Submit",tabIndex:1};k.ok?q?k.ok.animate({x:b.x,y:b.y,width:b.width,height:b.height},q,"normal"):k.ok.attr(b):k.ok=l.html("div",b,P,k.dialog).on("click",c);c={x:g-140-5,y:e-23-5,width:65,height:17,
text:"Cancel",tabIndex:2};k.cancel?q?k.cancel.animate({x:c.x,y:c.y,width:c.width,height:c.height},q,"normal"):k.cancel.attr(c):k.cancel=l.html("div",c,P,k.dialog).on("click",a);g={x:g-210-5,y:e-23-5,width:65,height:17,text:"Delete",tabIndex:3};k.remove?q?k.remove.animate({x:g.x,y:g.y,width:g.width,height:g.height},q,"normal"):k.remove.attr(g):k.remove=l.html("div",g,P,k.dialog).on("click",f);k.handleKeyPress||(k.handleKeyPress=function(b){13===b.keyCode?k.ok.trigger(qb?"touchStart":"click",b):27===
b.keyCode&&k.cancel.trigger(qb?"touchStart":"click",b)});return k},updateUIvisuals:function(){var b=this.graphics.cacheConnectorUpdateUI,g=this.chart,e=this.graphics.cacheLabelUpdateUI,c=this.graphics.cacheLabelDeleteUI,a=this.graphics.cacheUpdateUI;b&&this.createHtmlDialog(g,350,215,void 0,void 0,void 0,b);a&&this.createHtmlDialog(g,350,215,void 0,void 0,void 0,a);e&&this.createHtmlDialog(g,350,215,void 0,void 0,void 0,e);c&&this.createHtmlDialog(g,350,215,void 0,void 0,void 0,c)},showConnectorUpdateUI:function(b,
g,e){var c=b.components.paper,a=this.cacheConnectorUpdateUI,f={border:"1px solid #cccccc",fontSize:"10px",lineHeight:"15px",fontFamily:(b.config.style.inCanvasStyle||{}).fontFamily,padding:"2px"},s={textAlign:"right"},l=a&&a.fields,m=a&&a.labels,A,B,q,P=function(){var c=a&&a.fields,c={from:c.fromid.val(),to:c.toid.val(),id:c.id.val()};b.deleteConnector(c);a.hide()},k;a?(a.attr({width:b.config.width,height:b.config.height}),a.veil.attr({width:b.config.width,height:b.config.height}),a.dialog.attr({x:(b.config.width-
315)/2,y:(b.config.height-215)/2,width:315,height:215})):(a=this.graphics.cacheConnectorUpdateUI=this.createHtmlDialog(b,315,215,function(){var c=a&&a.fields,g;c&&(g={from:c.fromid.val(),to:c.toid.val(),id:c.id.val(),label:c.label.val(),color:c.color.val(),alpha:c.alpha.val(),link:c.url.val(),tooltext:c.tooltext.val(),strength:c.strength.val(),arrowatstart:c.arratstart.val(),arrowatend:c.arratend.val(),dashed:c.dashed.val(),dashlen:c.dashlen.val(),dashgap:c.dashgap.val()},g.from?g.to?g.from!=g.to?
(e?b.editConnector(g):b.addConnector(g),a.enableFields(),a.hide(),a.clearFields()):(a.error.attr({text:"Connector cannot start and end at the same node!"}),c.fromid.focus()):(a.error.attr({text:"Please select a valid connector end."}),c.toid.focus()):(a.error.attr({text:"Please select a valid connector start."}),c.fromid.focus()))},function(){a.error.attr({text:u});a.enableFields();a.hide()},P),k=a.dialog,m=a.labels={},l=a.fields={});a.config=g;a.enableFields||(a.enableFields=function(){for(var b in g)g[b]&&
g[b].disabled&&l[b]&&l[b].element.removeAttribute("disabled")});a.clearFields||(a.clearFields=function(){var b,c=a.fields;for(b in c)c[b].element.disabled||(c[b].element.value=u)});Ua(this.connectorUpdateUIDefinition,function(b){var e=b.key,P=g[e]||{};m[e]||(m[e]=c.html("label",{x:b.x,y:b.y,width:b.labelWidth||45,text:b.text},s,k));if(!b.noInput){if(!(B=l[e])){B=l[e]=c.html(b.inputType||"input",{y:-2+(b.inputPaddingTop||0),x:b.labelWidth&&b.labelWidth+5||50,width:b.inputWidth||50,name:e||u},f);if("select"!==
b.inputType)B.attr({type:b.type||"text"}).on("keyup",a.handleKeyPress);B.add(m[e])}(A=d(P.innerHTML,b.innerHTML))&&B.attr({innerHTML:A});void 0!==(q=d(P.val,b.val))&&B.val(q);P.disabled&&B.attr({disabled:"disabled"})}});a.checkDash=function(){var b=l.dashed&&l.dashed.val()?"show":"hide";m.dashgap&&m.dashgap[b]();l.dashgap&&l.dashgap[b]();m.dashlen&&m.dashlen[b]();l.dashlen&&l.dashlen[b]()};a.checkDash();l.dashed.on("click",a.checkDash);a.error||(a.error=c.html("span",{color:"ff0000",x:10,y:170},void 0,
k));a.remove[e?"show":"hide"]();b.animation?a.fadeIn("fast"):a.show()},labelUpdateUIDefinition:[{key:"label",text:"Label*",x:10,y:15,inputWidth:235},{key:"size",text:"Size",x:10,y:40},{key:"padding",text:"Padding",x:10,y:65},{key:"x",text:"Position",x:120,y:65,labelWidth:70,inputWidth:25},{key:"y",text:",",x:225,y:65,labelWidth:10,inputWidth:25},{key:"xy",text:"(x, y)",x:260,y:65,noInput:!0},{key:"allowdrag",text:"Allow Drag",x:120,y:40,inputType:"checkbox",inputPaddingTop:3,inputWidth:15,labelWidth:70,
val:1},{key:"color",text:"Color",x:10,y:90},{key:"alpha",text:"Alpha",x:145,y:90,inputWidth:30,val:"100"},{key:"bordercolor",text:"Border Color",x:10,y:125,labelWidth:100},{key:"bgcolor",text:"Background Color",x:10,y:150,labelWidth:100}],showLabelUpdateUI:function(b,g){var e=b.components.paper,c=this.graphics.cacheLabelUpdateUI,a={border:"1px solid #cccccc",fontSize:"10px",lineHeight:"15px",fontFamily:(b.config.style.inCanvasStyle||{}).fontFamily,padding:"2px"},f={textAlign:"right"},s=c&&c.fields,
l=c&&c.labels,m,A,B;c||(c=this.graphics.cacheLabelUpdateUI=this.createHtmlDialog(b,315,205,function(){var g=c&&c.fields,e;g&&(e={text:g.label.val(),x:g.x.val(),y:g.y.val(),color:g.color.val(),alpha:g.alpha.val(),bgcolor:g.bgcolor.val(),bordercolor:g.bordercolor.val(),fontsize:g.size.val(),allowdrag:g.allowdrag.val(),padding:g.padding.val()},e.text?(b.addLabel&&b.addLabel(e),c.hide()):(c.error.attr({text:"Label cannot be blank."}),g.label.focus()))},function(){c.error.attr({text:u});c.hide()}),B=c.dialog,
l=c.labels={},s=c.fields={});Ua(this.labelUpdateUIDefinition,function(b){var P=b.key;l[P]||(l[P]=e.html("label",{x:b.x,y:b.y,width:b.labelWidth||45,text:b.text},f,B));b.noInput||((m=s[P])||(m=s[P]=e.html("input",{y:-2+(b.inputPaddingTop||0),x:b.labelWidth&&b.labelWidth+5||50,width:b.inputWidth||50,type:b.inputType||"text",name:P||u},a,l[P]).on("keyup",c.handleKeyPress)),void 0!==(A=d(g[P],b.val))&&m.val(A))});c.error||(c.error=e.html("span",{color:"ff0000",x:10,y:180},void 0,B));b.animation?c.fadeIn("fast"):
c.show();c.fields.label.focus()},showLabelDeleteUI:function(b){var g=this.chart,e=g.get("config","animationObj").duration,c=g.components.paper,a=this.graphics.cacheLabelDeleteUI;a||(a=this.graphics.cacheLabelDeleteUI=this.createHtmlDialog(g,250,100,void 0,function(){a.hide()},function(){g.deleteLabel(b.config.index);a.hide()}),a.message=c.html("span",{x:10,y:10,width:230,height:80}).add(a.dialog),a.ok.hide(),a.remove.translate(175).show());a.message.attr({text:'Would you really like to delete the label: "'+
b.config.text+'"?'});e?a.fadeIn("fast"):a.show()},connectorUpdateUIDefinition:[{key:"fromid",text:"Connect From",inputType:"select",x:10,y:15,labelWidth:80,inputWidth:100},{key:"toid",text:"Connect To",inputType:"select",x:10,y:40,labelWidth:80,inputWidth:100},{key:"arratstart",text:"Arrow At Start",x:200,y:15,type:"checkbox",inputPaddingTop:3,labelWidth:80,inputWidth:15},{key:"arratend",text:"Arrow At End",x:200,y:40,type:"checkbox",inputPaddingTop:3,labelWidth:80,inputWidth:15},{key:"label",text:"Label",
x:10,y:75,labelWidth:40,inputWidth:120},{key:"id",text:"Node ID",x:190,y:75,inputWidth:55},{key:"color",text:"Color",x:10,y:100,labelWidth:40,inputWidth:35},{key:"alpha",text:"Alpha",x:110,y:100,inputWidth:25,labelWidth:35},{key:"strength",text:"Strength",x:190,y:100,inputWidth:55,val:"0.1"},{key:"url",text:"Link",x:10,y:125,labelWidth:40,inputWidth:120},{key:"tooltext",text:"Tooltip",x:190,y:125,labelWidth:40,inputWidth:60},{key:"dashed",text:"Dashed",x:10,y:150,type:"checkbox",inputPaddingTop:3,
inputWidth:15,labelWidth:40},{key:"dashgap",text:"Dash Gap",x:85,y:150,labelWidth:60,inputWidth:25},{key:"dashlen",text:"Dash Length",x:190,y:150,labelWidth:70,inputWidth:30}],nodeUpdateUIDefinition:[{key:"id",text:"Id",inputWidth:60,x:10,y:15},{key:"dataset",text:"dataset",inputType:"select",inputWidth:110,innerHTML:void 0,x:170,y:15},{key:"x",text:"Value",x:10,y:40,inputWidth:21},{key:"y",text:",",x:88,y:40,inputWidth:21,labelWidth:5},{text:"(x, y)",x:125,y:40,labelWidth:33,noInput:!0},{key:"tooltip",
text:"Tooltip",inputWidth:105,x:170,y:40},{key:"label",text:"Label",inputWidth:92,x:10,y:65},{key:"labelalign",text:"Align",labelWidth:70,inputWidth:110,inputType:"select",innerHTML:'<option></option><option value="top">Top</option><option value="middle">Middle</option><option value="bottom">Bottom</option>',x:145,y:63},{key:"color",text:"Color",x:10,y:90,inputWidth:60},{key:"colorOut",innerHTML:"&nbsp;",x:85,y:90,inputWidth:15,inputType:"span"},{key:"alpha",text:"Alpha",x:170,y:90,inputWidth:20},
{key:"draggable",text:"Allow Drag",value:!0,inputWidth:20,x:250,y:90,labelWidth:58,inputPaddingTop:3,type:"checkbox"},{key:"shape",text:"Shape",inputType:"select",inputWidth:97,innerHTML:'<option value="rect">Rectangle</option><option value="circ">Circle</option><option value="poly">Polygon</option>',x:10,y:115},{key:"rectHeight",text:"Height",x:170,y:115,inputWidth:20},{key:"rectWidth",text:"Width",x:255,y:115,inputWidth:20},{key:"circPolyRadius",text:"Radius",x:170,y:115,inputWidth:20},{key:"polySides",
text:"Sides",x:255,y:115,inputWidth:20},{key:"link",text:"Link",x:10,y:140,inputWidth:92},{key:"image",text:"Image",type:"checkbox",inputPaddingTop:4,inputWidth:20,x:10,y:170},{key:"imgUrl",text:"URL",inputWidth:105,x:170,y:170},{key:"imgWidth",text:"Width",inputWidth:20,x:10,y:195},{key:"imgHeight",text:"Height",inputWidth:20,x:82,y:195},{key:"imgAlign",text:"Align",inputType:"select",inputWidth:75,innerHTML:'<option value="top">Top</option><option value="middle">Middle</option><option value="bottom">Bottom</option>',
x:170,y:195}],showNodeUpdateUI:function(){var b=function(){for(var b=this.graphics.cacheUpdateUI,g=b.fields.shape,e=["rectWidth","rectHeight","circPolyRadius","polySides"],a=e.length,l;a--;)l=e[a],/rect|poly|circ/ig.test(l)&&(b.labels[l].hide(),b.fields[l].hide()),(new RegExp(d(g.val(),"rect"),"ig")).test(l)&&(b.labels[l].show(),b.fields[l].show())},g=function(){var b=this.graphics.cacheUpdateUI.fields,g=rc(b.color.val());g&&b.colorOut.css({background:qc(g)})},e=function(b,g){var e=this.graphics.cacheUpdateUI,
a=b.config.height,d=e.fields.image.val(),m=g?300:0,A=["imgWidth","imgHeight","imgAlign","imgUrl"],B,q,P;B=d?250:215;e.ok.hide();e.cancel.hide();e.remove.hide();e.error.hide();for(q=A.length;!d&&q--;)P=A[q],e.labels[P].hide(),e.fields[P].hide();v.danimate.animate(e.dialog.element,{top:(a-B)/2,height:B},m,"linear",function(){for(q=A.length;q--&&d;)P=A[q],e.labels[P].show(),e.fields[P].show();e.ok.attr({y:B-23-5}).show();e.cancel.attr({y:B-23-5}).show();e.remove.attr({y:B-23-5});e.error.attr({y:B-23-
5+4}).show();e.edit?e.remove.show():e.remove.hide()})};return function(c,a,f){var d=this,l=d.graphics,m=l.cacheUpdateUI,A=d.nodes,B=c.config,q=B.animation,P=c.components.paper,k={width:"80px",border:"1px solid #cccccc",fontSize:"10px",lineHeight:"15px",padding:"2px",fontFamily:(B.style.inCanvasStyle||{}).fontFamily},p={textAlign:"right"},n=m&&m.fields,t=m&&m.labels,r,B=function(){var b=m&&m.fields,c=m.edit,g=d.chart,e=g.components,a,f,h;a=e.xAxis[0].config.axisRange.min;e=e.yAxis[0].config.axisRange.min;
if(b){switch(b.shape.val()){case "circ":h="circle";break;case "poly":h="polygon";break;default:h="rectangle"}a={x:la(b.x.val(),a),y:la(b.y.val(),e),id:b.id.val(),datasetId:b.dataset.val(),name:b.label.val(),tooltext:b.tooltip.val(),color:b.color.val(),alpha:b.alpha.val(),labelalign:b.labelalign.val(),allowdrag:b.draggable.val(),shape:h,width:b.rectWidth.val(),height:b.rectHeight.val(),radius:b.circPolyRadius.val(),numsides:b.polySides.val(),imagenode:b.image.val(),imagewidth:b.imgWidth.val(),imageheight:b.imgHeight.val(),
imagealign:b.imgAlign.val(),imageurl:b.imgUrl.val(),link:b.link.val()};A[a.id]&&(f=!0);if(f&&void 0===c)m.error.attr({text:"ID already exist."}),b.label.focus();else{b=a.datasetId;if(b!==u||c)c?g.updateNode(a):g.addNode(a),m.hide(),m.visible=!1;return}}m.enableFields()},v=function(){m.hide();m.visible=!1;m.enableFields();m.error.attr({text:y});m.visible=!1},z=function(){c.deleteNode(m.fields.id.val());m.hide();m.visible=!1};m||(m=l.cacheUpdateUI=this.createHtmlDialog(c,350,215,B,v,z),r=m.dialog,t=
m.labels={},n=m.fields={});m.config=a;m.edit=f;m.error||(m.error=P.html("span",{color:"ff0000",x:30,y:228},void 0,r));m.enableFields||(m.enableFields=function(){for(var b in a)a[b]&&a[b].disabled&&n[b]&&n[b].element.removeAttribute("disabled")});m.clearFields||(m.clearFields=function(){var b,c=m.fields;for(b in c)c[b].element.disabled||(c[b].element.value=u)});Ua(this.nodeUpdateUIDefinition,function(f){var l,q=f.key,A={},B=a[q]||{},z,v;!t[q]&&(t[q]=P.html("label",{x:f.x,y:f.y,width:f.labelWidth||
45,text:f.text},p,r));if(!f.noInput){l=n[q];if(!l){k.border="checkbox"==f.type?y:"1px solid #cccccc";l=n[q]=P.html(f.inputType||"input",{x:f.labelWidth&&f.labelWidth+5||50,y:-2+(f.inputPaddingTop||0),width:f.inputWidth||50,name:q||u},k);if("select"!==f.inputType)l.attr({type:f.type||"text"}).on("keyup",m.handleKeyPress);l.add(t[q])}ba(z=la(B.innerHTML,f.innerHTML))&&(A.innerHTML=z);B.disabled?A.disabled="disabled":l.element&&(l.element.disabled=!1);l.attr(A);ba(v=la(B.value,f.value))&&l.val(v);"shape"==
q&&l.on("change",function(){b.call(d,c)});"image"==q&&l.on("click",function(){e.call(d,c,!0)});"color"==q&&l.on("keyup",function(){g.call(d,c)})}});g.call(this,c);e.call(this,c);b.call(this,c);q?m.fadeIn("fast"):m.show();m.visible=!0;m.fields[f?"label":"id"].focus()}}(),getDataLimits:function(){var b=this.datasets,g,e=Infinity,c=-Infinity,a=-Infinity,f=Infinity,d;for(g=0;g<b.length;g++)d=b[g].dataset.config,c=N(c,d.yMax),e=E(e,d.yMin),a=N(a,d.xMax),f=E(f,d.xMin);return{max:c,min:e,xMax:a,xMin:f}},
removeNodeDataset:function(b){this.datasets.splice(b)},removeConnectorSet:function(b){this.connectorSet.splice(b)},removeLabelSet:function(b){this.labelSet.splice(b)},_clearConnectors:function(){var b=this.nodes,g,e,c,a,f;for(g in b)if(c=b[g]){e=c.config.startConnectors||[];c=c.config.endConnectors||[];for(f=0;f<e.length;f++)a={graphics:e[f].graphics||{}},K.call(a);for(f=0;f<c.length;f++)a={graphics:c[f].graphics||{}},K.call(a)}this.nodes={}}}]);FusionCharts.register("component",["dataset","Dragnode",
{type:"dragnode",configure:function(){var b=this.index,g=this.chart,e=this.JSONData,c=g.jsonData.chart,h=(e.data||[]).length,f=this.config,g=g.components.colorManager,s,l,m,A,B,q;f.showValues=a(e.showvalues,c.showvalues,1);q=f.useRoundEdges=a(c.useroundedges);f.zIndex=1;f.name=F(e.seriesname);f.viewMode=a(c.viewmode,0);f.id=d(e.id,this.index);if(0===a(e.includeinlegend)||void 0===f.name)f.showInLegend=!1;f.includeInLegend=a(e.includeinlegend,1);f.showTooltip=a(c.showtooltip,1);f.seriesNameInTooltip=
a(c.seriesnameintooltip,1);f.tooltipSepChar=d(c.tooltipsepchar," - ");s=f.plotFillAlpha=d(c.plotfillalpha,"100");l=f.showPlotBorder=a(c.showplotborder,1);m=f.plotBorderColor=Ha(d(c.plotbordercolor,"666666"));A=f.plotBorderThickness=a(c.plotborderthickness,q?2:1);B=f.plotBorderAlpha=d(c.plotborderalpha,c.plotfillalpha,q?"35":"95");f.use3DLighting=Boolean(a(c.use3dlighting,c.is3d,q?1:0));f.color=Ha(d(e.color,g.getPlotColor(b)));f.alpha=d(e.plotfillalpha,e.nodeFillAlpha,e.alpha,s);f.datasetShowPlotBorder=
Boolean(a(e.showplotborder,l));f.datasetPlotBorderColor=Ha(d(e.plotbordercolor,e.nodebordercolor,m));f.datasetPlotBorderThickness=a(e.plotborderthickness,e.nodeborderthickness,A);f.datasetPlotBorderAlpha=f.datasetShowPlotBorder?d(e.plotborderalpha,e.nodeborderalpha,e.alpha,B):"0";f.seriesname=Z(e.seriesname);f.datasetAllowDrag=Boolean(a(e.allowdrag,1));f.colorObj={fillColor:ea(f.color,f.alpha),lineColor:{FCcolor:{color:f.datasetPlotBorderColor,alpha:f.datasetPlotBorderAlpha}}};f.lineWidth=void 0;
f.symbol="poly_4";b=this.components.data=this.components.data||(this.components.data=[]);c=b.length;c>h&&b.splice(h,c-h);this.visible=1===a(e.visible,!Number(e.initiallyhidden),1);f.yMin=f.yMax=f.xMax=f.xMin=0;this._refreshData=!0;for(e=0;e<h;e+=1)this._setConfigure(e);this._refreshData=!1;this._addLegend()},_setConfigure:function(b,g){var e=this.JSONData,c=e.data,h=g?g:c[b],f=this.components.data,c=this.config,f=f[b]=f[b]||(f[b]={}),s=f.config=f.config||(f.config={}),l=c.id,m=c.yMin||Infinity,A=
c.yMax||-Infinity,B=c.xMax||-Infinity,q=c.xMin||Infinity,P,k,p=c.use3DLighting,n=c.datasetPlotBorderThickness,u=c.datasetPlotBorderColor,t=c.datasetPlotBorderAlpha,r=this.chart.jsonData.chart,z=c.color,v=c.alpha,C=c.datasetAllowDrag,x=this.chart.components.numberFormatter;!f.graphics&&(f.graphics={});s._options=W({},h);if(h||g){P=s.y=x.getCleanValue(d(h.y));k=s.x=x.getCleanValue(d(h.x));s.index=b;s.dragStart||(s.dragStart={});A=N(A,s.y);m=E(m,s.y);B=N(B,s.x);q=E(q,s.x);if(null===P)s.value=null;else{k=
x.xAxis(k);s.formatedVal=null===P?P:x.dataLabels(P);s.setTooltext=F(Z(d(h.tooltext,e.plottooltext,r.plottooltext)));s.pointLabel=d(h.label,h.name);e=Z(s.pointLabel);s.label=e;s.name=e;s.displayValue=e;s.xValue=k;s.toolText=c.showTooltip?this._configureTooltext(s,c,r):!1;s.link=h.link;s.id=d(h.id,l+"_"+b);s.allowDrag=Boolean(a(h.allowdrag,C));e=s.shape=F(d(h.shape),"rectangle").toLowerCase();s.height=F(d(h.height),10);s.width=F(d(h.width),10);s.radius=F(d(h.radius),10);s.numSides=F(d(h.numsides),4);
s.color=Ha(d(h.color,z));s.borderColor=Ha(d(h.bordercolor,u));s.alpha=d(h.alpha,v);s.imageURL=F(h.imageurl);s.imageNode=Boolean(a(h.imagenode));s.imageWidth=h.imagewidth;s.imageHeight=h.imageheight;s.imageAlign=F(h.imagealign,y).toLowerCase();s.labelAlign=d(h.labelalign,s.imageNode&&ba(s.imageURL)?Wb:"middle");switch(s.shape){case "circle":h=0;break;case "polygon":h=2;e=pc(s.numSides);break;default:h=1}s.symbol=e;p?(s.fillColor=this.getPointColor(s.color,s.alpha,h),s.cloneFillColor=this.getPointColor(s.color,
50,h)):(s.fillColor={color:s.color,alpha:s.alpha},s.cloneFillColor=ea(s.color,50));s.rollOverProperties=this.pointHoverOptions(f,r,{shapeType:h,use3D:p,height:s.height,width:s.width,radius:s.radius,color:s.color,alpha:s.alpha,borderColor:s.borderColor,borderAlpha:t,borderThickness:n})}!s.update&&g&&(s.update=g.update);!s.add&&g&&(s.add=g.add);!0===this._refreshData&&delete f.removed}f.dataset=this;c.xMax=B;c.xMin=q;c.yMin=m;c.yMax=A},_configureTooltext:function(b,g,e){var c=b.setTooltext,a=b.formatedVal,
f=g.seriesname,d=b.label,l=b.xValue,m=b.pointLabel,A=g.tooltipSepChar;void 0!==c?b=Ba(c,[3,4,5,6,8,9,10,11],{yaxisName:Z(e.yaxisname),xaxisName:Z(e.xaxisname),yDataValue:a,xDataValue:l,label:d},b,e,g):void 0!==m?b=d:null===a?b=!1:(g.seriesNameInToolTip&&(f=la(g.seriesname)),b=f?f+A:y,b+=l?l+A:y,b+=a);return b},updatePointConfig:function(b,g){var e=this.chart,c=this.config,a=(this.components.data[g]||{}).config,f=e.components.numberFormatter,e=e.jsonData.chart,s=c.yMin||Infinity,l=c.yMax||-Infinity,
m=c.xMax||-Infinity,A=c.xMin||Infinity;void 0!==a&&(a.y=f.getCleanValue(d(b.y)),a.x=f.getCleanValue(d(b.x)),a._options.x=a.x,a._options.y=a.y,N(l,a.y),E(s,a.y),N(m,a.x),E(A,a.x),s=f.xAxis(a.x),a.formatedVal=null===a.y?a.y:f.dataLabels(a.y),a.xValue=s,a.toolText=c.showTooltip?this._configureTooltext(a,c,e):!1,a.update=b.update)},pointHoverOptions:function(b,g,e){var c=a(b.showhovereffect,this.showhovereffect,g.plothovereffect,g.showhovereffect),h={},f=!!d(b.hovercolor,this.hovercolor,g.plotfillhovercolor,
b.hoveralpha,this.hoveralpha,g.plotfillhoveralpha,b.borderhovercolor,this.borderhovercolor,g.plotborderhovercolor,b.borderhoveralpha,this.borderhoveralpha,g.plotborderhoveralpha,b.borderhoverthickness,this.borderhoverthickness,g.plotborderhoverthickness,b.hoverheight,this.hoverheight,g.plothoverheight,b.hoverwidth,this.hoverwidth,g.plothoverwidth,b.hoverradius,this.hoverradius,g.plothoverradius,c),s=!1;if(void 0===c&&f||c)s=!0,c=d(b.hovercolor,this.hovercolor,g.plotfillhovercolor,ob(e.color,70)),
f=d(b.hoveralpha,this.hoveralpha,g.plotfillhoveralpha,e.alpha),h={stroke:ea(d(b.borderhovercolor,this.borderhovercolor,g.plotborderhovercolor,e.borderColor),a(b.borderhoveralpha,this.borderhoveralpha,g.plotborderhoveralpha,f,e.borderAlpha)),"stroke-width":a(b.borderhoverthickness,this.borderhoverthickness,g.plotborderhoverthickness,e.borderThickness),height:a(b.hoverheight,this.hoverheight,g.plothoverheight,e.height),width:a(b.hoverwidth,this.hoverwidth,g.plothoverwidth,e.width),r:a(b.hoverradius,
this.hoverradius,g.plothoverradius,e.radius)},b=e.use3D?this.getPointColor(Ha(d(b.hovercolor,this.hovercolor,g.plotfillhovercolor,ob(e.color,70))),d(b.hoveralpha,this.hoveralpha,g.plotfillhoveralpha,e.alpha),e.shapeType):ea(c,f),h.fill=x(b);return{enabled:s,rollOverAttrs:h}},getJSONData:function(){var b=this.components.data,g=b.length,e=[],c,a;for(a=0;a<g;a++)c=b[a],!c.removed&&c.config._options&&(delete c.config._options.update,delete c.config._options.add,e.push(c.config._options));return e},getPointColor:function(b,
g,e){var c;b=Ha(b);g=Za(g);c=ob(b,80);b=nc(b,65);g={FCcolor:{gradientUnits:"objectBoundingBox",color:c+","+b,alpha:g+","+g,ratio:r}};e?g.FCcolor.angle=1===e?0:180:(g.FCcolor.cx=.4,g.FCcolor.cy=.4,g.FCcolor.r="50%",g.FCcolor.radialGradient=!0);return g},init:function(b){this.yAxis=this.chart.components.yAxis[0];this.components={};this.graphics={};this.JSONData=b;this.plotType="dragnode";this.configure()},_addLegend:function(){var b=this.config,g=this.chart.components.legend,b={enabled:b.includeInLegend,
type:this.type,fillColor:x({color:b.color,alpha:b.alpha}),strokeColor:x({color:b.plotBorderColor,alpha:"100"}),anchorSide:4,strokeWidth:b.anchorBorderThickness,label:la(this.JSONData.seriesname)};this.legendItemId=g.addItems(this,this.legendInteractivity,b)},draw:function(){var b=this.graphics,g=this.chart,e=g.linkedItems.smartLabel,c=this.components.data,a=this.components.removeDataArr||[],f=a.length,d=g.components.paper,l,m=g.config.dataLabelStyle||{color:"#000000"},A;l=g.graphics;A=l.datasetGroup;
var B=l.trackerGroup;l=b.group=b.group||d.group(A);A=b.dragLabelGroup=b.dragLabelGroup||d.group("dragLabelGroup",A);b.trackerContainer=b.trackerContainer||d.group("tracker",B);e.useEllipsesOnOverflow(g.config.useEllipsesWhenOverflow);e.setStyle(m);g=0;for(e=c.length;g<e;g+=1)d=c[g].removed,!d&&this._drawNode(g);this.drawn=!0;this.visible&&(l.show(),A.show(),b.trackerContainer.show());for(g=0;g<f;g++)this._removeDataVisuals(a.shift())},_drawNode:function(b){var g=this.chart,e=g.components,c=this.groupManager,
h=c.nodes,f=g.config,s=e.paper,l=this.xAxis=e.xAxis[0],m=this.yAxis=e.yAxis[0],e=this.components.data[b],A=e.config,B=this.config,q=g.get("config","animationObj")||{},P=q.duration,k=q.dummyObj,q=q.animObj,p=g.linkedItems.smartLabel,n=f.dataLabelStyle||{color:"#000000"},t={fontFamily:n.fontFamily,fontSize:n.fontSize,lineHeight:n.lineHeight,fontWeight:n.fontWeight,fontStyle:n.fontStyle},r=e.graphics||(e.graphics={}),v=A.symbol,z,X,C,w,E,D,F,H,J,R=B.colorObj.lineColor,N=B.datasetPlotBorderThickness,
Q;w=this.graphics;var S=!c.animationDone,U=function(){g._animCallBack()};J=g.graphics.datasetGroup;var I=w.group,L=e.config.rollOverProperties,Y,K,T,aa,G=this.components.pool||{},M;z=r.graphic;var W=r.cloneGraphic,O=r.cloneText,ha=r.cloneImage,$=r.image,ka,Z=r.label;w.cloneGraphicGroup=w.cloneGraphicGroup||s.group("clone",J);A._yPos=m=m.getAxisPosition(A.y);A._xPos=l=l.getAxisPosition(A.x);if(void 0!==m&&!isNaN(m)){A.shapeArg={};A.startConnectors=[];A.endConnectors=[];D=A.shapeArg;X=a(A.height);z=
a(A.width);C=a(A.radius);v="rectangle"===v;w=A.id;E=A.imageNode;F=A.imageURL;H=A.imageAlign;J=A.labelAlign;Q=v?z:1.4*C;Y=a(A.imageWidth,Q);C=v?X:1.4*C;K=a(A.imageHeight,C);aa=x(A.fillColor);T={fill:aa,"stroke-width":N,stroke:x(R)};v=D.symbol=d(A.symbol,B.symbol,y);v=v.split("_");M=[v[1],l,m,A.radius,A.startAngle,0];"poly"===v[0]||"circle"===v[0]?(A.shapeType=v[0],ka="polypath",B="path",M={polypath:M},D.x=l,D.y=m,D.radius=A.radius,D.sides=v[1]):(A.shapeType=Cb,B=ka="rect",D.x=l-z/2,D.y=m-X/2,D.r=0,
D.width=z,D.height=X,M={x:D.x,y:D.y,width:z,height:X,r:0},T.width=z,T.height=X,T.x=l-z/2,T.y=m-X/2,L&&L.enabled&&(L=L.rollOverAttrs,L.x=l-L.width/2,L.y=m-L.height/2,delete L.r));L=(z=r.element)&&z.type;-1===ka.indexOf(L)&&z&&(z.remove(),z=r.element=null,Z&&Z.remove(),$&&$.remove(),delete r.label,delete r.image,Z=$=null);z||(G.element&&G.element[B]&&G.element[B].length?(z=r.element=G.element[B].shift(),z.toFront()):(z=r.element=s[ka](I),z.attr(M)));z.show().animateWith(k,q,M,P,S&&U);z.attr({fill:aa,
"stroke-width":N,stroke:x(R)});c.animationDone=!0;W&&(W.transform(u),W.attr(M));if(E&&F){K>C&&(K=C);Y>Q&&(Y=Q);switch(H){case "middle":c=m-K/2;break;case "bottom":c=C>K?m+C/2-K:m-K/2;break;default:c=C>K?m-.5*C:m-K/2}A.imageX=l-Y/2;A.imageY=c;A.imageWidth=Y;A.imageHeight=K;B="image";$||(G.image&&G.image[B]&&G.image[B].length?($=r.image=G.image[B].shift(),$.toFront()):$=r.image=s.image(I));$.show().attr({src:F,x:A.imageX,y:c,width:Y,height:K});ha&&(ha.transform(u),ha.attr({src:F,x:A.imageX,y:c,width:Y,
height:K}))}A.pointAttr=T;this._drawTracker(e,b);b=A.displayValue;if(ba(b)||b!==y){B="text";p.useEllipsesOnOverflow(f.useEllipsesWhenOverflow);f=p.getSmartText(b,Q,C);b=.5*C-.5*f.height;switch(J){case "top":b=-b;break;case "bottom":break;default:b=0}e._yAdjustment=b;b=m+b;Z||(G.label&&G.label[B]&&G.label[B].length?(Z=r.label=G.label[B].shift(),Z.toFront()):(Z=r.label=s.text(I),Z.attr({x:l,y:b})));Z.show().animateWith(k,q,{x:l,y:b},P,"normal");Z.attr({text:f.text,title:f.tooltext||u,fill:n.color,"text-bound":[n.backgroundColor,
n.borderColor,n.borderThickness,n.borderPadding,n.borderRadius,n.borderDash]}).css(t);O&&(O.transform(u),O.attr({x:l,y:b,text:f.text,title:f.tooltext||u,fill:n.color,"text-bound":[n.backgroundColor,n.borderColor,n.borderThickness,n.borderPadding,n.borderRadius,n.borderDash]}))}h[w]=e}},_removeDataVisuals:function(b){var g=this.components.pool||(this.components.pool={}),e,c,a,f;if(b)for(c in b=b.graphics,b)e=g[c]||(g[c]={}),a=(f=b[c])&&f.type,e=e[a]||(e[a]=[]),f.hide&&"function"===typeof f.hide&&(f.attr({"text-bound":[]}),
f.hide(),f.transform&&f.transform(u)),e.push(b[c])},show:function(){var b=this.graphics,g=this.graphics.trackerContainer,e=b.dragLabelGroup;b.group.show();e.show();g.show();this.visible=!0},hide:function(){var b=this.graphics,g=this.graphics.trackerContainer,e=b.dragLabelGroup;b.group.hide();g.hide();e.hide();this.visible=!1},_drawTracker:function(b,g){var e=this,c=e.chart,a=b.config,f=a.shapeArg,s=f.width,l=f.height,m=f.x,A=f.y,B=a.pointAttr,q=a.shapeType,P=f.sides,k=f.radius,f=b.graphics.trackerElement,
n=b.graphics.cloneGraphic,t=e.graphics.trackerContainer,r=a.rollOverProperties,v={},x=c.components.paper,z=b.graphics.cloneImage,X=b.graphics.cloneText,C=function(b,g){return function(e){var a=this.data("hoverAttr");g&&b.graphics.element.attr(a);za.call(this,c,e,"DataPlotRollOver")}},w=function(b,g){return function(e){var a=this.data("unHoverAttr");g&&b.graphics.element.attr(a);za.call(this,c,e,"DataPlotRollOut")}},y=f&&f.data("type"),E=a.toolText,D=a.link?"pointer":a.allowDrag?"move":u;v.fill=p;
v.stroke=p;v.cursor=D;v.ishot=!0;y!=={circle:"path",rect:"rect",poly:"path"}[q]&&f&&(f.remove(),f=b.graphics.trackerElement=null);f?(q!==Cb?f.attr({polypath:[P||2,m,A,k,a.startAngle,0]}).attr(v):f.attr({x:m,y:A,width:s,height:l}).attr(v),f.tooltip(E)):(q!==Cb?(f=b.graphics.trackerElement=x.polypath(P||2,m,A,k,a.startAngle,0,t),f.data("type","path")):(f=b.graphics.trackerElement=x.rect(m,A,s,l,0,t),f.data("type","rect")),n&&(n.remove(),delete b.graphics.cloneGraphic),z&&(z.remove(),delete b.graphics.cloneImage),
X&&(X.remove(),delete b.graphics.cloneText),f.attr(v).tooltip(E),f.hover(C(b,r&&r.enabled),w(b,r&&r.enabled)),f.data("drag-options",{dataObj:b,dataset:e,endConnectors:a.endConnectors,startConnectors:a.startConnectors,boundaryTop:c.config.canvasTop,boundaryBottom:c.config.canvasTop+c.canvasHeight,boundaryLeft:c.config.canvasLeft,boundaryRight:c.config.canvasLeft+c.config.canvasWidth,datasetIndex:e.index,pointIndex:b.config.index,cursor:D,chart:c,link:b.link}),f.drag(function(b,g,a,f){e._dragMove.call(this,
b,g,a,f,c)},function(b){e._dragStart.call(this,b,c)},function(b){e._dragUp.call(this,b)}));a={index:g,link:a.link,y:a.y,x:a.x,shape:d(q,"rect"),width:s,height:l,radius:k,sides:a.numSides,label:a.displayValue,toolText:a.toolText,id:a.id,datasetIndex:e.index,datasetName:e.JSONData.seriesname,sourceType:"dataplot"};f.data("eventArgs",a);f.data("hoverAttr",r&&r.rollOverAttrs);f.data("unHoverAttr",B)},_dragStart:function(b,g){var e=this,c=e.data("drag-options"),a=e.getBBox(),f=c.dataObj,d=f.config,l=c.dataset,
m=l.groupManager,A=m.graphics,B=A.waitElement,q=c.dataset.config,c=q.viewMode;qb&&cb(b);var k=g.components.paper,n=l.graphics.trackerContainer,p=d.dragStart||(d.dragStart={}),u=f.graphics.cloneGraphic,r=l.graphics.cloneGraphicGroup,t=f.graphics.cloneText,v=f.graphics.image,z=f.graphics.cloneImage,w=f.graphics.label,C={circle:"circ",rectangle:"rect",polygon:"poly"};Fa&&(e._.dirty=1);d.symbol.split("_");d.allowDrag&&(!u&&f.graphics.element&&(u=f.graphics.cloneGraphic=f.graphics.element.clone(),r.appendChild(u)),
w&&!t&&(t=f.graphics.cloneText=f.graphics.label.clone(),t.followers[0]&&t.followers[0].el&&r.appendChild(t.followers[0].el),r.appendChild(t)),v&&!z&&(z=f.graphics.cloneImage=f.graphics.image.clone(),r.appendChild(z)),r.attr({opacity:.3}),u.show());p.xPos=d._xPos;p.yPos=d._yPos;p.x=d.x;p.y=d.y;p.bBox=a;p.origX=p.lastDx||(p.lastDx=0);p.origY=p.lastDy||(p.lastDy=0);e.data("fire_click_event",1);e.data("mousedown",1);clearTimeout(e._longpressactive);e.data("move",!0);c||(B||(B=A.waitElement=k.ringpath(d._xPos,
d._yPos,8,11,0,0,n).attr({fill:x({alpha:"100,100",angle:120,color:"CCCCCC,FFFFFF",ratio:"30,50"}),"stroke-width":0})),B.attr({ringpath:[d._xPos,d._yPos,8,11,0,0]}).show().animate({ringpath:[d._xPos,d._yPos,8,11,0,6.28]},1E3),e._longpressactive=setTimeout(function(){var b=q.name!==y&&void 0!==q.name?q.name+Xb+" ":y,c=q.id;A.waitElement&&A.waitElement.hide();e.data("fire_click_event",0);m.showNodeUpdateUI(g,{x:{value:d.x},y:{value:d.y},draggable:{value:la(d.allowdrag,1)},color:{value:d.color},alpha:{value:d.alpha},
label:{value:la(d.label,d.name)},tooltip:{value:d.toolText},shape:{value:C[d.shape]},rectWidth:{value:d.width},rectHeight:{value:d.height},circPolyRadius:{value:d.radius},polySides:{value:d.numsides},image:{value:d.imageNode},imgWidth:{value:d.imageWidth},imgHeight:{value:d.imageHeight},imgAlign:{value:d.imageAlign},imgUrl:{value:d.imageURL},id:{value:d.id,disabled:!0},link:{value:d.link},dataset:{innerHTML:'<option value="'+c+'">'+b+c+"</option>",disabled:!0},datasetIndex:l.index},!0)},1E3));u&&
u.show();t&&t.show();z&&z.show();r&&r.show()},_dragMove:function(b,g,e,c,a){var f=this.data("drag-options"),d=f.dataObj;e=d.graphics.cloneGraphic;c=d.graphics.cloneImage;var l=d.graphics.cloneText,d=d.config,m=d.dragStart,A=m.bBox.x+b,B=m.bBox.x2+b,q=m.bBox.y+g,k=m.bBox.y2+g,n=f.dataset.groupManager.graphics,p=a.config.canvasLeft,u=a.config.canvasRight,t=a.config.canvasTop;a=a.config.canvasBottom;A<p&&(b+=p-A);B>u&&(b-=B-u);q<t&&(g+=t-q);k>a&&(g-=k-a);if(b||g)n.waitElement&&n.waitElement.hide(),this.data("fire_click_event",
0),Sb.call(this);d.allowDrag&&(m.draged=!0,m.lastDx=b,m.lastDy=g,a=f._transformObj={transform:"t"+(m.origX+b)+","+(m.origY+g)},e&&e.attr(a),c&&c.attr(a),l&&l.attr({x:d._xPos+b,y:d._yPos+g}))},removeData:function(b,g){var e=this.components,c=this.groupManager,a=e.data,f=e.removeDataArr||(e.removeDataArr=[]);b=b||0;0>b&&(b=0);e.removeDataArr=f.concat(a.splice(b,g||1));c._clearConnectors()},_dragUp:function(b){var g=this.data("drag-options"),e=g.dataset,c=e.chart,a=e.components.data,f=g.dataObj,g=g.dataset.groupManager,
d=e.graphics.cloneGraphicGroup,l=this.data("fire_click_event"),m=f.config,A=c.config.canvasTop,B=c.config.canvasLeft,q=f.config.dragStart||{},k=e.yAxis,n=f.graphics.cloneText,p=e.groupManager.graphics,u=c.components.xAxis[0],t={};p.waitElement&&p.waitElement.hide();Sb.call(this);this.data("mousedown",0);l&&za.call(this,c,b);if(q.draged){q.origX+=q.lastDx;q.origY+=q.lastDy;f.config._xPos=q.xPos+q.lastDx;f.config._yPos=q.yPos+q.lastDy;t.x=u.getValue(f.config._xPos-B);t.y=k.getValue(f.config._yPos-A);
t.update=!0;l=0;for(B=a.length;l<B&&(A=a[l],f.config.id!==A.config.id);l++);e.updatePointConfig(t,l);e=this.data("eventArgs");e.x=t.x;e.y=t.y;b=Rb(c.linkedItems.container,b);b.sourceEvent="dataplotdragend";n.attr({"text-bound":[]});v.raiseEvent("chartupdated",W(b,e),c.chartInstance);g.draw();q.draged=!1}d&&d.hide();delete m.dragStart},getDataLimits:function(){var b=this.config;return{max:b.yMax,min:b.yMin,xMax:b.xMax,xMin:b.xMin}}},"Area"]);FusionCharts.register("component",["dataset","Connector",
{type:"connector",configure:function(){var b=this.chart.jsonData.chart,g=this.config,e=this.components.data||(this.components.data=[]),c=this.JSONData,h=c.connector,f=h&&h.length,s=v.parseUnsafeString;g.connectorsTooltext=F(s(d(c.connectortooltext,b.connectortooltext)));g.stdThickness=a(c.stdthickness,1);g.conColor=Ha(d(c.color,"FF5904"));g.conAlpha=d(c.alpha,"100");g.conDashGap=a(c.dashgap,5);g.conDashLen=a(c.dashlen,5);g.conDashed=Boolean(a(c.dashed,0));g.arrowAtStart=Boolean(a(c.arrowatstart,1));
g.arrowAtEnd=Boolean(a(c.arrowatend,1));g.conStrength=a(c.strength,1);g.toolTipSepChar=d(b.tooltipsepchar," - ");g.showTooltip=a(b.showtooltip,1);g.viewMode=a(b.viewmode,1);b=e.length;b>f&&e.splice(f,b-f);g._refreshData=!0;for(e=0;e<f;e+=1)this._setConfigure(e,h[e]);g._refreshData=!0},_setConfigure:function(b,g){var e=this.components.data,e=e[b]||(e[b]=e[b]={}),c=this.config,h=this.chart,f=Z(d(g.label,g.name)),s=d(g.alpha,c.conAlpha),l=h.linkedItems.smartLabel,m="$fromLabel"+c.toolTipSepChar+"$toLabel",
s={FCcolor:{color:Ha(d(g.color,c.conColor)),alpha:s}},A=F(Z(d(g.tooltext,c.connectorsTooltext)));l.useEllipsesOnOverflow(h.config.useEllipsesWhenOverflow);h=l.getOriSize(f);e.config=e.config||(e.config={});!e.graphics&&(e.graphics={});m=c.showTooltip?d(A,f?"$label":m):!1;f=e.config={_options:g,id:d(g.id,b).toString(),from:d(g.from,y),to:d(g.to,y),label:f,toolText:m,customToolText:A,color:s,index:b,dashStyle:Boolean(a(g.dashed,c.conDashed))?ua(a(g.dashlen,c.conDashLen),a(g.dashgap,c.conDashGap),c.stdThickness):
"none",dashed:g.dashed,dashlen:g.dashlen,dashgap:g.dashgap,arrowAtStart:Boolean(a(g.arrowatstart,c.arrowAtStart)),arrowAtEnd:Boolean(a(g.arrowatend,c.arrowAtEnd)),conStrength:a(g.strength,c.conStrength),link:g.link,stdThickness:c.stdThickness,labelWidth:h.widht,labelHeight:h.height};f.add=g.add;f.update=g.update;c._refreshData&&delete e.removed},init:function(b){this.yAxis=this.chart.components.yAxis[0];this.components={};this.graphics={};this.JSONData=b;this.configure()},draw:function(){var b=this,
g=b.chart,e=b.groupManager,c=b.config,h=b.chart.components,f=e.nodes,s=b.components.data,l,m,A,B,q,k={},n=h.paper,p=g.graphics.datasetGroup;m=f[m];var t=f[A],h=h.numberFormatter,r,v,w,z,X,C,y=g.config.dataLabelStyle,E,D=function(){var f=this,h=f.data("config"),d=h||{};f._longpressactive=clearTimeout(f._longpressactive);f.data("fire_click_event",1);f._longpressactive=setTimeout(function(){f.data("fire_click_event",0);f.data("viewMode")||e.showConnectorUpdateUI(g,{fromid:{val:d.from,innerHTML:"<option>"+
d.from+"</option>",disabled:!0},toid:{val:d.to,innerHTML:"<option>"+d.to+"</option>",disabled:!0},datasetIndex:b.index,index:h.index,arratstart:{val:Boolean(a(d.arrowatstart,1))},arratend:{val:Boolean(a(d.arrowatend,1))},dashed:{val:a(d.dashed)},dashgap:{val:d.dashgap},dashlen:{val:d.dashlen},label:{val:d.label},tooltext:{val:d.tooltext},id:{val:c.id,disabled:!0},strength:{val:d.conStrength},alpha:{val:d.alpha},color:{val:d.color.FCcolor.color}},!0)},1E3)},F=function(){this.data("fire_click_event",
0);Sb.call(this)},H=function(b){Sb.call(this);za.call(this,g,b,"ConnectorClick")},J=function(b){za.call(this,g,b,"ConnectorRollover")},R=function(b){za.call(this,g,b,"ConnectorRollout")},N=s.length,Q=b.components.removeDataArr||[],S=Q.length,U,I,L=b.components.pool||{},Y=g.get("config","animationObj"),K=Y.duration,T=Y.dummyObj,Y=Y.animObj,aa;aa||(aa=b.graphics.connectorGroup=b.graphics.connectorGroup||n.group("connectorGroup").insertBefore(p));c.showTooltip&&aa.trackTooltip(!0);for(E=0;E<N;E++)l=
s[E],l.removed||(U=l.config,p=l.graphics||(l.graphics={}),m=U.from,A=U.to,r=U.toolText,m=f[m],t=f[A],m&&t&&!0!==U.deleted&&(U.fromPointObj=m,U.toPointObj=t,r=m.config,I=t.config,U.fromX=v=r._xPos,U.fromY=w=r._yPos,U.toX=z=I._xPos,U.toY=X=I._yPos,U.strokeWidth=B=U.conStrength*U.stdThickness,q=U.color,U.textBgColor=A=q&&q.FCcolor&&q.FCcolor.color,C=k.label=U.label,k.arrowAtStart=U.arrowAtStart,k.arrowAtEnd=U.arrowAtEnd,k.link=U.link,k.id=U.id,k.fromNodeId=r.id,k.toNodeId=I.id,r=U.toolText=Ba(U.toolText,
[3,83,84,85,86,87,88,89,90,91,92],{label:U.label,fromXValue:h.dataLabels(m.config.x),fromYValue:h.dataLabels(m.config.y),fromXDataValue:m.config.x,fromYDataValue:m.config.y,fromLabel:d(m.config.displayValue,m.config.id),toXValue:h.dataLabels(t.config.x),toYValue:h.dataLabels(t.config.y),toXDataValue:t.config.x,toYDataValue:t.config.y,toLabel:d(t.config.displayValue,t.config.id)}),m.config&&m.config.startConnectors&&m.config.startConnectors.push(l),t.config&&t.config.endConnectors&&t.config.endConnectors.push(l),
m=this._getlinePath(l),l=p.graphic,p.graphic||(L.graphic&&L.graphic.path&&L.graphic.path.length?l=p.graphic=L.graphic.path.shift():(l=p.graphic=n.path(aa).mousedown(D).mousemove(F).mouseup(H).hover(J,R),l.attr({path:m}))),l.show().animateWith(T,Y,{path:m},K,"normal"),l.attr({"stroke-width":B,ishot:!0,"stroke-dasharray":U.dashStyle,cursor:U.link?"pointer":u,stroke:x(q)}).data("eventArgs",k).data("viewMode",c.viewMode).data("config",U).tooltip(r),m=p.text,C?(p.text||(L.text&&L.text.length?p.text=m=
L.text.shift():(p.text=m=n.text(aa).mousedown(D).mousemove(F).mouseup(H).hover(J,R),m.attr({x:(v+z)/2,y:(w+X)/2}))),m.show().css(y).animateWith(T,Y,{x:(v+z)/2,y:(w+X)/2},K,"normal"),m.attr({text:C,fill:y.color,ishot:!0,direction:u,cursor:U.link?"pointer":u,"text-bound":[d(y.backgroundColor,A),d(y.borderColor,A),1,"2"]}).data("eventArgs",k).data("viewMode",c.viewMode).data("config",U).tooltip(r)):m&&m.hide().attr({"text-bound":[]})));b.drawn=!0;for(E=0;E<S;E++)b._removeDataVisuals(Q.shift())},getJSONData:function(){var b=
this.components.data,g=b.length,e=[],c,a;for(a=0;a<g;a++)c=b[a],c.removed||(c.config._options&&(delete c.config._options.update,delete c.config._options.add),e.push(c.config._options));return e},_updateFromPos:function(b,g){this.fromX=b;this.fromY=g;this.graphic&&this.graphic.animate({path:this.getlinePath()});this.text&&this.text.animate({x:(this.fromX+this.toX)/2,y:(this.fromY+this.toY)/2})},_updateToPos:function(b,g){this.toX=b;this.toY=g;this.graphic&&this.graphic.animate({path:this.getlinePath()});
this.text&&this.text.animate({x:(this.fromX+this.toX)/2,y:(this.fromY+this.toY)/2})},_getlinePath:function(b){b=b.config;var g=b.fromPointObj,a=b.toPointObj,c=b.fromX,h=b.fromY,f=b.toX,d=b.toY,l=["M",c,h];b.arrowAtStart&&(g=g.config,l=g.shapeType===Cb?l.concat(this._drawArrow(c,h,f,d,g.shapeArg.width,g.shapeArg.height)):l.concat(this._drawArrow(c,h,f,d,g.shapeArg.radius)));b.arrowAtEnd&&(g=a.config,l=g.shapeType===Cb?l.concat(this._drawArrow(f,d,c,h,g.shapeArg.width,g.shapeArg.height)):l.concat(this._drawArrow(f,
d,c,h,g.shapeArg.radius)));l.push("L",f,d);return l},_drawArrow:function(b,g,a,c,h,f){var d=t.atan((g-c)/(b-a)),l=[];0>d&&(d=2*t.PI+d);if(c>g){if(a>=b&&d>t.PI||a<b&&d>t.PI)d-=t.PI}else if(a>=b&&d<t.PI&&0!==d||a<b&&d<t.PI)d+=t.PI;"undefined"==typeof f?(a=b+h*da(d),h=g+h*T(d)):(h=Ca(h)/2,f=Ca(f)/2,a=b+(h=b<a?h:-h),h=g+h*t.tan(d),Ca(g-h)>Ca(f)&&(h=g+(f=g<c?f:-f),a=b+f/t.tan(d)));l.push("L",a,h,a+10*da(d+.79),h+10*T(d+.79),"M",a+10*da(d-.79),h+10*T(d-.79),"L",a,h);return l},removeData:function(b,g){var a=
this.components,c=a.data;0>b&&(b=0);a.removeDataArr=c.splice(b,g)}},"Dragnode"]);FusionCharts.register("component",["dataset","DragableLabels",{configure:function(){var b=(this.JSONData||[]).length,g,e=this.components.data;this.config.viewMode=a(this.chart.jsonData.chart.viewmode,0);e||(e=this.components.data=[]);g=e.length;g>b&&e.splice(b,g-b);for(g=0;g<b;g++)this._setConfigure(g)},_setConfigure:function(b,g){var e=this.JSONData,e=g?g:e[b],c=this.components.data,h,f=this.chart.config.style.inCanvasStyle,
s=f.fontSize,l;h=c[b];!h&&(h=c[b]={});!h.graphics&&(h.graphics={});c=h.config=h.config||(h.config={});h=Z(d(e.text,e.label));c._options=e;c.add=e.add;h&&(c.text=h,c.x=e.x||0,c.y=e.y||0,c.labelFontSize=l=a(e.fontsize,s),c.labelColor=h=d(e.color,f.color),c.alpha=s=a(e.alpha,100)/100,c.allowdrag=a(e.allowdrag,1),c.padding=a(e.padding,5),c.labelStyle=f={fontSize:l+"px",fontFamily:f.fontFamily,fill:h,color:h,opacity:s},c.labelBGColor=h=d(e.bgcolor&&e.bgcolor.replace($,na)),c.labelBDColor=l=d(e.bordercolor&&
e.bordercolor.replace($,na)),c.link=e.link,c.allowDrag=a(e.allowdrag,1),h&&(f.backgroundOpacity=s),c.borderThickness=e.borderthickness,c.dashLen=e.dashlen,c.dashGap=e.dashgap,c.dashed=e.dashed,c.radius=e.radius,l&&(f.borderOpacity=s))},init:function(b){this.yAxis=this.chart.components.yAxis[0];this.components={};this.graphics={};this.JSONData=b;this.configure()},getJSONData:function(){var b=this.components.data,g=b.length,a=[],c,h;for(h=0;h<g;h++)c=b[h],c.removed||c.config._options&&a.push(c.config._options);
return a},draw:function(){var b=this.components.data,g=this.chart,e=g.get("config","animationObj"),c=e.duration,h=e.dummyObj,e=e.animObj,f=g.components.paper,d=g.components.yAxis[0],l=g.components.xAxis[0],m=g.linkedItems.smartLabel,A=g.graphics.datalabelsGroup,B=g.graphics.trackerGroup,q=g.config.dataLabelStyle,k,p,n,t,r,v,x,z,w,C,y,E,D,F,H,J=b.length,R=this.components.removeDataArr||[],N=R.length,Q=this.components.pool||{},S,A=this.graphics.dataLabelContainer=this.graphics.dataLabelContainer||f.group("datalabels",
A);this.graphics.trackerContainer=this.graphics.trackerContainer||f.group("tracker",B);for(S=0;S<J;S++)C=b[S],C.removed||(w=C.config,!C.graphics&&(C.graphics={}),w.index=S,B=l.getPixel(w.x),t=d.getPixel(w.y),r=w.text,v=w.labelBGColor,x=w.labelBDColor,z=w.padding,y=w.allowDrag,E=w.labelFontSize,D=w.labelStyle,F=w.radius,n=w.dashed,k=w.dashLen,p=w.dashGap,H=w.borderThickness,k={text:r,"class":"fusioncharts-label",align:"center","text-bound":[v||u,x||u,a(H,1),z,a(F,0),a(n,0)?ua(a(k,5),a(p,4),a(H,1)):
"none"],"font-size":E,"font-weight":q.fontWeight,"font-style":q.fontStyle,"font-family":q.fontFamily,visibility:"visible"},v={backgroundColor:v,borderColor:x,borderPadding:z,fontSize:E+"px",fontStyle:q.fontStyle,fontWeight:q.fontWeight,borderRadius:0,borderDash:"none",fontFamily:q.fontFamily},ec(v),m.useEllipsesOnOverflow(g.config.useEllipsesWhenOverflow),m.setStyle(v),v={link:w.link,text:r,x:B,y:t,allowdrag:y,sourceType:"labelnode"},y=C.graphics.element,y||(Q.element&&Q.element.length?y=C.graphics.element=
Q.element.shift():(y=C.graphics.element=f.text(A),y.attr({x:B,y:t}))),y.animateWith(h,e,{x:B,y:t},c,"normal"),y.css(D).attr(k),y.data("eventArgs",v),r=m.getOriSize(r),w.width=r.width,w.height=r.height,w.xPos=B,w.yPos=t,this.drawTracker(y,S));for(S=0;S<N;S++)this._removeDataVisuals(R.shift())},removeData:function(b,g){var a=this.components;a.removeDataArr=a.data.splice(b,g)},drawTracker:function(b,g){var a=this,c=a.chart,h=c.components.paper,f=a.groupManager,d=a.config,l=a.graphics.trackerContainer,
m=a.components.data[g],A=m.config,B=A.padding||0,q=A.width,k=A.height,n=A.xPos-q/2,t=A.yPos-k/2,r=m.graphics.trackerElement,B={x:n-B,y:t-B,width:q+2*B,height:k+2*B,cursor:A.allowDrag?"move":u,fill:p,stroke:p,ishot:!0},q=function(b){var c=this;c.data("fire_click_event",1);clearTimeout(c._longpressactive);c._longpressactive=setTimeout(function(){c.data("fire_click_event",0);c.data("viewMode")||f.showLabelDeleteUI(b)},1E3)},k=function(){this.data("fire_click_event")&&(this.data("fire_click_event",0),
f.clearLongPress.call(this))},v=function(b){var g=this.data("fire_click_event");f.clearLongPress.call(this);g&&za.call(this,c,b,"LabelClick")},x=function(b){za.call(this,c,b,"LabelRollover")},w=function(b){za.call(this,c,b,"LabelRollout")},A={link:A.link,text:A.text,x:n,y:t,allowdrag:A.allowDrag,sourceType:"labelnode"};r||(r=m.graphics.trackerElement=h.rect(l).mousedown(q).mousemove(k).mouseup(v).data("viewMode",d.viewMode).data("eventArgs",A).hover(x,w).drag(function(b,g,f,h,d){a._labelDragMove.call(this,
b,g,f,h,c,d)},function(b){a._labelDragStart.call(this,b,c)},function(b){a._labelDragUp.call(this,b)}));r.attr(B);r.data("drag-options",{index:g,dataset:a})},_labelDragStart:function(){var b=this,g=b.getBBox(),a=b.data("drag-options"),c=a.dataset,h=c.groupManager,f=c.components.data[a.index],c=f.graphics.element,d=f.dragStart=f.dragStart||(f.dragStart={});a.ox=c.attr("x");a.oy=c.attr("y");a.bBox=g;d.xPos=f.config.xPos;d.yPos=f.config.yPos;d.bBox=g;b.data("fire_click_event",1);b.data("fire_dragend",
0);clearTimeout(b._longpressactive);b._longpressactive=setTimeout(function(){b.data("fire_click_event",0);b.data("viewMode")||h.showLabelDeleteUI(f)},1E3)},_labelDragMove:function(b,g,a,c,d,f){c=d.config;a=c.canvasLeft;var s=c.canvasRight,l=c.canvasBottom;c=c.canvasTop;var m=this.data("drag-options"),A=m.dataset,B=A.groupManager,A=A.components.data[m.index],q=A.graphics.element,k=A.dragStart,n=k.bBox,p=k.bBox.x+b,u=k.bBox.x2+b,t=k.bBox.y+g,r=k.bBox.y2+g,v=d.components.yAxis[0],z=d.components.xAxis[0];
p<a&&(b+=a-p);u>s&&(b-=u-s);t<c&&(g+=c-t);r>l&&(g-=r-l);k.draged=!0;this.attr({x:n.x+b,y:n.y+g});s=m.ox+b;l=m.oy+g;q.attr({x:m.ox+b,y:m.oy+g});A.config.x=z.getValue(s-a);A.config.y=v.getValue(l-c);this.data("fire_dragend")||(za.call(this,d,f,"LabelDragStart"),this.data("fire_dragend",1));this.data("fire_click_event")&&(this.data("fire_click_event",0),B.clearLongPress.call(this))},_labelDragUp:function(b){var g=this.data("drag-options"),a=g.dataset,c=a.chart,d=a.groupManager,f=a.components.data[g.index].dragStart,
g=this.data("eventArgs"),a=a.yAxis;g.x=c.components.xAxis[0].getValue(this.attr("x"));g.y=a.getValue(this.attr("y"));f.draged=!1;this.data("fire_dragend")&&(a=Rb(c.linkedItems.container,b),a.sourceEvent="labeldragend",v.raiseEvent("chartupdated",W(a,g),c.chartInstance),za.call(this,c,b,"labeldragend"));d.clearLongPress.call(this)}},"Dragnode"]);M("dragarea",{friendlyName:"Dragable Area Chart",standaloneInit:!0,creditLabel:n,defaultDatasetType:"dragarea",decimals:2,anchorAlpha:"100",applicableDSList:{dragarea:!0}},
M.dragbase);M("dragline",{friendlyName:"Dragable Line Chart",standaloneInit:!0,creditLabel:n,decimals:2,defaultDatasetType:"dragline",applicableDSList:{dragline:!0},defaultPlotShadow:1},M.dragbase);M("dragcolumn2d",{friendlyName:"Dragable Column Chart",standaloneInit:!0,creditLabel:n,decimals:2,defaultDatasetType:"DragColumn",applicableDSList:{dragcolumn:!0}},M.dragbase);FusionCharts.register("component",["dataset","DragColumn",{configure:function(){var b,g=this.chart.jsonData.chart,e,c;c=this.JSONData;
var d=this.JSONData.data||[],f,s;this.__base__.configure.call(this);b=this.config;e=this.components.data;b.allowDrag=a(c.allowdrag,1);b.allowNegDrag=a(c.allownegativedrag,1);b.allowAxisChange=a(g.allowaxischange,1);b.snapToDivOnly=a(g.snaptodivonly,0);b.snapToDiv=b.snapToDivOnly?1:a(g.snaptodiv,1);b.doNotSnap=a(g.donotsnap,0);b.snapToDivRelaxation=a(g.snaptodivrelaxation,10);b.doNotSnap&&(b.snapToDiv=b.snapToDivOnly=0);f=e.length;for(g=0;g<f;g++)s=d[g]||{},c=e[g].config,c.allowDrag=a(s.allowdrag,
b.allowDrag),c.allowNegDrag=a(s.allownegativedrag,b.allowNegDrag)},draw:function(){var b=this.components.data.length,g;this.__base__.draw.call(this);for(g=0;g<b;g++)this.drawTracker(g)},drawTracker:function(b){var g=this.chart,a=g.components.paper,c=this.components.data[b],d=c.graphics||{},f=c._width,s=c._xPos,l=d.element,m=c._yPos+(0>c.config.setValue&&c._height)||0,A=qb?40:10,d=d&&d.dragTracker||null,B=this.components.pool||{},q=this.graphics.trackerContainer,k=c.config.setValue,n=c.config.allowDrag;
l&&null!==k&&n&&(l.getBBox(),f=["M",s,m,"L",s+f,m,"Z"],A={path:f,stroke:p,"stroke-width":A,ishot:!0,cursor:D&&"ns-resize"||"n-resize"},d||(B.dragTracker&&B.dragTracker.length?d=c.graphics.dragTracker=B.dragTracker.shift():(d=c.graphics.dragTracker=a.path(q),d.drag(this.dragMove,this.dragStart,this.dragUp))),d.attr(A).data("drag-options",{items:l,yPos:m,chart:g,name:this.JSONData.seriesname,datasetIndex:this.index,pointIndex:b,dataObj:c}),c.graphics.dragTracker=d)},dragStart:function(){var b=this.data("drag-options"),
g=b.chart,a=g.config,c=g.components.yAxis[0],g=c.config.axisRange.max,c=c.config.axisRange.min,d=this.getBBox();b.barH=b.items.getBBox().height;b.isAllPositive=0<g&&0<c;b.isAllPositiveZero=0<g&&0<=c;b.isAllNegative=0>g&&0>c;b.isAllNegativeZero=0>=g&&0>c;b.isPositiveNegative=0<g&&0>c;b.boundaryTop=a.canvasTop;b.boundaryBottom=a.canvasTop+a.canvasHeight;b.bBoxY=d.y;b.bBoxY2=d.y2||d.y+d.height;b.startValue=b.dataObj.config.setValue;b.origX=b.lastX||(b.lastX=0);b.origY=b.lastY||(b.lastY=0);b.draged=!1},
dragMove:function(b,g){var a=this.data("drag-options"),c=a.items,h=a.dataObj,f=a.chart,s=h.config,l=f.config,m=f.components,A=m.canvas.config,B=m.yAxis[0],q=m.dataset[a.datasetIndex],m=m.numberFormatter,k=B.getPixel(B.getAxisBase()),n={},p=a.bBoxY2+g,u=a.bBoxY+g,t=l.canvasBottom,r=h.config.allowNegDrag?t:k,l=l.canvasTop,v=parseFloat(q.config.plotBorderThickness)||0,A=A.showCanvasBorder,z=a.isAllNegativeZero,x=a.isPositiveNegative,C=h._xPos,w=h._width,y=h.graphics.hotElement;u<a.boundaryTop&&(g=a.boundaryTop-
a.bBoxY);p>r&&(g=r-a.bBoxY2);a.draged||(p={dataIndex:a.pointIndex+1,datasetIndex:a.datasetIndex,startValue:a.startValue,datasetName:a.name},I.raiseEvent("dataplotDragStart",p,f.chartInstance));p=a.yPos+g;p<=k?(n.y=p,n.height=k-p):(n.y=k,n.height=p-k);A&&!x&&(z?n.y-=n.y-(l-v/2):n.height=t-n.y+v);this.attr({path:["M",C,p,"L",C+w,p]});c.animate(n);y.data("draged",!0);a.shapeAttr=n;c=a.value=ga(B.getValue(p-l));s.setValue=c;B=B.getPixel(B.getAxisBase());h._yPos=E(p,B);h._height=n.height;B=m.dataLabels(c);
s.toolTipValue=B;s.displayValue=d(s.setDisplayValue,B);a.draged=!0;a.lastX=b;a.lastY=g;h.draged=!0;h.lastX=b;h.lastY=g;f=f.config.animationObj;h=f.duration;f.duration=0;q.drawLabel(a.pointIndex,a.pointIndex+1);f.duration=h},dragUp:function(){var b=this.data("drag-options"),a=b.chart,e=a.components.dataset[b.datasetIndex],c=e.config,d=!c.doNotSnap,f=b.dataObj,s=e.yAxis,l,m,A=a.config.canvasTop,B=f.config.setTooltext,q=c.snapToDivRelaxation,k=c.snapToDiv,n=f.graphics.hotElement,p=c.snapToDivOnly,c=
f.config,u=c.setValue,c=c.toolTipValue;b.draged&&(m=l=b.yPos+b.lastY,d&&k&&(m=Ca(s.getValue(l+q-A)-u),d=s.getClosestDiv(u,p?null:m),m=s.getPixel(d),f.config.setValue=d,m-l&&e.dragMove.call(this,0,m-b.yPos)),f={dataIndex:b.pointIndex+1,datasetIndex:b.datasetIndex+1,startValue:b.startValue,endValue:f.config.setValue,datasetName:b.name},s=[a.chartInstance.id,f.dataIndex,f.datasetIndex,f.datsetName,f.startValue,f.endValue],I.raiseEvent("dataplotDragEnd",f,a.chartInstance),v.raiseEvent("chartupdated",
f,a.chartInstance,s),b.yPos=m,b.lastX+=b.origX,b.lastY+=b.origY,n.data("draged",!1),n&&n.attr(b.shapeAttr).tooltip(B+c),e.setMaxMin(),a._setDataLimits())},getJSONData:function(){var b=this.JSONData.data,a=this.components.data,e=[],c={},d,f,s,l,m;m=0;for(l=b.length;m<l;m++){f=b[m];d=a[m];c={};for(s in f)c[s]="value"===s?d.config.setValue:f[s];e.push(c)}return{data:e}}},"Column"]);FusionCharts.register("component",["datasetGroup","DragColumn",{getJSONData:function(){var b=this.chart,a=b.components.dataset,
b=b.jsonData&&b.jsonData.dataset,e=[],c,d,f,s=a.length;for(f=0;f<s;f++)c=a[f],d=W({},b[f]),delete d.data,c=c.getJSONData(),e.push(W(d,c));return e}},xa]);FusionCharts.register("component",["dataset","DragArea",{configure:function(){var b,g=this.chart.jsonData.chart;b=FusionCharts.get("component",["dataset","area"]);var e,c,d;c=this.JSONData;var f=c.data||[],s;b.prototype.configure.call(this);b=this.config;e=this.components.data;b.allowDrag=a(c.allowdrag,1);b.allowNegDrag=a(c.allownegativedrag,1);
b.allowAxisChange=a(g.allowaxischange,1);b.snapToDivOnly=a(g.snaptodivonly,0);b.doNotSnap=a(g.donotsnap,0);b.snapToDiv=a(g.snaptodiv,1);b.snapToDivRelaxation=a(g.snaptodivrelaxation,10);b.doNotSnap&&(b.snapToDiv=b.snapToDivOnly=0);s=e.length;for(g=0;g<s;g++)d=f[g]||{},c=e[g].config,c.allowDrag=a(d.allowdrag,b.allowDrag),c.allowNegDrag=a(d.allownegativedrag,b.allowNegDrag)},draw:function(){var b=this.components.data,a,e=b.length,c;this.__base__.draw.call(this);for(c=0;c<e;c++)a=b[c],(a=a.config.anchorProps.imageUrl)||
this.drawTracker(c)},drawTracker:function(b){var a=this.chart,e=this.components.data,c=e[b],d=(c.graphics||{}).hotElement||null,f=this.dragStart,s=this.dragUp,l=this.dragMove,m=c.config,A=c._xPos,B=c._yPos;d&&(!m.trackerListenerBind&&m.allowDrag&&(d.drag(l,f,s),m.trackerListenerBind=!0),m.allowDrag&&d.attr({cursor:D&&"ns-resize"||"n-resize",ishot:!0,cx:A,cy:B}).data("drag-options",{items:e,yPos:B,chart:a,datasetIndex:this.index,name:this.JSONData.seriesname,pointIndex:b,dataObj:c}))},dragStart:function(){var b=
this.data("drag-options"),a=b.chart.config;b._origY=b._lastY||(b._lastY=0);b.boundaryTop=a.canvasTop;b.boundaryBottom=a.canvasTop+a.canvasHeight;b.startValue=b.dataObj.config.setValue;b.origY=this.attr("cy");b.origX=this.attr("cx");b.draged=!1},dragMove:function(b,a){var e=this.data("drag-options"),c=e.items,h=e.dataObj,f=e.chart,s=f.config.animationObj,l=f.components,m=l.dataset[e.datasetIndex],A=m.graphics.lineElement,B=l.yAxis[0],q=h._xPos,k=h.config,n=s.duration,l=l.numberFormatter,p=f.config.canvasTop,
u=c[e.pointIndex].graphics,t=B.getPixel(B.getAxisBase()),r=h.config.allowNegDrag?e.boundaryBottom:t,t=u.image,v=m.graphics.anchorGroup,z=h.config.anchorProps,x=z.imageUrl,C=u.element,w,u=h.config.showValue,y;y=e.origY+a;e.draged||(w={dataIndex:e.pointIndex+1,datasetIndex:e.datasetIndex,startValue:e.startValue,datasetName:e.name},I.raiseEvent("dataplotDragStart",w,f.chartInstance));y<e.boundaryTop&&(a=e.boundaryTop-e.origY);y>r&&(a=r-e.origY);y=e.origY+a;this.attr({cy:y});Fa&&x?t=C:(r=C.data("setRolloverAttr"),
(x=C.data("setRolloutAttr"))&&(x.polypath[2]=y),r&&(r.polypath[2]=y),C&&C.attr({polypath:[z.symbol[1]||2,q,y,z.radius,90,0]}),C.data("setRolloverAttr",r),C.data("setRolloutAttr",x));h._yPos=y;t&&m.updateImage(h,f,v);f=k.setValue=B.getValue(y-p);f=l.dataLabels(f);h.config.toolTipValue=f;k.displayValue=d(k.setDisplayValue,f);s.duration=0;u&&m.drawLabel(e.pointIndex);s.duration=n;e.draged=!0;this.data("draged",!0);e.lastY=a;e=m.getLinePath(c,{});m.config.lastPath=e;A&&A.attr({path:e.getPathArr()})},
updateImage:function(b){var a=this.chart,e=b.graphics,e=e.image||e.element,c=b.config,d=c.anchorProps,f=c.hoverEffects,c=e&&e.data("imgRef"),s=function(b){var c=b.length,a=u,g;for(g=0;g<c;g+=1)a+=" "+b[g];return a},l=d.imageScale,m=a.components.paper,A=c.height*l*.01,B=c.width*l*.01,a=b._xPos;b=b._yPos;var q=f.imageHoverScale,k=c.width*q*.01,n=c.height*q*.01,p=d.radius=d.isAnchorRadius?d.radius:E(B,A)/2,t=d.imagePadding,r=p-t-.5*d.borderThickness,t=f.radius-t-.5*f.anchorBorderThickness,p=d.symbol[1],
d=m.polypath(p||2,a,b,0<r?r:0,d.startAngle,0).attr({visibility:"hidden"}),r=s(d.attrs.path),l={x:a-c.width*l*.005,y:b-c.height*l*.005,width:B,height:A,alpha:100};Fa||(l["clip-path"]=r);d.remove();d=m.polypath(p||2,a,b,0<t?t:0,f.startAngle,f.dip);f=s(d.attrs.path);d.remove();c={x:a-c.width*q*.005,y:b-c.height*q*.005,width:k,height:n,alpha:100};Fa||(c["clip-path"]=f);e.attr(l);e.data("setRolloverAttr",c);e.data("setRolloutAttr",l)},dragUp:function(){var b=this.data("drag-options"),a=b.dataObj,e=b.chart,
c=e.components.dataset[b.datasetIndex],d=c.config,f=d.showTooltip,s=a.config.setTooltext,l=!d.doNotSnap,m=a.config.displayValue,A=e.config.canvasTop,B=c.yAxis,q=d.snapToDivRelaxation,k=d.snapToDivOnly,n=d.snapToDiv,p=a.config.setValue,t;b.draged&&(d=t=b.yPos+b.lastY,l&&n&&(d=Ca(B.getValue(t+q-A)-p),k=B.getClosestDiv(p,k?null:d),a.config.setValue=k,d=B.getPixel(k),d-t&&c.dragMove.call(this,0,d-b.yPos)),B={dataIndex:b.pointIndex+1,datasetIndex:b.datasetIndex+1,startValue:b.startValue,endValue:a.config.setValue,
datasetName:b.name},k=[e.chartInstance.id,B.dataIndex,B.datasetIndex,B.datsetName,B.startValue,B.endValue],I.raiseEvent("dataplotDragEnd",B,e.chartInstance),v.raiseEvent("chartupdated",B,e.chartInstance,k),b.yPos=d,a._yPos=d,s+=m,a.graphics.hotElement.attr({y:b.yPos}).tooltip(f?s:u),b._lastY=b.lastY+b._origY,b.lastY+=b.origY,this.data("draged",!1),c.setMaxMin(),e._setDataLimits())},getJSONData:function(){var b=this.JSONData.data,a=this.components.data,e=[],c={},d,f,s,l,m;m=0;for(l=b.length;m<l;m++){d=
b[m];f=a[m];c={};for(s in d)c[s]="value"===s?f.config.setValue:d[s];e.push(c)}return{data:e}}},"Area"]);FusionCharts.register("component",["datasetGroup","DragArea",{getJSONData:function(){var b=this.chart,a=b.components.dataset,b=b.jsonData&&b.jsonData.dataset,e=[],c,d,f,s=a.length;for(f=0;f<s;f++)c=a[f],d=W({},b[f]),delete d.data,c=c.getJSONData(),e.push(W(d,c));return e}},"area"]);FusionCharts.register("component",["dataset","DragLine",{configure:function(){var b,g=this.chart.jsonData.chart,e,
c,d;c=this.JSONData;var f=c.data||[],s;this.__base__.configure.call(this);b=this.config;e=this.components.data;b.allowDrag=a(c.allowdrag,1);b.allowNegDrag=a(c.allownegativedrag,1);b.allowAxisChange=a(g.allowaxischange,1);b.snapToDivOnly=a(g.snaptodivonly,0);b.snapToDiv=a(g.snaptodiv,1);b.doNotSnap=a(g.donotsnap,0);b.snapToDivRelaxation=a(g.snaptodivrelaxation,10);b.doNotSnap&&(b.snapToDiv=b.snapToDivOnly=0);s=e.length;for(g=0;g<s;g++)d=f[g]||{},c=e[g].config,c.allowDrag=a(d.allowdrag,b.allowDrag),
c.allowNegDrag=a(d.allownegativedrag,b.allowNegDrag)},draw:function(){var b=this.components.data,a=FusionCharts.get("component",["dataset",pa]),e,c=b.length;a.prototype.draw.call(this);for(a=0;a<c;a++)e=b[a],(e=e.config.anchorProps.imageUrl)||this.drawTracker(a)},drawTracker:function(b){var a=this.chart,e=this.components.data,c=e[b],d=c.graphics.hotElement||null,f=this.dragStart,s=this.dragUp,l=this.dragMove,m=c.config,A=c._yPos;d&&(!m.trackerListenerBind&&m.allowDrag&&(d.drag(l,f,s),m.trackerListenerBind=
!0),m.allowDrag&&d.attr({cursor:D&&"ns-resize"||"n-resize",ishot:!0}).data("drag-options",{items:e,yPos:A,chart:a,name:this.JSONData.seriesname,datasetIndex:this.index,pointIndex:b,dataObj:c}))},dragStart:function(){var b=this.data("drag-options"),a=b.chart.config;b._origY=b._lastY||(b._lastY=0);b.boundaryTop=a.canvasTop;b.boundaryBottom=a.canvasTop+a.canvasHeight;b.startValue=b.dataObj.config.setValue;b.origY=this.attr("cy");b.origX=this.attr("cx");b.latestY=b.origY;b.draged=!1},dragMove:function(b,
a){var e=this.data("drag-options"),c=e.items,h=c[e.pointIndex],f=e.dataObj,s=f.config,l=e.chart,m=l.components,A=m.dataset[e.datasetIndex],B=FusionCharts.get("component",["dataset","DragArea"]),q=l.config.animationObj,k=m.yAxis[0],n=f._xPos,p=q.duration,u=m.numberFormatter,t=l.config.canvasTop,r=h.graphics,h=k.getPixel(k.getAxisBase()),v=f.config.allowNegDrag?e.boundaryBottom:h,z=r.image,x=f.config.anchorProps,C=x.imageUrl,h=A.graphics.lineElement,m=f.config.showValue,w=c.length,y,r=r.element,E;E=
e.origY+a;e.draged||(y={dataIndex:e.pointIndex+1,datasetIndex:e.datasetIndex,startValue:e.startValue,datasetName:e.name},I.raiseEvent("dataplotDragStart",y,l.chartInstance));E<e.boundaryTop&&(a=e.boundaryTop-e.origY);E>v&&(a=v-e.origY);E=e.origY+a;this.attr({cy:E});Fa&&C?z=r:(v=r.data("setRolloverAttr"),(l=r.data("setRolloutAttr"))&&(l.polypath[2]=E),v&&(v.polypath[2]=E),r&&r.attr({polypath:[x.symbol[1]||2,n,E,x.radius,90,0]}),r.data("setRolloverAttr",v),r.data("setRolloutAttr",l));f._yPos=E;z&&B.prototype.updateImage.call(A,
f);e.latestY=E;f._yPos=E;f=s.setValue=k.getValue(E-t);f=u.dataLabels(f);s.toolTipValue=f;s.displayValue=d(s.setDisplayValue,f);for(s=0;s<w;s++)if(r=c[s].graphics,f=r.connector)k=c[s],B=k.config.connStartIndex,k=k.config.connEndIndex,B=A.getLinePath(c,{},{begin:B,end:k+1}),f.attr({path:B.getPathArr()});h&&(s=A.config,B=s.pathStartIndex,k=s.pathEndIndex,B=A.getLinePath(c,{},{begin:B,end:k}),h.attr({path:B.getPathArr()}));q.duration=0;m&&A.drawLabel(e.pointIndex);q.duration=p;e.draged=!0;this.data("draged",
!0);e.lastY=a},dragUp:function(){var b=this.data("drag-options"),a=b.dataObj,e=b.chart,c=e.components.dataset[b.datasetIndex],d=c.config,f=d.showTooltip,s=a.config.setTooltext,l=!d.doNotSnap,m=a.config.displayValue,A=e.config.canvasTop,B=c.yAxis,q=d.snapToDivRelaxation,k=d.snapToDivOnly,n=d.snapToDiv,p=a.config.setValue,t;b.draged&&(d=t=b.yPos+b.lastY,l&&n&&(d=Ca(B.getValue(0-A)-B.getValue(q-A)),k=B.getClosestDiv(p,k?null:d),d=B.getPixel(k),d-t&&c.dragMove.call(this,0,d-b.yPos)),B={dataIndex:b.pointIndex+
1,datasetIndex:b.datasetIndex+1,startValue:b.startValue,endValue:a.config.setValue,datasetName:b.name},k=[e.chartInstance.id,B.dataIndex,B.datasetIndex,B.datsetName,B.startValue,B.endValue],I.raiseEvent("dataplotDragEnd",B,e.chartInstance),v.raiseEvent("chartupdated",B,e.chartInstance,k),b.yPos=d,a._yPos=d,s+=m,a.graphics.hotElement.attr({y:b.yPos}).tooltip(f?s:u),b._lastY=b.lastY+b._origY,b.lastY+=b.origY,this.data("draged",!1),c.setMaxMin(),e._setDataLimits())},getJSONData:function(){var b=this.JSONData.data,
a=this.components.data,e=[],c={},d,f,s,l,m;m=0;for(l=b.length;m<l;m++){d=b[m];s=a[m];c={};for(f in d)c[f]="value"===f?s.config.setValue:d[f];e.push(c)}return{data:e}}},pa]);M("selectscatter",{isXY:!0,hasLegend:!0,applicableDSList:{selectScatter:!0},friendlyName:"Dragable Scatter Chart",standaloneInit:!0,creditLabel:n,defaultDatasetType:"selectScatter",defaultZeroPlaneHighlighted:!1,configure:M.dragbase.configure,_createToolBox:M.dragbase._createToolBox,_manageActionBarSpace:M.dragbase._manageActionBarSpace,
drawActionBar:M.dragbase.drawActionBar,getData:function(b){var a=this.getCollatedData(),e=[],c=a.dataset,d=c&&c.length||0,f=0,s=0,l;if(b)e=/^json$/ig.test(b)?a:/^csv$/ig.test(b)?this.getCSVString():I.core.transcodeData(a,"json",b);else for(;f<d;f+=1)if(a=c[f]){for((l=b=(a=c[f]&&c[f].data)&&a.length||0)&&(e[s]||(e[s]=[F(c[f].id,"null")]));l--;)e[s][l+1]=F(a[l].id,"null");b&&(s+=1)}return e},getCSVString:function(){for(var b=this.getData(),a=b.length;a--;)b[a]=b[a].join(",");return b.join("|")},getCollatedData:function(){for(var b=
this.config._selectEleArr,a=b&&b.length,e=W({},this.chartInstance.getChartData(I.dataFormats.JSON)),c=e.dataset,d,f,s,l,m,A,k,q,n,p=[];a--;)if(d=b[a])for(A=d.startX,k=d.endX,q=d.startY,n=d.endY,l=c.length;l--;)for(p[l]||(p[l]={data:[]}),m=(s=c[l].data)&&s.length;m--;)f=s[m],d=f.x,f=f.y,d>A&&d<k&&f<q&&f>n&&(p[l].data[m]=!0);for(l=c.length;l--;)for(m=(s=c[l].data)&&s.length;m--;)p[l]&&p[l].data[m]||s.splice(m,1);return this.updatedDataObj=e},createSelectionBox:function(b){var a=b.chart,e=a.components,
c=e.paper,d=a.config,f=e.yAxis&&e.yAxis[0],e=e.xAxis&&e.xAxis[0],s=b.selectionLeft,l=b.selectionTop,m=b.selectionWidth;b=b.selectionHeight;var A=s+m,k=l+b,q=15<m&&15<b,n={resizeEleRadius:15,canvasTop:d.canvasTop,canvasRight:d.canvasLeft+d.canvasWidth,canvasLeft:d.canvasLeft,canvasBottom:d.canvasTop+d.canvasHeight},t=a.graphics.trackerGroup,u=d._selectEleArr||(d._selectEleArr=[]);n.index=u.length;n.id="SELECT_"+n.index;n.selectBoxG=t=c.group("selection-box",t).toFront();n.selectBoxTracker=c.rect(s,
l,m,b,t).attr({"stroke-width":1,stroke:x(d.selectBorderColor),ishot:!0,fill:d.selectFillColor}).css({cursor:"move"});n.selectBoxTracker.data("config",{position:6,selectEleObj:n,xChange:!0,yChange:!0});n.topTracker=c.rect(s,l-6,m,12,t).attr({"stroke-width":0,ishot:!0,fill:p}).css("cursor",D&&"ns-resize"||"n-resize");n.topTracker.data("config",{position:1,selectEleObj:n,yChange:!0});n.rightTracker=c.rect(s+m-6,l,12,b,t).attr({"stroke-width":0,ishot:!0,fill:p}).css("cursor",D&&"ew-resize"||"w-resize");
n.rightTracker.data("config",{position:2,selectEleObj:n,xChange:!0});n.bottomTracker=c.rect(s,l+b-6,m,12,t).attr({"stroke-width":0,ishot:!0,fill:p}).css("cursor",D&&"ns-resize"||"n-resize");n.bottomTracker.data("config",{position:3,selectEleObj:n,yChange:!0});n.leftTracker=c.rect(s-6,l,12,b,t).attr({"stroke-width":0,ishot:!0,fill:p}).css("cursor",D&&"ew-resize"||"e-resize");n.leftTracker.data("config",{position:4,selectEleObj:n,xChange:!0});n.cornerInnerSymbol=c.symbol("resizeIcon",0,0,15,t).attr({transform:"t"+
A+","+k,"stroke-width":1,visibility:q?w:"hidden",ishot:!0,stroke:"#999999"});n.cornerOuterSymbol=c.symbol("resizeIcon",0,0,-12,t).attr({transform:"t"+A+","+k,strokeWidth:1,visibility:q?"hidden":w,ishot:!0,stroke:"#777777"});n.resizeTracker=c.circle(A,k,12,t).attr({"stroke-width":1,stroke:p,ishot:!0,fill:p}).css("cursor",D&&"nwse-resize"||"nw-resize");n.resizeTracker.data("config",{position:5,selectEleObj:n,yChange:!0,xChange:!0});n.closeButton=c.symbol("closeIcon",0,0,6,t).attr({transform:"t"+A+","+
l,"stroke-width":2,stroke:d.selectionCancelButtonBorderColor,fill:d.selectionCancelButtonFillColor,"stroke-linecap":"round",ishot:!0,"stroke-linejoin":"round"}).css({cursor:"pointer",_cursor:"hand"}).click(function(){a.deleteSelection(this,a)});n.closeButton.data("config",{index:n.index});n.chart=a;n.startX=e.getValue(s-d.canvasLeft);n.startY=f.getValue(l-d.canvasTop);n.endX=e.getValue(A-d.canvasLeft);n.endY=f.getValue(k-d.canvasTop);n.isVisible=!0;u.push(n);a.bindDragEvent(n)},_deleteAllSelection:function(){var b=
this.config._selectEleArr,a,e,c,d;for(c in b)if(b.hasOwnProperty(c)){a=b[c];for(d in a)a.hasOwnProperty(d)&&(e=a[d],e.remove&&e.remove(),delete a[d]);delete b[c]}},deleteSelection:function(b,a){var e=b.data("config").index,c=a.components,d=a.config._selectEleArr,f=d[e],s,l;l=f.selectBoxTracker.getBBox();l={selectionLeft:l.x,selectionTop:l.y,selectionWidth:l.width,selectionHeight:l.height,startXValue:c.xAxis[0].getAxisPosition(l.x,1),startYValue:c.yAxis[0].getAxisPosition(l.y,1),endXValue:c.xAxis[0].getAxisPosition(l.x+
l.width,1),endYValue:c.yAxis[0].getAxisPosition(l.y+l.height,1),data:a.getCollatedData(),id:f.id};for(s in f)f.hasOwnProperty(s)&&(c=f[s],c.remove&&c.remove(),delete f[s]);delete d[e];I.raiseEvent("selectionRemoved",l,a.chartInstance)},bindDragEvent:function(b){for(var a in b)/Tracker/.test(a)&&b[a].drag(this.move,this.start,this.up)},start:function(){var b=this.data("config").selectEleObj,a=b.topTracker,e=b.rightTracker,c=b.bottomTracker,d=b.leftTracker,f=b.resizeTracker,s=a.data("config"),l=e.data("config"),
m=c.data("config"),A=d.data("config"),k=f.data("config"),q=b.selectBoxTracker.data("config"),n=b.selectBoxTracker.getBBox();s.ox=n.x;s.oy=n.y;l.ox=n.x2;l.oy=n.y;m.ox=n.x;m.oy=n.y2;A.ox=n.x;A.oy=n.y;s.ox=n.x;s.oy=n.y;k.ox=n.x2;k.oy=n.y2;q.ox=n.x;q.oy=n.y;q.ow=n.width;q.oh=n.height;q.ox2=n.x2;q.oy2=n.y2;b.selectBoxG.toFront();a.hide();e.hide();c.hide();d.hide();f.hide();this.show()},move:function(b,a){var e=this.data("config"),c=e.selectEleObj,d=c.chart,f=d.config,s=d.components,l=c.topTracker,m=c.rightTracker,
A=c.bottomTracker,k=c.leftTracker,q=c.resizeTracker,n=c.selectBoxTracker,p=c.canvasLeft,t=c.canvasRight,u=c.canvasTop,r=c.canvasBottom,v=n.data("config"),x={},z,w;b=e.xChange?b:0;a=e.yChange?a:0;z=b+e.ox;w=a+e.oy;z=E(t-(e.ow||0),N(z,p));w=E(r-(e.oh||0),N(w,u));switch(e.position){case 1:x.y=E(v.oy2,w);x.height=Ca(v.oy2-w)||1;l.attr({y:w+-6});break;case 2:x.x=E(v.ox,z);x.width=Ca(v.ox-z)||1;m.attr({x:z+-6});break;case 3:x.y=E(v.oy,w);x.height=Ca(v.oy-w)||1;A.attr({y:w+-6});break;case 4:x.x=E(v.ox2,
z);x.width=Ca(v.ox2-z)||1;k.attr({x:z+-6});break;case 5:x.x=E(v.ox,z);x.width=Ca(v.ox-z)||1;x.y=E(v.oy,w);x.height=Ca(v.oy-w)||1;q.attr({cx:z,cy:w});break;default:x.x=z,x.y=w}this.data("dragStarted")||(e=n.getBBox(),f={selectionLeft:e.x,selectionTop:e.y,selectionWidth:e.width,selectionHeight:e.height,startXValue:s.xAxis[0].getValue(e.x-f.canvasLeft),startYValue:s.yAxis[0].getValue(e.y-f.canvasTop),endXValue:s.xAxis[0].getValue(e.x+e.width-f.canvasLeft),endYValue:s.yAxis[0].getValue(e.y+e.height-f.canvasTop),
id:c.id},I.raiseEvent("BeforeSelectionUpdate",f,d.chartInstance),this.data("dragStarted",1));n.animate(x);c.isVisible&&(c.closeButton.hide(),c.cornerInnerSymbol.hide(),c.cornerOuterSymbol.hide(),c.isVisible=!1)},up:function(){var b=this,a=b.data("config").selectEleObj,e=a.chart,c=e.components,d=e.config,f=c.xAxis&&c.xAxis[0],s=c.yAxis&&c.yAxis[0],l=a.topTracker,m=a.rightTracker,A=a.bottomTracker,k=a.leftTracker,q=a.resizeTracker,n=a.selectBoxTracker,p,t;setTimeout(function(){p=n.getBBox();a.startX=
f.getValue(p.x-d.canvasLeft);a.startY=s.getValue(p.y-d.canvasTop);a.endX=f.getValue(p.x2-d.canvasLeft);a.endY=s.getValue(p.y2-d.canvasTop);l.attr({x:p.x,y:p.y+-6,width:p.width});m.attr({x:p.x2+-6,y:p.y,height:p.height});A.attr({x:p.x,y:p.y2+-6,width:p.width});k.attr({x:p.x+-6,y:p.y,height:p.height});q.attr({cx:p.x2,cy:p.y2});a.closeButton.transform("t"+p.x2+","+p.y);a.cornerInnerSymbol.transform("t"+p.x2+","+p.y2);a.cornerOuterSymbol.transform("t"+p.x2+","+p.y2);a.closeButton.show();15>p.width||15>
p.height?(a.cornerInnerSymbol.hide(),a.cornerOuterSymbol.show()):(a.cornerInnerSymbol.show(),a.cornerOuterSymbol.hide());a.isVisible=!0;l.show();m.show();A.show();k.show();q.show();b.data("dragStarted")&&(t={selectionLeft:p.x,selectionTop:p.y,selectionWidth:p.width,selectionHeight:p.height,startXValue:c.xAxis[0].getValue(p.x-d.canvasLeft),startYValue:c.yAxis[0].getValue(p.y-d.canvasTop),endXValue:c.xAxis[0].getValue(p.x+p.width-d.canvasLeft),endYValue:c.yAxis[0].getValue(p.y+p.height-d.canvasTop),
data:e.getCollatedData(),id:a.id},I.raiseEvent("SelectionUpdated",t,e.chartInstance),b.data("dragStarted",0))},100)},restoreData:function(){var b=this.components.dataset,a;this._deleteAllSelection();for(a=0;a<b.length;a++)b[a].draw();return!0},submitData:function(){var b=this.chartInstance,a=new I.ajax,e=this.config,c=I.dataFormats.JSON,d=I.dataFormats.CSV,f=I.dataFormats.XML,s=e.formAction||"",l=e.submitFormAsAjax,m,A,k,q,n;e.formDataFormat===c?(m=c,A=JSON.stringify(this.getCollatedData())):this.formDataFormat===
d?(m=d,A=b.getCSVString&&b.getCSVString(),void 0===A&&(A=I.core.transcodeData(this.getCollatedData(),c,d))):(m=f,A=I.core.transcodeData(this.getCollatedData(),c,f));I.raiseEvent("beforeDataSubmit",{data:A},b,void 0,function(){l?(a.onError=function(a,c,g,e){v.raiseEvent("dataSubmitError",{xhrObject:c.xhr,url:e,statusText:a,httpStatus:c.xhr&&c.xhr.status?c.xhr.status:-1,data:A},b,[b.id,a,c.xhr&&c.xhr.status])},a.onSuccess=function(c,e,d,f){v.raiseEvent("dataSubmitted",{xhrObject:a,response:c,url:f,
data:A},b,[b.id,c])},k={},k["str"+m.toUpperCase()]=A,a.open&&a.abort(),a.post(s,k)):(q=oa.document.createElement("span"),q.innerHTML='<form style="display:none" action="'+s+'" method="'+e.formMethod+'" target="'+e.formTarget+'"> <input type="hidden" name="strXML" value="'+hc(A)+'"><input type="hidden" name="dataFormat" value="'+m.toUpperCase()+'" /></form>',n=q.removeChild(q.firstChild),oa.document.body.appendChild(n),n.submit&&n.submit(),n.parentNode.removeChild(n),q=n=null)},function(){I.raiseEvent("dataSubmitCancelled",
{data:A},b)})},_postSpaceManagement:function(){M("mscartesian")._postSpaceManagement.call(this);this._deleteAllSelection()},eiMethods:{getData:function(b){var a=this.apiInstance;return a&&a.getData(b)},restoreData:function(){var b=this.apiInstance;return b&&b.restoreData()},submitData:function(){var b=this.apiInstance;return b&&b.submitData()}}},M.scatterBase);FusionCharts.register("component",["dataset","selectScatter",{configure:function(){var b=this.chart,g=b.config,e=b.jsonData.chart,b=b.components.colorManager,
c=d(e.selectbordercolor,b.getColor("canvasBorderColor")),h=a(e.selectborderalpha,b.getColor("canvasBorderAlpha"));FusionCharts.get("component",["dataset","scatter"]).prototype.configure.call(this);g.selectBorderColor={FCcolor:{color:c,alpha:h}};g.selectFillColor=ea(d(e.selectfillcolor,b.getColor("altHGridColor")),a(e.selectfillalpha,b.getColor("altHGridAlpha")));g.selectionCancelButtonBorderColor=ea(d(e.selectioncancelbuttonbordercolor,c),a(e.selectioncancelbuttonborderalpha,h));g.selectionCancelButtonFillColor=
ea(d(e.selectioncancelbuttonfillcolor,"FFFFFF"),a(e.selectioncancelbuttonfillalpha,100));g.connativeZoom=!1;g.zoomType="xy";g.formAction=F(e.formaction);"0"!==e.submitdataasxml||e.formdataformat||(e.formdataformat=I.dataFormats.CSV);g.formDataFormat=d(e.formdataformat,I.dataFormats.XML);g.formTarget=d(e.formtarget,"_self");g.formMethod=d(e.formmethod,"POST");g.submitFormAsAjax=a(e.submitformusingajax,1)},draw:function(){var b=this.chart,a=b.linkedItems.container;FusionCharts.get("component",["dataset",
"scatter"]).prototype.draw.call(this);oc(b,{selectionStart:function(b){var c=Rb(a,b.originalEvent),c=W({selectionLeft:b.selectionLeft,selectionTop:b.selectionTop,selectionWidth:b.selectionWidth,selectionHeight:b.selectionHeight,startXValue:b.chart.components.xAxis[0].getAxisPosition(b.selectionLeft,1),startYValue:b.chart.components.yAxis[0].getAxisPosition(b.selectionTop,1)},c);I.raiseEvent("selectionStart",c,b.chart.chartInstance)},selectionEnd:function(b){var c=Rb(a,b.originalEvent),d=b.chart.components.xAxis[0],
f=b.chart.components.yAxis[0],c=W({selectionLeft:b.selectionLeft,selectionTop:b.selectionTop,selectionWidth:b.selectionWidth,selectionHeight:b.selectionHeight,startXValue:d.getAxisPosition(b.selectionLeft,1),startYValue:f.getAxisPosition(b.selectionTop,1),endXValue:d.getAxisPosition(b.selectionLeft+b.selectionWidth,1),endYValue:f.getAxisPosition(b.selectionTop+b.selectionHeight,1)},c);I.raiseEvent("selectionEnd",c,b.chart.chartInstance);b.chart.createSelectionBox(b)}})}},"scatter"]);M("candlestick",
{friendlyName:"Candlestick Chart",standaloneInit:!0,creditLabel:n,paletteIndex:3,defaultDatasetType:"candlestick",hasLegend:!0,applicableDSList:{candlestick:!0},canvasborderthickness:1,hasInteractiveLegend:!1,init:function(b,a,e,c){var d;this.jsonData=a;d=this.components=this.components||(this.components={});d.canvasVolume=d.canvasVolume||(d.canvasVolume={graphics:{},config:{}});M.mscartesian.init.call(this,b,a,e,c)},configure:function(){var b,g,e,c=this.components.colorManager,h=this.jsonData.chart,
f=this.components;this.base.configure.call(this);b=this.config;e=f.canvas.config;b.showVolumeChart=a(h.showvolumechart,1);g=a(h.volumeheightpercent,40);b.volumeHeightPercent=20>g?20:80<g?80:g;b.canvasBorderWidth=a(h.canvasborderthickness,1);b.rollOverBandColor=ea(d(h.rolloverbandcolor,c.getColor("altHGridColor")),d(h.rolloverbandalpha,c.getColor("altHGridAlpha")));W(f.canvasVolume.config,e)},_createDatasets:function(){var b=this.config,a=this.components,e=this.jsonData,c=e.dataset,h=e.trendset||[],
f=this.config.showVolumeChart,s=c&&c.length,l,m,A=this.defaultDatasetType,k=d(Z(e.chart.plotpriceas),xa),q,n,p,t,u,r=0,v=b.datasetMap||(b.datasetMap={trendset:[],candlestick:[]}),x,z={},w={trendset:[],candlestick:[]},C=a.legend;if(c){this.config.categories=e.categories&&e.categories[0].category;l=a.dataset=[];e=0;for(s=c.length;e<s;e++)p=c[e],p.seriesname&&(p.seriesname=Z(p.seriesname)),q=(q=d(p.renderas,A))&&q.toLowerCase(),n=FusionCharts.get("component",["dataset",q]),x=v[q],m=x[0],n&&(void 0===
z[q]?z[q]=0:z[q]++,m?(t=m,m.index=e,k!==t.config.plotType?(K.call(t),m=l[r]=new n,m.chart=this,m.index=r,m.init(p)):(t=(t=m.JSONData)&&t.data&&t.data.length,u=p.data&&p.data.length,t>u&&m.removeData(u-1,t-u,!1),m.JSONData=p),m.configure(),w[q].push(m),l.push(m),x.shift()):(m=new n,l.push(m),w[q].push(m),m.chart=this,m.index=r,m.init(p))),r++,x=a.yAxis&&a.yAxis[1],f&&this.config.drawVolume?(x&&x.show(),n&&(void 0===z[q]?z[q]=0:z[q]++,x=v[q],(m=x[0])?(t=(t=m.JSONData)&&t.data&&t.data.length,u=p.data&&
p.data.length,t>u&&m.removeData(u-1,t-u,!1),m.JSONData=p,m.configure(),l.push(m),w[q].push(m),x.shift()):(m=new n,m.chart=this,l.push(m),w[q].push(m),m.init(p,Ia))),r++):x&&x.hide(),f=this.config.drawVolume&&f?this.config.showVolumeChart=1:this.config.showVolumeChart=0;e=0;for(s=h.length;e<s;e++)p=h[e],q="trendset",x=v[q],m=x[0],void 0===z[q]?z[q]=0:z[q]++,m?(t=(t=m.JSONData)&&t.data&&t.data.length,u=p.data&&p.data.length,w[q].push(m),l.push(m),m.index=r,t>u&&m.removeData(u-1,t-u,!1),m.JSONData=p,
m.configure(),x.shift()):(n=FusionCharts.get("component",["dataset",q]),a=new n,l.push(a),w[q].push(a),a.chart=this,a.index=r,a.init(p)),r++;for(c in v)if(x=v[c],s=x.length)for(h=0;h<s;h++)C.removeItem(x[h].legendItemId),K.call(x[h]);b.datasetMap=w}else this.setChartMessage()},_spaceManager:function(){var b,a,e=this.config,c=this.components,d=e.legendPosition,f=c.xAxis&&c.xAxis[0],s=c.xAxis&&c.xAxis[1],l=c.yAxis&&c.yAxis[0],m=c.yAxis&&c.yAxis[1];b=this.hasLegend;var A=c.legend,k,q=this.config.showVolumeChart,
n=q?e.volumeHeightPercent:0,p=c.canvas.config,t=c.canvasVolume.config,u=e.width,r=e.height,v={},x;x=e.chartBorderWidth;c=c.canvas.config.canvasBorderWidth;k=e.minCanvasHeight;a=e.minCanvasWidth;var z=e.canvasMarginLeft,w=e.canvasMarginRight,C=e.canvasMarginTop,y=e.canvasMarginBottom,E,D,F=e.origCanvasTopMargin,H=e.origCanvasBottomMargin,J=e.origCanvasLeftMargin,R=e.origCanvasRightMargin;this._allocateSpace({top:x,bottom:x,left:x,right:x});x=d===fc?.225*e.canvasWidth:.3*e.canvasHeight;!1!==b&&f&&this._allocateSpace(A._manageLegendPosition(x));
b=.7*e.canvasWidth;l=l.placeAxis(b);m=q?m.placeAxis(b):{};v.left=N(l.left,m.left||0);v.right=N(l.right,m.right||0);this._allocateSpace(v);a>u-z-w&&(D=!0,m=e.canvasWidth-a,v=z+w,z=e.canvasMarginLeft=m*z/v,w=e.canvasMarginRight=m*w/v);z=z>e.canvasLeft?z-e.canvasLeft:0;u=w>u-e.canvasRight?w+e.canvasRight-u:0;this._allocateSpace({left:z,right:u});D&&(v=J+R,D=e.canvasWidth,D>a&&(m=D-a,z=m*J/v,u=m*R/v),this._allocateSpace({left:z,right:u}));a=d===Qb?.225*e.canvasHeight:.225*e.canvasWidth;this._manageChartMenuBar(a);
this._allocateSpace({top:e.canvasMarginTop,bottom:e.canvasMarginBottom});a=.3*e.canvasHeight;d=f.placeAxis(a);f&&this._allocateSpace(d);d.bottom+=6;q&&(f=s.placeAxis(a),this._allocateSpace(f));this._allocateSpace({top:c,bottom:2*c,left:c,right:c});k>r-C-y&&(E=!0,m=e.canvasHeight-k,v=C+y,C=e.canvasMarginTop=m*C/v,y=e.canvasMarginBottom=m*y/v);f=C>e.canvasTop?C-e.canvasTop:0;r=y>r-e.canvasBottom?y+e.canvasBottom-r:0;this._allocateSpace({top:f,bottom:r});E&&(v=F+H,E=e.canvasHeight,E>k&&(m=E-k,f=m*F/
v,r=m*H/v),this._allocateSpace({top:f,bottom:r}));k=e.canvasHeight;p.canvasHeight=ga((100-n)/100*k);t.canvasHeight=n/100*k;p.canvasTop=e.canvasTop;p.canvasLeft=e.canvasLeft;p.canvasBottom=p.canvasTop+p.canvasHeight;p.canvasWidth=e.canvasWidth;p.canvasRight=e.canvasRight;t.canvasTop=p.canvasBottom+d.bottom+2*c;t.canvasLeft=e.canvasLeft;t.canvasBottom=t.canvasTop+t.canvasHeight+2*c;t.canvasRight=e.canvasRight;t.canvasWidth=e.canvasWidth;n=e.canvasTop+p.canvasHeight+c;e=e.canvasTop+p.canvasHeight+d.bottom+
2*c;p.canvasY=n;t.canvasY=e},_postSpaceManagement:function(){var b=this.components,a=this.config.showVolumeChart,e=b.xAxis&&b.xAxis[0],c=b.yAxis&&b.yAxis[0],d=b.xAxis&&b.xAxis[1],f=b.yAxis&&b.yAxis[1],s=b.canvas.config,l=b.legend,b=b.canvasVolume.config,m=s.canvasBorderWidth;e&&e.setAxisDimention({x:s.canvasLeft,y:s.canvasY,opposite:s.canvasTop-m,axisLength:s.canvasWidth});c&&c.setAxisDimention({x:s.canvasLeft-m,y:s.canvasTop,opposite:s.canvasRight+m,axisLength:s.canvasHeight});a&&(d&&d.setAxisDimention({x:s.canvasLeft,
y:b.canvasBottom,opposite:b.canvasTop-m,axisLength:s.canvasWidth}),f&&f.setAxisDimention({x:s.canvasLeft-m,y:b.canvasY,opposite:b.canvasRight+m,axisLength:b.canvasHeight}),d&&d.setCanvas(b),f&&f.setCanvas(b));e.setCanvas(s);c.setCanvas(s);l.postSpaceManager()},_drawCanvas:function(){var b=this.components,a=this.graphics,e=b.paper,c=b.canvas,d=b.canvas.config,f=d.clip||(d.clip=[]),s=b.canvasVolume.config,l=c.graphics,b=b.canvasVolume.graphics,m=c.config,A=l.topCanvas,k=l.topCanvasBorderElement,c=b.volumeCanvas,
q=d.canvasLeft,n=d.canvasTop,p=d.canvasWidth,d=d.canvasHeight,t=s.canvasTop,s=s.canvasHeight,a=a.canvasGroup,u=m.canvasBorderRadius,r=m.canvasBorderWidth,v=.5*r,w=m.canvasBorderColor,z=this.get("config","animationObj"),y=z.dummyObj,C=z.animObj,E=z.animType,z=z.transposeAnimDuration,D,F=this.config.showVolumeChart,I=m.shadow,H=m.shadowOnCanvasFill,m=m.canBGColor;D={x:q-v,y:n-v,width:p+r,height:d+r,r:u,"stroke-width":r,stroke:w,"stroke-linejoin":2<r?"round":"miter"};k?z?k.animateWith(y,C,{x:q-v,y:n-
v,width:p+r,height:d+r,r:u},z,E):k.attr(D):k=l.topCanvasBorderElement=e.rect(D,a).shadow(I);k.attr({"stroke-width":r,stroke:w,"stroke-linejoin":2<r?"round":"miter"});f["clip-canvas"]=[N(0,q),N(0,n),N(1,p),N(1,d)];f["clip-canvas-init"]=[N(0,q),N(0,n),1,N(1,d)];A?z?A.animate({x:q,y:n,width:p,height:d},z,E).attr({r:u}):A.attr(void 0):(l.topCanvas=A=e.rect(a),A.attr({x:q,y:n,width:p,height:d}).shadow(H));A.animateWith(y,C,{x:q,y:n,width:p,height:d},z,E);A.attr({r:u,"stroke-width":0,stroke:"none",fill:x(m)});
F?(f={x:q-v,y:t-v-1,width:p+r,height:s+r},c||(b.volumeCanvas=c=e.rect(a).attr(f).shadow(H).crisp()),c.show().animateWith(y,C,f,z,E).attr({r:u,fill:x(m),"stroke-width":r,stroke:w,"stroke-linejoin":2<r?"round":"miter","shape-rendering":"crisp"})):c&&c.hide()},_createAxes:function(){var b=this.components,a,e=FusionCharts.register("component",["axis","cartesian"]),c=this.config.showVolumeChart,d,f;b.yAxis=[];b.xAxis=[];b.yAxis[0]=d=new e;b.yAxis[1]=a=new e;b.xAxis[0]=f=new e;d.chart=this;a.chart=this;
f.chart=this;c&&(b.xAxis[1]=b=new e,b.chart=this,b.init());d.init();a.init();f.init();this._setCategories()},_feedAxesRawData:function(){var b=this.components,g=b.colorManager,e=this.jsonData,c=e.chart,h,f,s=this.is3d,l=s?Ja.chart3D:Ja.chart2D,m=FusionCharts.register("component",["axis","cartesian"]),A=this.config.showVolumeChart;h={outCanfontFamily:d(c.outcnvbasefont,c.basefont,"Verdana,sans"),outCanfontSize:hb(c.outcnvbasefontsize,c.basefontsize,10),outCancolor:d(c.outcnvbasefontcolor,c.basefontcolor,
g.getColor(l.baseFontColor)).replace(/^#?([a-f0-9]+)/ig,"#$1"),axisNamePadding:c.xaxisnamepadding,axisValuePadding:c.labelpadding,axisNameFont:c.xaxisnamefont,axisNameFontSize:c.xaxisnamefontsize,axisNameFontColor:c.xaxisnamefontcolor,axisNameFontBold:c.xaxisnamefontbold,axisNameFontItalic:c.xaxisnamefontitalic,axisNameBgColor:c.xaxisnamebgcolor,axisNameBorderColor:c.xaxisnamebordercolor,axisNameAlpha:c.xaxisnamealpha,axisNameFontAlpha:c.xaxisnamefontalpha,axisNameBgAlpha:c.xaxisnamebgalpha,axisNameBorderAlpha:c.xaxisnameborderalpha,
axisNameBorderPadding:c.xaxisnameborderpadding,axisNameBorderRadius:c.xaxisnameborderradius,axisNameBorderThickness:c.xaxisnameborderthickness,axisNameBorderDashed:c.xaxisnameborderdashed,axisNameBorderDashLen:c.xaxisnameborderdashlen,axisNameBorderDashGap:c.xaxisnameborderdashgap,useEllipsesWhenOverflow:c.useellipseswhenoverflow,divLineColor:d(c.vdivlinecolor,c.divlinecolor,g.getColor(l.divLineColor)),divLineAlpha:d(c.vdivlinealpha,c.divlinealpha,s?g.getColor("divLineAlpha3D"):g.getColor("divLineAlpha")),
divLineThickness:a(c.vdivlinethickness,c.divlinethickness,1),divLineIsDashed:Boolean(a(c.vdivlinedashed,c.vdivlineisdashed,c.divlinedashed,c.divlineisdashed,0)),divLineDashLen:a(c.vdivlinedashlen,c.divlinedashlen,4),divLineDashGap:a(c.vdivlinedashgap,c.divlinedashgap,2),showAlternateGridColor:a(c.showalternatevgridcolor,0),alternateGridColor:d(c.alternatevgridcolor,g.getColor("altVGridColor")),alternateGridAlpha:d(c.alternatevgridalpha,g.getColor("altVGridAlpha")),numDivLines:c.numvdivlines,labelFont:c.labelfont,
labelFontSize:c.labelfontsize,labelFontColor:c.labelfontcolor,labelFontAlpha:c.labelalpha,labelFontBold:c.labelfontbold,labelFontItalic:c.labelfontitalic,axisName:c.xaxisname,axisMinValue:c.xaxisminvalue,axisMaxValue:c.xaxismaxvalue,setAdaptiveMin:c.setadaptivexmin,adjustDiv:c.adjustvdiv,labelDisplay:c.labeldisplay,showLabels:c.showlabels,rotateLabels:c.rotatelabels,slantLabel:a(c.slantlabels,c.slantlabel),labelStep:a(c.labelstep,c.xaxisvaluesstep),showAxisValues:a(c.showxaxisvalues,c.showxaxisvalue),
showLimits:c.showvlimits,showDivLineValues:a(c.showvdivlinevalues,c.showvdivlinevalues),showZeroPlane:c.showvzeroplane,zeroPlaneColor:c.vzeroplanecolor,zeroPlaneThickness:c.vzeroplanethickness,zeroPlaneAlpha:c.vzeroplanealpha,showZeroPlaneValue:c.showvzeroplanevalue,trendlineColor:c.trendlinecolor,trendlineToolText:c.trendlinetooltext,trendlineThickness:c.trendlinethickness,trendlineAlpha:c.trendlinealpha,showTrendlinesOnTop:c.showtrendlinesontop,showAxisLine:a(c.showxaxisline,c.showaxislines,c.drawAxisLines,
0),axisLineThickness:a(c.xaxislinethickness,c.axislinethickness,1),axisLineAlpha:a(c.xaxislinealpha,c.axislinealpha,100),axisLineColor:d(c.xaxislinecolor,c.axislinecolor,"#000000")};s={outCanfontFamily:d(c.outcnvbasefont,c.basefont,"Verdana,sans"),outCanfontSize:hb(c.outcnvbasefontsize,c.basefontsize,10),outCancolor:d(c.outcnvbasefontcolor,c.basefontcolor,g.getColor(l.baseFontColor)).replace(/^#?([a-f0-9]+)/ig,"#$1"),axisNamePadding:c.xaxisnamepadding,axisValuePadding:c.labelpadding,axisNameFont:c.xaxisnamefont,
axisNameFontSize:c.xaxisnamefontsize,axisNameFontColor:c.xaxisnamefontcolor,axisNameFontBold:c.xaxisnamefontbold,axisNameFontItalic:c.xaxisnamefontitalic,axisNameBgColor:c.xaxisnamebgcolor,axisNameBorderColor:c.xaxisnamebordercolor,axisNameAlpha:c.xaxisnamealpha,axisNameFontAlpha:c.xaxisnamefontalpha,axisNameBgAlpha:c.xaxisnamebgalpha,axisNameBorderAlpha:c.xaxisnameborderalpha,axisNameBorderPadding:c.xaxisnameborderpadding,axisNameBorderRadius:c.xaxisnameborderradius,axisNameBorderThickness:c.xaxisnameborderthickness,
axisNameBorderDashed:c.xaxisnameborderdashed,axisNameBorderDashLen:c.xaxisnameborderdashlen,axisNameBorderDashGap:c.xaxisnameborderdashgap,useEllipsesWhenOverflow:c.useellipseswhenoverflow,divLineColor:d(c.vdivlinecolor,g.getColor(l.divLineColor)),divLineAlpha:d(c.vdivlinealpha,g.getColor("divLineAlpha")),divLineThickness:a(c.vdivlinethickness,1),divLineIsDashed:Boolean(a(c.vdivlinedashed,c.vdivlineisdashed,0)),divLineDashLen:a(c.vdivlinedashlen,4),divLineDashGap:a(c.vdivlinedashgap,2),showAlternateGridColor:a(c.showalternatevgridcolor,
0),alternateGridColor:d(c.alternatevgridcolor,g.getColor("altVGridColor")),alternateGridAlpha:d(c.alternatevgridalpha,g.getColor("altVGridAlpha")),numDivLines:c.numvdivlines,labelFont:c.labelfont,labelFontSize:c.labelfontsize,labelFontColor:c.labelfontcolor,labelFontAlpha:c.labelalpha,labelFontBold:c.labelfontbold,labelFontItalic:c.labelfontitalic,axisName:c.xaxisname,axisMinValue:c.xaxisminvalue,axisMaxValue:c.xaxismaxvalue,setAdaptiveMin:c.setadaptivexmin,adjustDiv:c.adjustvdiv,labelDisplay:c.labeldisplay,
showLabels:1,rotateLabels:c.rotatelabels,slantLabel:a(c.slantlabels,c.slantlabel),labelStep:a(c.labelstep,c.xaxisvaluesstep),showAxisValues:a(c.showxaxisvalues,c.showxaxisvalue),showLimits:c.showvlimits,showDivLineValues:a(c.showvdivlinevalues,c.showvdivlinevalues),showZeroPlane:c.showvzeroplane,zeroPlaneColor:c.vzeroplanecolor,zeroPlaneThickness:c.vzeroplanethickness,zeroPlaneAlpha:c.vzeroplanealpha,showZeroPlaneValue:c.showvzeroplanevalue,trendlineColor:c.trendlinecolor,trendlineToolText:c.trendlinetooltext,
trendlineThickness:c.trendinethickness,trendlineAlpha:c.trendlinealpha,showTrendlinesOnTop:c.showtrendlinesontop,showAxisLine:a(c.showxaxisline,c.showaxislines,c.drawAxisLines,0),axisLineThickness:a(c.xaxislinethickness,c.axislinethickness,1),axisLineAlpha:a(c.xaxislinealpha,c.axislinealpha,100),axisLineColor:d(c.xaxislinecolor,c.axislinecolor,"#000000")};f={outCanfontFamily:d(c.outcnvbasefont,c.basefont,"Verdana,sans"),outCanfontSize:hb(c.outcnvbasefontsize,c.basefontsize,10),outCancolor:d(c.outcnvbasefontcolor,
c.basefontcolor,g.getColor(l.baseFontColor)).replace(/^#?([a-f0-9]+)/ig,"#$1"),axisNamePadding:c.yaxisnamepadding,axisValuePadding:c.yaxisvaluespadding,axisNameFont:c.pyaxisnamefont,axisNameFontSize:c.pyaxisnamefontsize,axisNameFontColor:c.pyaxisnamefontcolor,axisNameFontBold:c.pyaxisnamefontbold,axisNameFontItalic:c.pyaxisnamefontitalic,axisNameBgColor:c.pyaxisnamebgcolor,axisNameBorderColor:c.pyaxisnamebordercolor,axisNameAlpha:c.pyaxisnamealpha,axisNameFontAlpha:c.pyaxisnamefontalpha,axisNameBgAlpha:c.pyaxisnamebgalpha,
axisNameBorderAlpha:c.pyaxisnameborderalpha,axisNameBorderPadding:c.pyaxisnameborderpadding,axisNameBorderRadius:c.pyaxisnameborderradius,axisNameBorderThickness:c.pyaxisnameborderthickness,axisNameBorderDashed:c.pyaxisnameborderdashed,axisNameBorderDashLen:c.pyaxisnameborderdashlen,axisNameBorderDashGap:c.pyaxisnameborderdashgap,axisNameWidth:c.yaxisnamewidth,useEllipsesWhenOverflow:c.useellipseswhenoverflow,rotateAxisName:a(c.rotateyaxisname,1),axisName:c.pyaxisname,divLineColor:d(c.divlinecolor,
g.getColor(l.divLineColor)),divLineAlpha:d(c.divlinealpha,g.getColor("divLineAlpha")),divLineThickness:a(c.divlinethickness,1),divLineIsDashed:Boolean(a(c.divlinedashed,c.divlineisdashed,1)),divLineDashLen:a(c.divlinedashlen,4),divLineDashGap:a(c.divlinedashgap,2),showAlternateGridColor:a(c.showalternatehgridcolor,1),alternateGridColor:d(c.alternatehgridcolor,g.getColor("altHGridColor")),alternateGridAlpha:d(c.alternatehgridalpha,g.getColor("altHGridAlpha")),numDivLines:a(c.numpdivlines,5),axisMinValue:c.pyaxisminvalue,
axisMaxValue:c.pyaxismaxvalue,setAdaptiveMin:a(c.setadaptiveymin,1),adjustDiv:c.adjustdiv,labelStep:c.yaxisvaluesstep,showAxisValues:a(c.showyaxisvalues,c.showyaxisvalue),showLimits:a(c.showyaxislimits,c.showlimits,this.showLimits),showDivLineValues:a(c.showdivlinevalues,c.showdivlinevalue),showZeroPlane:c.showzeroplane,zeroPlaneColor:c.zeroplanecolor,zeroPlaneThickness:c.zeroplanethickness,zeroPlaneAlpha:c.zeroplanealpha,showZeroPlaneValue:c.showzeroplanevalue,trendlineColor:c.trendlinecolor,trendlineToolText:c.trendlinetooltext,
trendlineThickness:c.trendlinethickness,trendlineAlpha:c.trendlinealpha,showTrendlinesOnTop:c.showtrendlinesontop,showAxisLine:a(c.showyaxisline,c.showaxislines,c.drawAxisLines,0),axisLineThickness:a(c.yaxislinethickness,c.axislinethickness,1),axisLineAlpha:a(c.yaxislinealpha,c.axislinealpha,100),axisLineColor:d(c.yaxislinecolor,c.axislinecolor,"#000000")};g={outCanfontFamily:d(c.outcnvbasefont,c.basefont,"Verdana,sans"),outCanfontSize:hb(c.outcnvbasefontsize,c.basefontsize,10),outCancolor:d(c.outcnvbasefontcolor,
c.basefontcolor,g.getColor(l.baseFontColor)).replace(/^#?([a-f0-9]+)/ig,"#$1"),axisNamePadding:c.yaxisnamepadding,axisValuePadding:c.yaxisvaluespadding,axisNameFont:c.vyaxisnamefont,axisNameFontSize:c.vyaxisnamefontsize,axisNameFontColor:c.vyaxisnamefontcolor,axisNameFontBold:c.vyaxisnamefontbold,axisNameFontItalic:c.vyaxisnamefontitalic,axisNameBgColor:c.vyaxisnamebgcolor,axisNameBorderColor:c.vyaxisnamebordercolor,axisNameAlpha:c.vyaxisnamealpha,axisNameFontAlpha:c.vyaxisnamefontalpha,axisNameBgAlpha:c.vyaxisnamebgalpha,
axisNameBorderAlpha:c.vyaxisnameborderalpha,axisNameBorderPadding:c.vyaxisnameborderpadding,axisNameBorderRadius:c.vyaxisnameborderradius,axisNameBorderThickness:c.vyaxisnameborderthickness,axisNameBorderDashed:c.vyaxisnameborderdashed,axisNameBorderDashLen:c.vyaxisnameborderdashlen,axisNameBorderDashGap:c.vyaxisnameborderdashgap,axisNameWidth:c.yaxisnamewidth,useEllipsesWhenOverflow:c.useellipseswhenoverflow,rotateAxisName:a(c.rotateyaxisname,1),axisName:c.vyaxisname,divLineColor:d(c.divlinecolor,
g.getColor(l.divLineColor)),divLineAlpha:d(c.divlinealpha,g.getColor("divLineAlpha")),divLineThickness:a(c.divlinethickness,1),divLineIsDashed:Boolean(a(c.divlinedashed,c.divlineisdashed,1)),divLineDashLen:a(c.divlinedashlen,4),divLineDashGap:a(c.divlinedashgap,2),showAlternateGridColor:a(c.showalternatehgridcolor,1),alternateGridColor:d(c.alternatehgridcolor,g.getColor("altHGridColor")),alternateGridAlpha:d(c.alternatehgridalpha,g.getColor("altHGridAlpha")),numDivLines:c.numdivlines,axisMinValue:c.vyaxisminvalue,
axisMaxValue:c.vyaxismaxvalue,setAdaptiveMin:c.setadaptiveymin,adjustDiv:c.adjustdiv,labelStep:c.yaxisvaluesstep,showAxisValues:a(c.showyaxisvalues,c.showyaxisvalue),showLimits:a(c.showsecondarylimits,c.showlimits),showDivLineValues:a(c.showdivlinevalues,c.showdivlinevalue),showZeroPlane:c.showzeroplane,zeroPlaneColor:c.zeroplanecolor,zeroPlaneThickness:c.zeroplanethickness,zeroPlaneAlpha:c.zeroplanealpha,showZeroPlaneValue:c.showzeroplanevalue,trendlineColor:c.trendlinecolor,trendlineToolText:c.trendlinetooltext,
trendlineThickness:c.trendlinethickness,trendlineAlpha:c.trendlinealpha,showTrendlinesOnTop:c.showtrendlinesontop,showAxisLine:a(c.showyaxisline,c.showaxislines,c.drawAxisLines,0),axisLineThickness:a(c.yaxislinethickness,c.axislinethickness,1),axisLineAlpha:a(c.yaxislinealpha,c.axislinealpha,100),axisLineColor:d(c.yaxislinecolor,c.axislinecolor,"#000000")};h.vtrendlines=e.vtrendlines;s.vtrendlines=e.vtrendlines;f.trendlines=e.trendlines;c=b.yAxis[0];e=b.yAxis[1];l=b.xAxis[0];c.setCommonConfigArr(f,
!0,!1,!1);c.configure();e.setCommonConfigArr(g,!0,!1,!1);e.configure();c.setAxisConfig({drawLabelsOpposit:1,axisNameAlignCanvas:1,relativeAxis:e});e.setAxisConfig({drawLabelsOpposit:1,axisNameAlignCanvas:1,uniqueClassName:1,relativeAxis:c});l.setCommonConfigArr(h,!1,!1,!1);l.configure();l.setAxisConfig({drawTrendLabels:A?!1:!0});A?(b.xAxis[1]?b.xAxis[1].show():(m=b.xAxis[1]=new m,m.chart=this,m.init()),m=b.xAxis[1],m.setCommonConfigArr(s,!1,!1,!1),m.configure(),m.setAxisConfig({drawLabels:!1,drawPlotlines:!0,
drawPlotBands:!1,drawAxisName:!1,drawTrendLines:!0,drawOnlyCategoryLine:!0,uniqueClassName:1})):b.xAxis[1]&&b.xAxis[1].hide()},_setCategories:function(){var b=this.jsonData,a=this.components.xAxis,b=b.categories&&b.categories[0].category||[],e=[],c,d;for(d=0;d<b.length;d++)c=W({},b[d]),c.label=u,e.push(c);a[0].setAxisPadding(.5,.5);a[0].setCategory(b);a[1]&&a[1].setAxisPadding(.5,.5);a[1]&&a[1].setCategory(e)},_setAxisLimits:function(){var b=this.components,a=b.dataset,e=b.yAxis,b=b.xAxis,c,d=a.length,
f,s=-Infinity,l=Infinity,m=-Infinity,A=Infinity,k=Infinity,q=-Infinity,n,p=0,t={};for(f=0;f<d;f++)c=a[f],n=c.groupManager,p=c.config.parentYAxis,n?(t[c.type]=n,t[c.type].yAxisIndex=p):(c=c.getDataLimits(),1===p?(m=N(m,c.max),A=E(A,c.min)):(s=N(s,c.max),l=E(l,c.min)),q=N(q,c.xMax||-Infinity),k=E(k,c.xMin||Infinity));for(n in t)c=t[n].getDataLimits(),s=N(s,c.max),l=E(l,c.min);e[0].setDataLimit(s,l);e[1].setDataLimit(m,A);if(-Infinity!==q||Infinity!==k)b[0].setAxisRange({min:k-.5,max:q+.5,tickInterval:1}),
b[1]&&b[1].setAxisRange({min:k-.5,max:q+.5,tickInterval:1})},isDual:!0},M.mscartesian);FusionCharts.register("component",["dataset","Candlestick",{type:"Candlestick",configure:function(){if(this.plotType===Ia)this._configureVolume();else{var b=this.config,g=this.chart,e=g.components,c=this.JSONData,h=c.data||[],f=g.jsonData.chart,s=h.length,l=b.plotPriceAs=F(f.plotpriceas,u).toLowerCase(),m=e.numberFormatter,A=e.colorManager,k,q,n,p,e=b.bearBorderColor=Ha(d(f.bearbordercolor,ja)),t=b.bearFillColor=
Ha(d(f.bearfillcolor,ja)),r=b.bullBorderColor=Ha(d(f.bullbordercolor,A.getColor("canvasBorderColor"))),x=b.bullFillColor=Ha(d(f.bullfillcolor,"FFFFFF")),w=b.lineThickness=b.plotBorderThickness=a(f.plotlinethickness,l==pa||l==Aa?2:1),y=b.plotLineDashLen=a(f.plotlinedashlen,5),z=b.plotLineDashGap=a(f.plotlinedashgap,4),D=!!a(f.drawanchors,1),C=a(f.anchorstartangle,90),I=a(f.anchorradius,this.anchorRadius,3),K=Ha(d(f.anchorbordercolor,r)),T=a(f.anchorborderthickness,this.anchorBorderThickness,1),A=Ha(d(f.anchorbgcolor,
A.getColor("anchorBgColor"))),M=d(f.anchoralpha,"0"),H=d(f.anchorbgalpha,M),J,R,$,Q,S,U,W,L,Y,Sa,ba,aa,G,ea=!1,ga=-Infinity,O=Infinity,ha=-Infinity,da=Infinity,ka=v.graphics.mapSymbolName;b.parentYAxis=0;b.toolText=F(Z(d(c.tooltext,f.plottooltext)));b.name=F(c.seriesname);b.showTooltip=d(f.showtooltip,1);switch(l){case pa:b.plotType=pa;break;case Aa:b.plotType=Aa;break;default:b.plotType=xa,b.showErrorValue=!0,b.errorBarWidthPercent=0,ea=!0}b.animation={duration:200};J=d(f.maxcolwidth);b.maxColWidth=
Ca(a(J,50))||1;b.enableAnimation=J=a(f.animation,f.defaultanimation,1);b.animation=J?{duration:1E3*a(f.animationduration,1)}:!1;b.lineAlpha=d(f.plotlinealpha,"100");J=N(a(f.plotspacepercent,20)%100,0);b.plotSpacePercent=b.groupPadding=J/200;ba=this.components.data=this.components.data||(this.components.data=[]);b.valuePadding=a(c.valuepadding,f.valuepadding,2);b.plotBorderThickness=w;for(J=0;J<s;J+=1)if(aa=h[J],(R=ba[J])||(R=ba[J]={}),!R.config&&(R.config={}),!R.graphics&&(R.graphics={}),G=R.config,
aa&&!aa.vline){G.setLink=d(aa.link);R=G.open=m.getCleanValue(aa.open);Q=G.close=m.getCleanValue(aa.close);S=G.high=m.getCleanValue(aa.high);U=G.low=m.getCleanValue(aa.low);W=G.volume=m.getCleanValue(aa.volume,!0);null!==W&&(g.config.drawVolume=!0);W=G.x=m.getCleanValue(aa.x);G.openVal=ea?Ca(Q-R):R;Y=G.closeVal=E(R,Q);Sa=G.yVal=N(R,Q);p=l===pa?1:0;$=E(R,Q,S,U);L=N(R,Q,S,U);Z(F(aa.valuetext,u));q=Ha(d(aa.bordercolor,Q<R?e:r));n=d(aa.alpha,p?b.lineAlpha:"100");k=Ha(d(aa.color,Q<R?t:x));p=Boolean(a(aa.dashed))?
ua(y,z):"none";G.dashStyle=p;p={opacity:n/100};G.color=ea?k:q;G.alpha=n;G.setColor=G.color;G.setAlpha=G.alpha;G.anchorImageUrl=d(aa.anchorimageurl,c.anchorimageurl,f.anchorimageurl);q=G.borderColor=q;G.borderAlpha=G.plotLineAlpha;G.colorArr=[{color:G.color,alpha:G.alpha},{color:G.borderColor,alpha:G.borderAlpha}];G.anchorSides=a(aa.anchorsides,c.anchorsides,f.anchorsides);G.symbol=ka(G.anchorSides).split("_");G.anchorProps={enabled:D,bgColor:A,symbol:G.symbol,bgAlpha:H*M/100+u,borderColor:K,borderAlpha:M,
borderThickness:T,imageUrl:G.anchorImageUrl,radius:I,imageScale:a(aa.imagescale,c.imagescale,f.imagescale,100),imagePadding:a(aa.anchorimagepadding,c.anchorimagepadding,f.anchorimagepadding,1),imageAlpha:a(c.anchorimagealpha,f.anchorimagealpha,100),startAngle:C};G.showValue=1;G.hoverEffects={};switch(b.plotType){case pa:G.y=Q;G.link=d(aa.link);break;case xa:G.y=Ca(Q-R);G.previousY=Y;G.link=d(aa.link);G.errorValue=[];0<S-Sa&&G.errorValue.push({errorValue:S-Sa,errorStartValue:Sa,errorBarColor:q,errorBarThickness:w,
opacity:1});0>U-Y&&G.errorValue.push({errorValue:U-Y,errorStartValue:Y,errorBarColor:q,errorBarThickness:w,opacity:1});break;default:G.y=R,G.previousY=Q,G.link=d(aa.link)}G.setValue=G.y;null!==$&&(!ga&&0!==ga&&(ga=$),!O&&0!==O&&(O=$),ga=N(ga,$),O=E(O,$));null!==L&&(!ga&&(ga=L),!O&&(O=L),ga=N(ga,L),O=E(O,L));null!==W&&(ha=N(ha,W),da=E(da,W));$=this._parseToolText(J);G.toolText=$;G.toolTipValue=u;W=W?W:J+1;G.x=W;G.displayValue=Z(d(aa.displayvalue,aa.valuetext,u));G.high=N(R,Q,S,U);G.low=E(R,Q,S,U);
G.shadow=p}b.yMax=ga;b.yMin=O;b.xMax=ha;b.xMin=da}},_parseToolText:function(b){var a=this.config,e=this.chart,c=e.jsonData.chart,h=a.plotType===pa?1:0,f=this.JSONData.data[b],s=this.components.data[b].config,e=e.components.xAxis[0].getLabel(s.x).label;b=s.open;var l=s.close,m=this.yAxis,k=s.high,n=s.low,s=s.volume,q=void 0!==s?f.volumetooltext:void 0;a.showTooltip?(a=F(Z(d(q,f.tooltext,a.volumeToolText,a.toolText))),void 0!==a?a=Ba(a,[3,5,6,10,54,55,56,57,58,59,60,61,81,82],{label:e,yaxisName:Z(c.yaxisname),
xaxisName:Z(c.xaxisname),openValue:f.open,openDataValue:m.dataLabels(b),closeValue:f.close,closeDataValue:m.dataLabels(l),highValue:f.high,highDataValue:m.dataLabels(k),lowValue:f.low,lowDataValue:m.dataLabels(n),volumeValue:f.volume,volumeDataValue:m.dataLabels(s)},f,c):(a=null===b||h?u:"<b>Open:</b> "+m.dataLabels(b)+"<br />",a+=null!==l?"<b>Close:</b> "+m.dataLabels(l)+"<br />":u,a+=null===k||h?u:"<b>High:</b> "+m.dataLabels(k)+"<br />",a+=null===n||h?u:"<b>Low:</b> "+m.dataLabels(n)+"<br />",
a+=null!==s?"<b>Volume:</b> "+m.dataLabels(s):u)):a=u;return a},init:function(b,a){var e=this.chart;this.yAxis=a===Ia?e.components.yAxis[1]:e.components.yAxis[0];this.components={};this.graphics={};this.JSONData=b;this.visible=1;this.plotType=a;this.configure()},_configureVolume:function(){var b=this.config,g=this.chart,e=this.JSONData,c=e.data||[],h=g.jsonData.chart,f=c.length,s=g.components.colorManager,l,m,k,n,q,p,t=b.bearBorderColor=Ha(d(h.bearbordercolor,ja)),r=b.bearFillColor=Ha(d(h.bearfillcolor,
ja)),s=b.bullBorderColor=Ha(d(h.bullbordercolor,s.getColor("canvasBorderColor"))),x=b.bullFillColor=Ha(d(h.bullfillcolor,"FFFFFF")),w=a(h.showvplotborder,1)?a(h.vplotborderthickness,1):0,y=b.plotLineDashLen=a(h.plotlinedashlen,5),D=b.plotLineDashGap=a(h.plotlinedashgap,4),z,X=this.yAxis,C=-Infinity,I=Infinity,K=-Infinity,T=Infinity;q=g.components.vNumberFormatter;b.plotType=xa;b.parentYAxis=1;b.volumeToolText=F(Z(d(e.volumetooltext,h.volumetooltext,h.plottooltext)));b.name=F(e.seriesname);b.showTooltip=
d(h.showtooltip,1);b.enableAnimation=e=a(h.animation,h.defaultanimation,1);b.animation=e?{duration:1E3*a(h.animationduration,1)}:!1;e=d(h.maxcolwidth);b.maxColWidth=Ca(a(e,50))||1;e=N(a(h.plotspacepercent,20)%100,0);b.plotSpacePercent=b.groupPadding=e/200;b.plotBorderThickness=w;e=this.components.data=this.components.data||(this.components.data=[]);h=W(W({},h),{forcedecimals:la(h.forcevdecimals,h.forcedecimals),forceyaxisvaluedecimals:la(h.forcevyaxisvaluedecimals,h.forceyaxisvaluedecimals),yaxisvaluedecimals:la(h.vyaxisvaluedecimals,
h.yaxisvaluedecimals),formatnumber:la(h.vformatnumber,h.formatnumber),formatnumberscale:la(h.vformatnumberscale,h.formatnumberscale),defaultnumberscale:la(h.vdefaultnumberscale,h.defaultnumberscale),numberscaleunit:la(h.vnumberscaleunit,h.numberscaleunit),vnumberscalevalue:la(h.vnumberscalevalue,h.numberscalevalue),scalerecursively:la(h.vscalerecursively,h.scalerecursively),maxscalerecursion:la(h.vmaxscalerecursion,h.maxscalerecursion),scaleseparator:la(h.vscaleseparator,h.scaleseparator),numberprefix:la(h.vnumberprefix,
h.numberprefix),numbersuffix:la(h.vnumbersuffix,h.numbersuffix),decimals:la(h.vdecimals,h.decimals)});q?q.configure(h):q=g.components.vNumberFormatter=new v.NumberFormatter(g,h);X.setNumberFormatter(q);for(g=0;g<f;g+=1)q=c[g],(h=e[g])||(h=e[g]={}),!h.config&&(h.config={}),!h.graphics&&(h.graphics={}),z=h.config,q&&!q.vline&&(n=z.open=X.getCleanValue(q.open),l=z.close=X.getCleanValue(q.close),z.high=X.getCleanValue(q.high),z.low=X.getCleanValue(q.low),p=z.volume=X.getCleanValue(q.volume,!0),h=z.x=
X.getCleanValue(q.x),z.openVal=Ca(l-n),z.closeVal=E(n,l),C=N(C,p),I=E(I,p),K=N(K,h),T=E(T,h),Z(F(q.valuetext,u)),m=Ha(d(q.bordercolor,l<n?t:s)),k=d(q.alpha,"100"),l=Ha(d(q.color,l<n?r:x)),z.dashStyle=Boolean(a(q.dashed))?ua(y,D):"none",n={opacity:k/100},z.color=l,z.alpha=k,z.setLink=q.link,z.borderWidth=w,z.borderColor=m,z.borderAlpha=d(z.plotLineAlpha,k),z.y=p,z.colorArr=[{color:z.color,alpha:z.alpha},{color:z.borderColor,alpha:z.borderAlpha}],z.setValue=z.y,q=this._parseToolText(g),z.toolText=q,
z.toolTipValue=u,h=h?h:g+1,z.x=h,z.shadow=n);b.yMax=C;b.yMin=I;b.xMax=K;b.xMin=T},draw:function(){var b=this.config,a=b.plotType;a===pa?this.__base__.draw.call(this):a===xa?(this._drawColumn(),b.showErrorValue&&this._drawErrorValue()):this._drawCandlestickBar();this.drawn=!0},_drawColumn:function(){var b=this,g=b.JSONData,e=b.chart,c=b.chart.jsonData.chart,h=b.config,f=b.index,s=g.data,l=s&&s.length,m,k,n=b.visible,q=e.components.paper,t=e.components.xAxis[0],r=b.yAxis,w,y,D=e.graphics,qa=v.parseUnsafeString,
F=v.getValidValue,z=v.Raphael,X=h.showTooltip,C=e.get("config","animationObj"),N=C.duration,I=C.dummyObj,K=C.animObj,T=t.getPVR(),H=h.plotSpacePercent,J=h.maxColWidth,T=(1-.01*h.definedGroupPadding)*T||E(T*(1-2*H),1*J),H=T/2,T=T/1,J=E(T-1,0),H=0*T-H+J/2,R,J=b.components.data,M,Q,S,U,W,L,Y,$=r.getAxisBase(),Z=r.yBasePos=r.getAxisPosition($),aa=h.plotBorderThickness,G=h.plotRadius||0,ba=b.graphics.container,ea=b.graphics.trackerContainer,O=b.graphics.shadowContainer,ha=D.trackerGroup,ga,ka,da=!e.config.plotAnimDone,
ia=b.components.removeDataArr||[],ma=ia.length,pa=FusionCharts.get("component",["dataset",xa]).prototype.drawLabel,la=function(){var a=b.graphics.errorGroupContainer;a&&a.show();e._animCallBack()};M=D.datasetGroup;var D=function(b){za.call(this,e,b)},va=b.components.pool||[];ba||(ba=b.graphics.container=q.group("columns",M),n||ba.hide());ea||(ea=b.graphics.trackerContainer=q.group("col-hot",ha),n||ea.hide());O||(O=b.graphics.shadowContainer=q.group("shadow",M).toBack(),n||O.hide());ha=T;h.columnWidth=
T;for(h=0;h<l;h++)if(m=s[h],Y=(M=J[h])&&M.config,U=Y.setLink,k=Y.y,w=a(Y.x,h),S=Y.colorArr,null!==k){U=Y.setLink;M.graphics||(J[h].graphics={});L=b.index+"_"+h;Q=Y.displayValue;F(qa(d(m.tooltext,g.plottooltext,c.plottooltext)));m=Y.previousY;y=r.getAxisPosition(m||$);m=r.getAxisPosition(k+(m||0));w=t.getAxisPosition(w)+H;y=Ca(m-y);y=z.crispBound(w,m,ha,y,aa);w=y.x;m=y.y;ha=y.width;y=y.height||1;R=Y.toolText;ga=Y.dashStyle;W=Y.eventArgs;W||(W=Y.eventArgs={});W.index=h;W.link=U;W.value=k;W.displayValue=
Q;W.categoryLabel=t.getLabel(h).label;W.toolText=R;W.id=u;W.datasetIndex=f;W.datasetName=g.seriesname;W.visible=n;M._xPos=w;M._yPos=m;M._height=y;M._width=T;Q=M.graphics.element;ka=!1;Q||(va.element&&va.element.length?Q=M.graphics.element=va.element.shift():(Q=M.graphics.element=q.rect(ba),ka=!0,N&&Q.attr({x:w,y:Z,width:ha,height:0})));k=Y._elemPositions;k||(k=Y._elemPositions={});k.x=w;k.y=m;k.width=ha;k.height=y;Q.show().animateWith(I,K,k,N,C.animType,da&&la);k=Y._elemCosmetics;k||(k=Y._elemCosmetics=
{});k.r=G;k.ishot=!X;k.fill=x(S[0]);k.stroke=x(S[1]);k["stroke-width"]=aa;k["stroke-dasharray"]=ga;k["stroke-linejoin"]="miter";k.visibility=n;Q.attr(k).shadow(Y.shadow,O);e.config.plotAnimDone=!0;S=M.graphics.hotElement;if(U||X)y<Pa&&(m-=(Pa-y)/2,y=Pa),k=Y._hotElemAttrs,k||(k=Y._hotElemAttrs={}),k.x=w,k.y=m,k.width=ha,k.height=y,k.r=G,k.cursor=U?"pointer":u,k.stroke=p,k["stroke-width"]=aa,k.fill=p,k.ishot=!0,k.visibility=n,S=M.graphics.hotElement,S||(va.hotElement&&va.hotElement.length?S=M.graphics.hotElement=
va.hotElement.shift():(S=M.graphics.hotElement=q.rect(ea),ka=!0)),S.data("x",w+ha/2),S.attr(k);(S||Q).data("eventArgs",W).data("groupId",L).tooltip(R);ka&&(S||Q).click(D).mouseover(b.rolloverResponseSetter(M,e)).mouseout(b.rolloutResponseSetter(M,e))}b._drawTracker();pa.call(b,0,J.length);for(h=0;h<ma;h++)if(M=ia[0])b._removeDataVisuals(M.graphics),ia.shift()},rolloverResponseSetter:function(b,a){return function(e){a.graphics.rollOverBand.transform("t"+(b._xPos+(b._width||0)/2)+",0").show();za.call(this,
a,e,"DataPlotRollOver")}},rolloutResponseSetter:function(b,a){return function(b){a.graphics.rollOverBand.hide();za.call(this,a,b,"DataPlotRollOut")}},_drawTracker:function(){var b=this.chart,a=b.components,e=a.paper,c=b.graphics.datasetGroup,d=b.graphics.rollOverBand,f=a.canvas.config,s=a.canvasVolume.config,a=this.config.columnWidth,l=b.config.rollOverBandColor,f=["M",0,f.canvasTop,"L",0,f.canvasBottom,"M",0,s.canvasTop-s.canvasBorderWidth,"L",0,s.canvasTop+s.canvasHeight+s.canvasBorderWidth/2];
d||(d=b.graphics.rollOverBand=e.path(c));d.transform(u);d.attr({path:f,"stroke-width":a,ishot:!0,stroke:l,"stroke-linecap":"butt"});d.data("width",a);d.toBack();d.hide()},_removeDataVisuals:function(b){var a=this.components.pool||(this.components.pool={}),e,c,d,f,s;b.graphics&&(b=b.graphics);for(c in b){e=a[c]||(a[c]=[]);d=b[c];if(d instanceof Array)for(f=0,s=d.length;f<s;f++)this._removeDataVisuals(d[f]);else d.hide&&"function"===typeof d.hide&&d.hide();e.push(b[c])}},_drawCandlestickBar:function(){var b=
this.chart,g=b.components,e,c=this.config,d=this.components.data,f=d.length,s=g.xAxis[0],l=this.yAxis,m=b.graphics,g=g.paper,k=c.numColumns||1,n=c.columnPosition||0,q=s.getPVR(),p=c.groupPadding,t=c.maxColWidth,q=(1-.01*c.plotspacepercent)*q||E(q*(1-2*p),t*k),k=q/k*n-q/2,m=m.datasetGroup,r,v,w,y,D,n=b.get("config","animationObj")||{},q=n.duration,p=n.dummyObj,t=n.animObj,z=this.graphics.container,X=this.components.pool||{},C=function(){b._animCallBack()},F=!b.config.plotAnimDone;e=this.visible;var N,
I,K,H=this.components.removeDataArr||[],J=H.lengt,R;z||(z=this.graphics.container=g.group("columns",m),e||z.hide());for(r=0;r<f;r+=1)v=d[r],e=v.config,R=v.graphics,y=e.y,w=null,null===y?w=R.element:(w=a(e.x,r),v=e.link,w=s.getAxisPosition(w),D=e.previousY,D=l.getAxisPosition(D),y=l.getAxisPosition(y),N=l.getAxisPosition(e.high),I=l.getAxisPosition(e.low),Ca(y-D),K=k,D=["M",w,I,"L",w,N,"M",w,y,"L",w+K,y,"M",w,D,"L",w-K,D],w=R.element,w||(X.element&&X.element.length?R.element=g.path(m):w=R.element=
g.path(D,z)),w.show().animateWith(p,t,{path:D},q,n.animType,F&&C),b.config.plotAnimDone=!0,w.attr({fill:x(e.color),stroke:x(e.borderColor),"stroke-width":c.lineThickness,"stroke-dasharray":e.dashStyle,"stroke-linecap":"round","stroke-linejoin":"round","shape-rendering":"crisp",cursor:v?"pointer":u,visibility:"visible"}).shadow(e.shadow));for(r=0;r<J;r++)this._removeDataVisuals(H.shift())},_drawErrorValue:function(){var b=this.config,a=this.JSONData.data,a=a&&a.length,e,c=this.visible,d=this.chart,
f=d.linkedItems,s=d.components.paper,l=d.components.yAxis[0],m=this.components.data,k,n=b.errorBarWidthPercent,q,t=d.graphics;e=t.datasetGroup;var b=b.showTooltip,r=this.graphics.errorGroupContainer,v=this.graphics.errorTrackerContainer,w=t.trackerGroup,x,y,E,z,D,C,F,N,I,t=d.get("config","animationObj"),K=t.duration,H=t.dummyObj,J=t.animObj,R,T,Q,S,U;E=this.drawn;var M,L,Y,W=function(b){za.call(this,d,b)},$=function(b){za.call(this,d,b,"DataPlotRollOver")},aa=function(b){za.call(this,d,b,"DataPlotRollOut")},
G=function(b){return function(){void 0!==b&&f.linkClickFN.call({link:b},d)}},Z=this.components.pool||[],ea;r||(r=this.graphics.errorGroupContainer=s.group("errorBar",e),c||r.hide());v||(v=this.graphics.errorTrackerContainer=s.group("error-hot",w).toBack(),c||v.hide());c&&(r.show(),v.show());K&&!E&&r.hide();for(e=0;e<a;e++)if(D=(E=m[e])&&E.config,z=D.y,w=D.setLink,R=D.errorValue,T=R.length,M=D.toolText,!E.graphics.error&&(E.graphics.error=[]),null!==z){w=D.setLink;z=0>z;x=E._xPos;y=E._yPos;D=E._width;
ea=E._height;y+=ea;x+=D/2;q=E.graphics.error;S=q.length;Y=!1;if(S>T)for(L=T;L<S;L++)U=q.pop(),this._removeDataVisuals(U);for(;T--;)(L=E.graphics.error[T])||(L=E.graphics.error[T]={}),U=L.errorTrackerElem,S=L.errorLineElem,k=R[T],C=k.errorValue,F=k.errorStartValue,q=k.errorBarColor,k=k.errorBarThickness,N=isNaN(F)?y:l.getAxisPosition(F),Q=n/100*D,Q/=2,I=l.getAxisPosition((ba(F)?F:void 0)+C),z&&(I+=ea),C=I,F=x,C=ga(I)+k%2/2,F=ga(x)+k%2/2,N=["M",F,N,"V",C,"M",F-Q,C,"H",F+Q],C=E.graphics.hotElement||
E.graphics.element,Q=C.data("groupId"),S||(Z.errorLineElem&&Z.errorLineElem.length?S=L.errorLineElem=Z.errorLineElem.shift():(S=L.errorLineElem=s.path(r),Y=!0)),S.show().animateWith(H,J,{path:N},K,t.animType),S.attr({stroke:q,ishot:!b,"stroke-width":k,cursor:w?"pointer":u,"stroke-linecap":"round"}),(w||b)&&k<Pa&&(U=L.errorTrackerElem,U||(Z.errorTrackerElem&&Z.errorTrackerElem.length?U=L.errorTrackerElem=Z.errorTrackerElem.shift():(U=L.errorTrackerElem=s.path(v),Y=!0)),U.attr({path:N,stroke:p,"stroke-width":Pa,
cursor:w?"pointer":u,ishot:!!w,visibility:c}).data("groupId",Q).tooltip(M),U.data("eventArgs",C&&C.data("eventArgs")||{})),Y&&((U||S).click(W).hover($,aa),(w||b)&&U.click(G(w)))}},getDataLimits:function(){var b=this.config;return{max:b.yMax,min:b.yMin,xMax:b.xMax,xMin:b.xMin}},removeData:function(b,a){var e=this.components,c=e.data,d=e.removeDataArr||(e.removeDataArr=[]);e.removeDataArr=d.concat(c.splice(b||0,a||1))}},pa]);FusionCharts.register("component",["dataset","Trendset",{configure:function(){var b=
this.chart,g=b.jsonData.chart,e=this.JSONData,c=this.index,h=e.data||e.set||[],f=this.config,s,l=this.components.data,m,k=-Infinity,n=Infinity,q,p=-Infinity,t=Infinity,b=b.components.numberFormatter,c=Ha(d(e.color,g.trendsetcolor,"666666"));m=d(e.alpha,g.trendsetalpha,"100");q=a(e.thickness,g.trendsetthickness,2);s=Boolean(a(e.dashed,g.trendsetdashed,0));var r=a(e.dashlen,g.trendsetdashlen,4),u=a(e.dashgap,g.trendsetdashgap,4);f.includeInLegend=a(e.includeinlegend,1);f.lineColor=c;f.lineAlpha=m;f.connectNullData=
a(g.connectnulldata,0);f.lineThickness=q;f.lineDashStyle=s?ua(r,u):"none";f.name=F(e.name);f.includeInLegend=a(e.includeinlegend,1);l||(l=this.components.data=[]);c=0;for(q=h.length;c<q;c+=1)(s=h[c])&&!s.vline&&(e=l[c]=l[c]||(l[c]={}),m=e.config=e.config||(e.config={}),g=m.setValue=b.getCleanValue(s.value),s=b.getCleanValue(s.x),s=m.x=null!==s?s:c+1,k=N(k,g),n=E(n,g),t=E(t,s),p=N(p,s),e.graphics||(e.graphics={}));f.max=k;f.min=n;f.xMax=p;f.xMin=t;this._addLegend()},_addLegend:function(){var b=this.JSONData,
a=this.config,e=this.chart.components.legend,b={enabled:a.includeInLegend,interactiveLegend:!1,type:this.type,drawLine:!0,strokeColor:x({color:a.lineColor,alpha:"100"}),label:la(b.name)};this.legendItemId=e.addItems(this,this.legendInteractivity,b)},legendInteractivity:function(){},draw:function(){var b=this.chart,a=b.components,e=this.config,c=b.config,d=a.canvas.config.clip,f=this.components.data.length,s=a.paper,l=a.xAxis[0],m=this.yAxis,k,n,q=b.graphics,p=b.get("config","animationObj"),a=p.duration,
t=p.dummyObj,r=p.animObj,p=p.animType,u=this.components.data,v,c=c.style;v={fontFamily:c.fontFamily,fontSize:c.fontSize,lineHeight:c.lineHeight,fontWeight:c.fontWeight,fontStyle:c.fontStyle,color:c.color};var c=e.lineThickness,w=this.graphics.container,y=q.datasetGroup,q=e.shadow,z=function(){y.line.attr({"clip-rect":null});w.lineShadowGroup.show()},E=d["clip-canvas"].slice(0),d=d["clip-canvas-init"].slice(0),C=e.lineDashStyle,e={color:e.lineColor,alpha:e.lineAlpha},D=!1,F=this.graphics.lineElement,
N=this.visible;y.line=y.line||s.group(pa,y);y.lineConnector=y.lineConnector||s.group("line-connector",y);w||(w=this.graphics.container={lineShadowGroup:s.group("connector-shadow",y.line),lineGroup:s.group(pa,y.line)},N||(w.lineShadowGroup.hide(),w.lineGroup.hide()));b._addCSSDefinition(".fusioncharts-datalabels .fusioncharts-label",v);for(b=0;b<f;b++)v=u[b],k=v.config,n=k.setValue,k=k.x,k=l.getAxisPosition(k),n=m.getAxisPosition(n),v._xPos=k,v._yPos=n;f=this.getLinePath(u,{}).getPathArr();F||(F=this.graphics.lineElement=
s.path(w.lineGroup),D=!0);F.show().animateWith(t,r,{path:f},a,p);F.attr({"stroke-dasharray":C,"stroke-width":c,stroke:x(e),"stroke-linecap":"round","stroke-linejoin":2<=c?"round":"miter"}).shadow(q,w.lineShadowGroup);a&&N&&D&&(w.lineShadowGroup.hide(),y.line.attr({"clip-rect":d}).animateWith(t,r,{"clip-rect":E},a,p,z))},getDataLimits:function(){var b=this.config;return{max:b.max,min:b.min,xMax:b.xMax,xMin:b.xMin}}},pa]);M("kagi",{standaloneInit:!0,friendlyName:"Kagi Chart",creditLabel:n,defaultDatasetType:"kagi",
applicableDSList:{kagi:!0},singleseries:!0,hasLegend:!1,_postSpaceManagement:function(){var b=this.config,d=this.components,e=d.xAxis&&d.xAxis[0],c=d.yAxis&&d.yAxis[0],h=d.canvas.config,f=h.canvasBorderWidth,s=h.canvasPadding||15,l=h.canvasPaddingTop,h=h.canvasPaddingBottom,m=this.jsonData.chart,k=(d=d.dataset[0].config)&&d.shiftCount,n=a(e.getAxisData("axisMinValue"),0),q=a(e.getAxisData("axisMaxValue"),k-1),p=this.config.canvasWidth;E(a(m.canvaspadding,0),p/2-10);var m=a(m.maxhshiftpercent,10),
p=p-2*s,t;c&&c.setAxisDimention({x:b.canvasLeft-f,y:b.canvasTop+l,opposite:b.canvasRight+f,axisLength:b.canvasHeight-l-h});this._setPosition();d&&(t=d.xShiftLength=E(p/k,(0>=m?10:m)*p/100),N(k-1,1),q=N(q,1));this._adjustCanvasPadding();e&&e.setAxisDimention({x:this.config.canvasLeft+s+t/2,axisLength:t*(q-n),y:b.canvasBottom+(b.shift||0)+f,opposite:b.canvasTop-f})},_setPosition:function(){var b,a,e,c,h,f,s;b=this.components;c=this.jsonData;var l=b.dataset[0],m=c.data||l&&l[0]&&l[0].data,k=(l=l.components.data)&&
l.length,n=b.yAxis[0],q=0,p=q,t=[];for(b=0;b<k;b++)a=l[b].config,e=a.setValue,(c=l[b])||(l[b]={graphics:{}}),a.isDefined||(e=a.plotValue),e=d(a.plotValue,e),a.plotY=ya(n.getAxisPosition(a.setValue),2),a.graphY=ya(n.getAxisPosition(e),2),a.plotX=p,a.isShift?(p=q+=1,m&&t.push(m[b])):b===k-1&&m&&t.push(m[b]),b&&(s=l[b-1].config,c=a&&a.objParams&&a.objParams.isRally,e=a&&a.objParams&&a.objParams.lastHigh,h=a&&a.objParams&&a.objParams.lastLow,f=a&&a.objParams&&a.objParams.isRallyInitialised,s&&f&&s.isRally!==
a.isRally?(a.isChanged=!0,a.ty=ya(n.getAxisPosition(c?e:h),2)):a.isChanged=!1)},_setAxisLimits:function(){var b=this.components,a=b.dataset,e=b.yAxis,b=b.xAxis,c,d=a.length,f,s=-Infinity,l=Infinity,m=Infinity,k=-Infinity,n,q={},p=[],t=function(b){s=N(s,b.max);l=E(l,b.min);k=N(k,b.xMax||-Infinity);m=E(m,b.xMin||Infinity)};for(f=0;f<d;f++)c=a[f],(n=c.groupManager)?q[c.type]=n:p.push(c);for(n in q)a=q[n].getDataLimits(),t(a);d=p.length;for(f=0;f<d;f++)a=p[f].getDataLimits(),t(a);-Infinity===s&&(s=0);
Infinity===l&&(l=0);this.config.yMax=s;this.config.yMin=l;e[0].setAxisData({setAdaptiveMin:!0});e[0].setDataLimit(s,l);if(-Infinity!==k||Infinity!==m)b[0].config.xaxisrange={max:k,min:m},b[0].setDataLimit(k,m)}},M.waterfall2d);v.BoxAndWhiskerStatisticalCalc=k=function(b,a,e){this.nf=a;this.dataSeparator=e;this.method=(b||y).toLowerCase().replace(/\s/g,u)};k.prototype={setArray:function(b){var a=this.nf,e=this.dataSeparator,c=0;!b&&(b=y);for(b=this.dataLength=(e=b.replace(/\s/g,y).split(e))&&e.length;b--;)c+=
e[b]=a.getCleanValue(e[b]);e&&e.sort(function(b,a){return b-a});this.values=e;this.mean=c/this.dataLength;this.getFrequencies()},getQuartiles:function(){var b=this.values,a=this.dataLength,e=a%2,c,d;switch(this.method){case "tukey":e?(e=(a+3)/4,a=(3*a+1)/4):(e=(a+2)/4,a=(3*a+2)/4);break;case "mooremccabe":e?(e=(a+1)/4,a=3*e):(e=(a+2)/4,a=(3*a+2)/4);break;case "freundperles":e=(a+3)/4;a=(3*a+1)/4;break;case "mendenhallsincich":e=ga((a+1)/4);a=ga(3*e);break;default:e=(a+1)/4,a=3*e}--e;--a;c=Vb(e);d=
Vb(a);e=e-c?b[c]+(b[cc(e)]-b[c])*(e-c):b[e];b=a-d?b[d]+(b[cc(a)]-b[d])*(a-d):b[a];return this.quartiles={q1:e,q3:b}},getMinMax:function(){var b=this.values;return{min:b[0],max:b[this.dataLength-1]}},getMean:function(){return this.mean},getMD:function(){for(var b=this.mean,a=this.frequencies,e=a.length,c,d=0;e--;)c=a[e],d+=c.frequency*Ca(c.value-b);return d/this.dataLength},getSD:function(){for(var b=this.mean,a=this.values,e=this.dataLength,c=e,d=0;e--;)d+=mc(a[e]-b,2);return lc(d)/c},getQD:function(){return.5*
(this.quartiles.q3-this.quartiles.q1)},getFrequencies:function(){var b=[],a=this.dataLength,e=this.values,c=0,d,f,s;for(s=0;s<a;s+=1)c+=d=e[s],ba(b[s])?b[s].frequency+=1:(f={},f.value=d,f.frequency=1,b[s]=f);this.sum=c;this.frequencies=b},getMedian:function(){var b=this.dataLength,a=.5*b,e=this.values;return 0===b%2?(e[a]+e[a-1])/2:e[Vb(a)]}};k.prototype.constructor=k;ta&&ta({plotborderdashlen:{type:ia,pAttr:"plotborderdashlen"},plotborderdashgap:{type:ia,pAttr:"plotborderdashgap"},plotfillalpha:{pAttr:"plotfillalpha"},
useroundedges:{type:ia,pAttr:"useroundedges"},ratio:{pAttr:"plotfillratio"},plotfillratio:{pAttr:"plotfillratio"},showvalues:{type:ia,pAttr:"showvalues"},valuepadding:{type:ia,pAttr:"valuepadding"},maxcolwidth:{type:ia,pAttr:"maxcolwidth"},rotatevalues:{type:ia,pAttr:"rotatevalues"},use3dlighting:{type:ia,pAttr:"use3dlighting"},whiskerslimitswidthratio:{type:ia,pAttr:"whiskerslimitswidthratio"},outliersupperrangeratio:{type:ia,pAttr:"outliersupperrangeratio"},outlierslowerrangeratio:{type:ia,pAttr:"outlierslowerrangeratio"},
showalloutliers:{type:ia,pAttr:"showalloutliers"},showmean:{type:ia,pAttr:"showmean"},showsd:{type:ia,pAttr:"showsd"},showmd:{type:ia,pAttr:"showmd"},showqd:{type:ia,pAttr:"showqd"},showminvalues:{type:ia,pAttr:"showminvalues"},showmaxvalues:{type:ia,pAttr:"showmaxvalues"},showq1values:{type:ia,pAttr:"showq1values"},showq3values:{type:ia,pAttr:"showq3values"},showmedianvalues:{type:ia,pAttr:"showmedianvalues"}});M("boxandwhisker2d",{friendlyName:"Box and Whisker Chart",standaloneInit:!0,creditLabel:n,
chart:M.errorbar2d.chart,drawErrorValue:M.errorbar2d.drawErrorValue,decimals:2,maxColWidth:Infinity,useErrorAnimation:1,avoidCrispError:0,tooltipsepchar:": ",defaultDatasetType:"boxandwhisker2d",applicableDSList:{boxandwhisker2d:!0},fireGroupEvent:!0,fireInitialAnimation:!0,_drawDataset:function(){var b=this.components.dataset,a,e=b.length,c,d,f={};for(c=0;c<e;c++)a=b[c],d=a.groupManager,f[a.type]=d;for(d in f)f[d].draw();b.flag=!0;for(c=0;c<e;c++)for(b[c].components.mean&&b[c].components.mean.draw(),
b[c].components.sd&&b[c].components.sd.draw(),b[c].components.md&&b[c].components.md.draw(),b[c].components.qd&&b[c].components.qd.draw(),d=b[c].config.maxNumberOfOutliers||b[c].components.outliers.length,a=0;a<d;a++)b[c].config.showOutliersLegend||(b[c].components.outliers[a].visible=!1),b[c].components.outliers&&b[c].components.outliers[a].draw()},_createDatasets:function(){var b=this.components,a=b.xAxis[0],e=this.jsonData,c=e.dataset,h=c&&c.length,f,s,l,m=this.defaultDatasetType,k=this.applicableDSList,
n=this.components.legend;f=n.components.items||[];var q,p,t,r,v=this.isStacked,w,x,y=[],z=this.isRealTime,E=this.config.catLen,C={};c||this.setChartMessage();this.config.categories=e.categories&&e.categories[0].category;e=b.dataset||(b.dataset=[]);s=e.length;n.emptyItems(0,f.length);for(f=0;f<h;f++)if(r=c[f],r.seriesname&&(r.seriesname=Z(r.seriesname)),l=r.parentyaxis||u,p=(p=this.isDual&&"s"===l.toLowerCase()?d(r.renderas,this.sDefaultDatasetType):d(r.renderas,m))&&p.toLowerCase(),k[p]||(p=m),t=
FusionCharts.get("component",["dataset",p]))void 0===C[p]?C[p]=0:C[p]++,w="datasetGroup_"+p,l=FusionCharts.register("component",["datasetGroup",p]),(q=b[w])&&y.push(q),l&&!q&&(q=b[w]=new l,q.chart=this,q.init()),(l=e[f])?(p=a.getCategoryLen(),w=E-p,t=z?l.components:l.JSONData,x=t.data&&t.data.length||0,t=r.data&&r.data.length||0,x-=t,w>x||(w=x,p=t),0<w&&l.removeData(p,w,!1),e[f].JSONData=r,e[f].configure(),e[f]._deleteGridImages&&e[f]._deleteGridImages()):(l=new t,e.push(l),l.chart=this,l.index=f,
q&&(v?q.addDataSet(l,0,C[p]):q.addDataSet(l,C[p],0)),l.init(r));if(s>h){w=s-h;q&&v&&q.removeDataSet(0,f,w);b=f;for(h=w+f;b<h;b++)q&&!v&&q.removeDataSet(f,0,1),n.removeItem(e[b].legendItemId),K.call(e[b]);e.splice(f,w)}this.config.catLen=a.getCategoryLen()}},M.mscartesian,{showplotborder:1,plotborderdashlen:5,plotborderdashgap:4,plotfillalpha:La,useroundedges:0,plotborderthickness:1,showvalues:1,valuepadding:2,showtooltip:1,maxcolwidth:50,rotatevalues:0,use3dlighting:1,whiskerslimitswidthratio:40,
outliersupperrangeratio:0,outlierslowerrangeratio:0,showalloutliers:0,showmean:0,showsd:0,showmd:0,showqd:0,showminvalues:1,showmaxvalues:1,showq1values:0,showq3values:0,showmedianvalues:1});FusionCharts.register("component",["dataset","boxandwhisker2d",{type:"boxandwhisker2d",configure:function(){var b=this.chart,g=this.config,e=this.JSONData,c=e.data,h=b.config.categories,f=b.singleseries,s=b.config,l=E(h&&h.length,c&&c.length),m=b.jsonData.chart,k=b.components.colorManager,n=this.index||this.positionIndex,
q,p=g.plotColor=k.getPlotColor(n),t=a(e.dashed,m.plotborderdashed),r=a(m.useplotgradientcolor,1),w,y=v.parseUnsafeString,D=y(m.yaxisname),I=y(m.xaxisname),z=y(d(m.tooltipsepchar,": ")),X=v.parseTooltext,C,K,T,M,W,H,J,R,$,Q,S,U,Z,L,Y,ba,ga,aa,G,da,ia,O,ha,pa,ka,la,na,ma,ja,oa,va,ca,ta,za,ya,Aa,ua,Ia,xa,Ka,Ga,Ba,jc=v.getDashStyle,Ca=this.components.data,sa=b.components.numberFormatter,Da,kc,Qa,bc,ub,$a,Ta,Ra=0,Fa=0,Ja=v.BoxAndWhiskerStatisticalCalc,fb,Pa,ib,kb,vb,Ma,db,Wa,wb,Na,Oa,Xa,fa,Ua,Ea,gb,Db,
Ya,lb,Kb,wa,eb,rb,Yb,xb,yb,ab,mb=0,bb;this.visible=1===a(this.JSONData.visible,!Number(this.JSONData.initiallyhidden),1);this.__setDefaultConfig();Pb(e,g,s,{data:!0});g.includeInLegend=a(e.includeinlegend,1);g.legendSymbolColor=g.plotColor;q=g.showplotborder;J=g.plotborderdashlen;R=g.plotborderdashgap;Z=g.plotfillalpha;Q=g.useroundedges;L=g.ratio;$=g.plotborderthickness;Ya=g.showvalues;w=g.showtooltip;g.rotatevalues&&(g.rotatevalues=270);lb=g.showalloutliers;g.plotfillAngle=U=a(360-m.plotfillangle,
90);g.plotColor=p=d(e.color,p);g.plotRadius=a(m.useroundedges,Q?1:0);g.plotgradientcolor=Y=v.getDefinedColor(m.plotgradientcolor,k.getColor("plotGradientColor"));!r&&(Y=u);g.plotBorderAlpha=ba=q?d(m.plotborderalpha,Z,La):0;g.plotBorderColor=ga=d(m.plotbordercolor,k.getColor("plotBorderColor"));g.plotBorderDashStyle=aa=t?jc(J,R,$):"none";g.showShadow=Q?a(m.showshadow,1):a(m.showshadow,k.getColor("showShadow"));g.showHoverEffect=S=a(m.plothovereffect,m.showhovereffect,void 0);g.definedGroupPadding=
N(a(m.plotspacepercent),0);g.plotSpacePercent=N(a(m.plotspacepercent,20)%100,0);g.parentYAxis=Qa="s"===d(e.parentyaxis&&e.parentyaxis.toLowerCase(),"p")?1:0;g.dataSeparator=Xb;g.bwCalc=fb=new Ja(void 0,sa,g.dataSeparator);g.textDirection="1"===m.hasrtltext?"rtl":u;g.showMeanLegend=g.showSDLegend=g.showMDLegend=g.showQDLegend=g.showOutliersLegend=0;!this.components.data&&(this.components.data=[]);Ca=this.components.data;for(Ta=0;Ta<l;Ta++)if(G=c&&c[Ta],O=(ia=Ca[Ta])&&ia.config,ia||(ia=Ca[Ta]={graphics:{}}),
ia.config||(O=Ca[Ta].config={}),G.value){G.value&&(fb.setArray(G.value),Pa=fb.getQuartiles(),ib=Pa.q1,kb=Pa.q3,vb=fb.getMinMax(),O.min=Ma=vb.min,O.max=db=vb.max,Wa=fb.getMedian(),O.mean=wb=fb.getMean(),O.md=Na=fb.getMD(),O.sd=Oa=fb.getSD(),O.qd=Xa=fb.getQD());G.outliers&&(O.outliers=G.outliers.split(","),mb=N(mb,O.outliers.length));O.showMean=eb=a(G.showmean,g.showmean);O.showSD=rb=a(G.showsd,g.showsd);O.showMD=Yb=a(G.showmd,g.showmd);O.showQD=xb=a(G.showqd,g.showqd);G.outliers&&(g.showOutliersLegend=
1);eb&&(g.showMeanLegend=1);rb&&(g.showSDLegend=1);Yb&&(g.showMDLegend=1);xb&&(g.showQDLegend=1);O.upperQuartile={value:kb,color:ea(d(G.upperquartilecolor,e.upperquartilecolor,m.upperquartilecolor,m.plotbordercolor,k.getColor("plotBorderColor")),a(G.upperquartilealpha,e.upperquartilealpha,m.upperquartilealpha,m.plotborderalpha,100)),borderWidth:a(G.upperquartilethickness,e.upperquartilethickness,m.upperquartilethickness,m.plotborderthickness,Q?0:1),displayValue:sa.dataLabels(kb)};O.lowerQuartile=
{value:ib,color:ea(d(G.lowerquartilecolor,e.lowerquartilecolor,m.lowerquartilecolor,m.plotbordercolor,k.getColor("plotBorderColor")),a(G.lowerquartilealpha,e.lowerquartilealpha,m.lowerquartilealpha,m.plotborderalpha,100)),borderWidth:a(G.lowerquartilethickness,e.lowerquartilethickness,m.lowerquartilethickness,m.plotborderthickness,Q?0:1),displayValue:sa.dataLabels(ib)};O.upperBoxBorder={color:ea(d(G.upperboxbordercolor,e.upperboxbordercolor,m.upperboxbordercolor,m.plotbordercolor,k.getColor("plotBorderColor")),
a(G.upperboxborderalpha,e.upperboxborderalpha,m.upperboxborderalpha,m.plotborderalpha,100)),borderWidth:a(G.upperboxborderthickness,e.upperboxborderthickness,m.upperboxborderthickness,!Q&&m.plotborderthickness,Q?0:1)};O.lowerBoxBorder={color:ea(d(G.lowerboxbordercolor,e.lowerboxbordercolor,m.lowerboxbordercolor,m.plotbordercolor,k.getColor("plotBorderColor")),a(G.lowerboxborderalpha,e.lowerboxborderalpha,m.lowerboxborderalpha,m.plotborderalpha,100)),borderWidth:a(G.lowerboxborderthickness,e.lowerboxborderthickness,
m.lowerboxborderthickness,!Q&&m.plotborderthickness,Q?0:1)};O.median={value:Wa,color:ea(d(G.mediancolor,e.mediancolor,m.mediancolor,m.plotbordercolor,k.getColor("plotBorderColor")),a(G.medianalpha,e.medianalpha,m.medianalpha,m.plotborderalpha,100)),borderWidth:a(G.medianthickness,e.medianthickness,m.medianthickness,m.plotborderthickness,1),displayValue:sa.dataLabels(Wa)};g.upperBoxColor=fa=d(G.upperboxcolor,e.upperboxcolor,m.upperboxcolor,k.getPlotColor(2*n));Ua=g.upperBoxAlpha=d(G.upperboxalpha,
e.upperboxalpha,m.upperboxalpha,Z,La);g.lowerBoxColor=Ea=d(G.lowerboxcolor,e.lowerboxcolor,m.lowerboxcolor,k.getPlotColor(2*n+1));gb=g.lowerBoxAlpha=d(G.lowerboxalpha,e.lowerboxalpha,m.lowerboxalpha,Z,La);O.upperColorArr=v.graphics.getColumnColor(fa,Ua,void 0,void 0,Q,ga,ba.toString(),0,!1);O.lowerColorArr=v.graphics.getColumnColor(Ea,gb,void 0,void 0,Q,ga,ba.toString(),0,!1);O.showMinValues=Ya?a(G.showminvalues,g.showminvalues):0;O.showMaxValues=Ya?a(G.showmaxvalues,g.showmaxvalues):0;O.showQ1Values=
Ya?a(G.showq1values,g.showq1values):0;O.showQ3Values=Ya?a(G.showq3values,g.showq3values):0;O.showMedianValues=Ya?a(G.showmedianvalues,g.showmedianvalues):0;O.upperWhiskerAlpha=Db=Za(d(G.upperwhiskeralpha,e.upperwhiskeralpha,m.upperwhiskeralpha,m.plotborderalpha,100));O.upperWhiskerColor=ea(Ha(d(G.upperwhiskercolor,e.upperwhiskercolor,m.upperwhiskercolor,m.plotbordercolor,k.getColor("plotBorderColor"))),Db);O.upperWhiskerThickness=a(G.upperwhiskerthickness,e.upperwhiskerthickness,m.upperwhiskerthickness,
m.plotborderthickness,1);O.upperWhiskerShadowOpacity=g.showShadow?Db/250:0;O.lowerWhiskerAlpha=wa=Za(d(G.lowerwhiskeralpha,e.lowerwhiskeralpha,m.lowerwhiskeralpha,m.plotborderalpha,100));O.lowerWhiskerColor=ea(Ha(d(G.lowerwhiskercolor,e.lowerwhiskercolor,m.lowerwhiskercolor,m.plotbordercolor,k.getColor("plotBorderColor"))),wa);O.lowerWhiskerThickness=a(G.lowerwhiskerthickness,e.lowerwhiskerthickness,m.lowerwhiskerthickness,m.plotborderthickness,1);O.lowerWhiskerShadowOpacity=g.showShadow?wa/250:0;
O.showValue=a(G.showvalue,g.showvalues);O.setValue=da=sa.getCleanValue(G.value);O.setLink=d(G.link);O.toolTipValue=Da=sa.dataLabels(da,Qa);O.setDisplayValue=kc=y(G.displayvalue);O.displayValue=d(kc,Da);bc=a(G.dashed);ub=a(G.dashlen,J);$a=R=a(G.dashgap,R);Ra=N(Ra,db);Fa=E(Fa,Ma);if(lb&&G.outliers)for(bb=0;bb<O.outliers.length;bb++)Ra=N(Ra,O.outliers[bb]),Fa=E(Fa,O.outliers[bb]);O.plotBorderDashStyle=1===bc?jc(ub,$a,$):0===bc?"none":aa;f?(p=k.getPlotColor(Ta),p=d(G.color,p),L=d(G.ratio,g.ratio)):p=
d(G.color,g.plotColor);Z=d(G.alpha,g.plotfillalpha);0>da&&!Q&&(W=U,U=360-U);O.colorArr=v.graphics.getColumnColor(p+","+Y,Z,L,U,Q,ga,ba.toString(),0,!1);O.label=ha=F(y(d(h[Ta].tooltext,h[Ta].label)));0!==S&&(pa=d(G.upperboxhovercolor,e.upperboxhovercolor,m.upperboxhovercolor,fa),ka=d(G.upperboxhoveralpha,e.upperboxhoveralpha,m.upperboxhoveralpha,Ua),la=d(G.upperboxborderhovercolor,e.upperboxborderhovercolor,m.upperboxborderhovercolor,G.upperboxbordercolor,e.upperboxbordercolor,m.upperboxbordercolor,
m.plotbordercolor,k.getColor("plotBorderColor")),na=d(G.upperboxborderhoveralpha,e.upperboxborderhoveralpha,m.upperboxborderhoveralpha,G.upperboxborderalpha,e.upperboxborderalpha,m.upperboxborderalpha,m.plotborderalpha,100),ma=Q?0:d(G.upperboxborderhoverthickness,e.upperboxborderhoverthickness,m.upperboxborderhoverthickness,O.upperBoxBorder.borderWidth),ja=d(G.lowerboxhovercolor,e.lowerboxhovercolor,m.lowerboxhovercolor,Ea),oa=d(G.lowerboxhoveralpha,e.lowerboxhoveralpha,m.lowerboxhoveralpha,gb),va=
d(G.lowerboxborderhovercolor,e.lowerboxborderhovercolor,m.lowerboxborderhovercolor,G.lowerboxbordercolor,e.lowerboxbordercolor,m.lowerboxbordercolor,m.plotbordercolor,k.getColor("plotBorderColor")),ca=d(G.lowerboxborderhoveralpha,e.lowerboxborderhoveralpha,m.lowerboxborderhoveralpha,G.lowerboxborderalpha,e.lowerboxborderalpha,m.lowerboxborderalpha,m.plotborderalpha,100),ta=Q?0:d(G.lowerboxborderhoverthickness,e.lowerboxborderhoverthickness,m.lowerboxborderhoverthickness,O.lowerBoxBorder.borderWidth),
za=d(G.upperquartilehovercolor,e.upperquartilehovercolor,m.upperquartilehovercolor,G.upperquartilecolor,e.upperquartilecolor,m.upperquartilecolor,m.plotbordercolor,k.getColor("plotBorderColor")),ya=d(G.upperquartilehoveralpha,e.upperquartilehoveralpha,m.upperquartilehoveralpha,G.upperquartilealpha,e.upperquartilealpha,m.upperquartilealpha,m.plotborderalpha,100),Aa=d(G.upperquartilehoverthickness,e.upperquartilehoverthickness,m.upperquartilehoverthickness,O.upperQuartile.borderWidth),ua=d(G.lowerquartilehovercolor,
e.lowerquartilehovercolor,m.lowerquartilehovercolor,G.lowerquartilecolor,e.lowerquartilecolor,m.lowerquartilecolor,m.plotbordercolor,k.getColor("plotBorderColor")),Ia=d(G.lowerquartilehoveralpha,e.lowerquartilehoveralpha,m.lowerquartilehoveralpha,G.lowerquartilealpha,e.lowerquartilealpha,m.lowerquartilealpha,m.plotborderalpha,100),xa=d(G.lowerquartilehoverthickness,e.lowerquartilehoverthickness,m.lowerquartilehoverthickness,O.lowerQuartile.borderWidth),Ka=d(G.medianhovercolor,e.medianhovercolor,m.medianhovercolor,
G.mediancolor,e.mediancolor,m.mediancolor,m.plotbordercolor,k.getColor("plotBorderColor")),Ga=d(G.medianhoveralpha,e.medianhoveralpha,m.medianhoveralpha,G.medianalpha,e.medianalpha,m.medianalpha,m.plotborderalpha,100),Ba=d(G.medianhoverthickness,e.medianhoverthickness,m.medianhoverthickness,O.median.borderWidth),1==S&&(fa===pa&&(pa=ob(pa,70)),Ea===ja&&(ja=ob(ja,70))),O.upperBoxHoverColorArr=v.graphics.getColumnColor(pa,ka,void 0,void 0,Q,ga,ba.toString(),0,!1),O.lowerBoxHoverColorArr=v.graphics.getColumnColor(ja,
oa,void 0,void 0,Q,ga,ba.toString(),0,!1),O.setUpperBoxRolloutAttr={fill:x(O.upperColorArr[0])},O.setUpperBoxRolloverAttr={fill:x(O.upperBoxHoverColorArr[0])},O.setLowerBoxRolloutAttr={fill:x(O.lowerColorArr[0])},O.setLowerBoxRolloverAttr={fill:x(O.lowerBoxHoverColorArr[0])},O.setUpperBoxBorderRolloverAttr={stroke:ea(la,na),"stroke-width":ma},O.setUpperBoxBorderRolloutAttr={stroke:O.upperBoxBorder.color,"stroke-width":O.upperBoxBorder.borderWidth},O.setLowerBoxBorderRolloverAttr={stroke:ea(va,ca),
"stroke-width":ta},O.setLowerBoxBorderRolloutAttr={stroke:O.lowerBoxBorder.color,"stroke-width":O.lowerBoxBorder.borderWidth},O.setUpperQuartileRolloverAttr={stroke:ea(za,ya),"stroke-width":Aa},O.setUpperQuartileRolloutAttr={stroke:O.upperQuartile.color,"stroke-width":O.upperQuartile.borderWidth},O.setLowerQuartileRolloverAttr={stroke:ea(ua,Ia),"stroke-width":xa},O.setLowerQuartileRolloutAttr={stroke:O.lowerQuartile.color,"stroke-width":O.lowerQuartile.borderWidth},O.setMedianRolloverAttr={stroke:ea(Ka,
Ga),"stroke-width":Ba},O.setMedianRolloutAttr={stroke:O.median.color,"stroke-width":O.median.borderWidth});C=O.toolTipValue;T=F(y(d(G.tooltext,e.plottooltext,m.plottooltext)));w?null===C?H=!1:void 0!==T?(M=[1,2,3,4,5,6,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80],K={maxValue:db,maxDataValue:sa.dataLabels(db),minValue:Ma,minDataValue:sa.dataLabels(Ma),Q1:sa.dataLabels(ib),unformattedQ1:ib,Q3:sa.dataLabels(kb),unformattedQ3:kb,median:sa.dataLabels(Wa),unformattedMedian:Wa,SD:sa.dataLabels(Oa),
unformattedsd:Oa,QD:sa.dataLabels(Xa),unformattedQD:Xa,MD:sa.dataLabels(Na),unformattedMD:Na,mean:sa.dataLabels(wb),unformattedMean:wb,label:ha,yaxisName:D,xaxisName:I,formattedValue:C,value:ha},H=X(T,M,K,G,m,e)):H="<b>Maximum"+z+"</b>"+sa.dataLabels(db)+"<br /><b>Q3"+z+"</b>"+sa.dataLabels(kb)+"<br /><b>Median"+z+"</b>"+sa.dataLabels(Wa)+"<br /><b>Q1"+z+"</b>"+sa.dataLabels(ib)+"<br /><b>Minimum"+z+"</b>"+sa.dataLabels(Ma):H=!1;O.toolText=H;O.setTooltext=H;W&&(U=W)}g.maxNumberOfOutliers=mb;g.maxValue=
Ra;g.minValue=Fa;lb||(Kb=Ra-Fa,g.maxValue+=g.outliersupperrangeratio*Kb,g.minValue-=g.outlierslowerrangeratio*Kb);!1!==b.hasLegend&&this._addLegend();this.subDS=0;this.components.mean=this._createSubDS(0,"Mean");g.showMeanLegend&&this._addLegendSubDS(this.components.mean);g.showMeanLegend&&(this.subDS+=1);this.components.sd=this._createSubDS(1,"SD");g.showSDLegend&&this._addLegendSubDS(this.components.sd);g.showSDLegend&&(this.subDS+=1);this.components.md=this._createSubDS(2,"MD");g.showMDLegend&&
this._addLegendSubDS(this.components.md);g.showMDLegend&&(this.subDS+=1);this.components.qd=this._createSubDS(3,"QD");g.showQDLegend&&this._addLegendSubDS(this.components.qd);g.showQDLegend&&(this.subDS+=1);!this.components.outliers&&(this.components.outliers=[]);ab=this.config.maxNumberOfOutliers||this.components.outliers.length;for(Ta=0;Ta<ab;Ta++)yb=this._createSubDS(4+Ta,"Outliers",Ta),this.components.outliers[Ta]=yb;g.showOutliersLegend&&this._addLegendOutliers(this.components.outliers);g.showOutliersLegend&&
(this.subDS+=1)},_createSubDS:function(b,a,e){var c=this.chart,d=c.jsonData.dataset,f=d&&d.length,s=this.components,l,m,d=c.components.legend,k={},s=s.dataset||(s.dataset=[]),f=f*(b+1)+this.index;if(s[b])m=s[b],m.index=f,c=W({},this.JSONData),m.JSONData=c;else if(l=FusionCharts.get("component",["dataset","subDS"]))void 0===k.subDS?k.subDS=0:k.subDS++,m=new l,m.chart=c,m.index=f,s.push(m),c=W({},this.JSONData),this.initSubDataset(c,m),m.name=a;switch(b){case 0:this.configureMean(m);!this.config.showMeanLegend&&
d.removeItem(m.legendItemId);break;case 1:this.configureSD(m);!this.config.showQDLegend&&d.removeItem(m.legendItemId);break;case 2:this.configureMD(m);!this.config.showMDLegend&&d.removeItem(m.legendItemId);break;case 3:this.configureQD(m);!this.config.showQDLegend&&d.removeItem(m.legendItemId);break;default:this.configureOutliers(m,e),!this.config.showOutliersLegend&&d.removeItem(this.components.outliers.legendItemId)}return m},configureMean:function(b){var g=b.chart,e=g.components,c=v.parseUnsafeString,
h=b.config,f=b.JSONData,s=g.jsonData.chart,l=e.colorManager,m=b.index||b.stackIndex,k=b.type,n=!g.singleseries||F(s.palettecolors)?l.getPlotColor(m):l.getColor("plotFillColor").split(/\s*\,\s*/)[0],m=f.data,q,p=g.config.categories,p=E(p&&p.length,m&&m.length),t=e.numberFormatter,r=g.use3dlineshift,u,w=-Infinity,x=Infinity,y,z,D=d(s.tooltipsepchar,": "),C=a(f.dashed,s.linedashed);z=g.isStacked;q=g.hasLineSet;e=e.xAxis[0];b.visible=1===a(b.JSONData.visible,!Number(b.JSONData.initiallyhidden),1);h.use3dlineshift=
void 0!==r?a(s.use3dlineshift,r):1;h.plotColor=n;h.legendSymbolColor=h.plotColor;g=a(g.defaultPlotShadow,l.getColor("showShadow"));h.drawFullAreaBorder=a(s.drawfullareaborder,1);h.parentYAxis=q?y=1:y="s"===d(f.parentyaxis&&f.parentyaxis.toLowerCase(),"p")?1:0;h.connectNullData=a(s.connectnulldata,0);h.enableAnimation=l=a(s.animation,s.defaultanimation,1);h.animation=l?{duration:1E3*a(s.animationduration,1)}:!1;h.transposeanimation=a(s.transposeanimation,l);h.transposeanimduration=1E3*a(s.transposeanimduration,
.2);h.showValues=0;h.valuePadding=a(s.valuepadding,2);h.valuePosition=d(f.valueposition,s.valueposition,"auto");h.stack100Percent=l=a(s.stack100percent,0);h.showPercentValues=a(s.showpercentvalues,z&&l?1:0);h.showPercentInToolTip=a(s.showpercentintooltip,z&&l?1:0);h.showTooltip=a(s.showtooltip,1);h.seriesNameInTooltip=a(s.seriesnameintooltip,1);h.showHoverEffect=a(s.plothovereffect,s.anchorhovereffect,s.showhovereffect,void 0);h.rotateValues=a(s.rotatevalues)?270:0;h.lineThickness=a(f.linethickness,
s.linethickness,1);h.lineDashLen=a(f.linedashlen,s.linedashlen,5);h.lineDashGap=a(f.linedashgap,s.linedashgap,4);h.drawLine=h.lineAlpha=a(s.drawmeanconnector,f.drawmeanconnector,0)&&100;z=v.getDashStyle(h.lineDashLen,h.lineDashGap,h.lineThickness);h.lineDashStyle=C?z:"none";h.shadow={opacity:a(s.showshadow,g)?k===pa?h.lineAlpha/100:h.plotBorderAlpha/100:0};h.drawAnchors=a(f.drawanchors,f.showanchors,s.drawanchors,s.showanchors);h.anchorBgColor=d(f.meaniconcolor,s.meaniconcolor,"000000");h.anchorBorderColor=
"000000";h.anchorRadius=a(f.meaniconradius,s.meaniconradius,5);h.anchorAlpha=d(f.alpha,f.meaniconalpha,s.meaniconalpha);h.anchorBgAlpha=d(f.meaniconalpha,s.meaniconalpha,100);h.anchorBorderThickness=d(f.anchorborderthickness,s.anchorborderthickness,1);h.anchorSides=d(f.meaniconsides,s.meaniconsides,3);h.lineColor=h.anchorBgColor;h.minimizeTendency=a(s.minimizetendency,s.minimisetendency,0);h.anchorImageUrl=d(f.anchorimageurl,s.anchorimageurl);h.anchorImageAlpha=a(f.anchorimagealpha,s.anchorimagealpha,
100);h.anchorImageScale=a(f.anchorimagescale,s.anchorimagescale,100);h.anchorImagePadding=a(f.anchorimagepadding,s.anchorimagepadding,1);h.anchorStartAngle=a(f.anchorstartangle,s.anchorstartangle,90);h.anchorShadow=a(f.anchorshadow,s.anchorshadow,0);!b.components.data&&(b.components.data=[]);g=b.components.data;for(n=0;n<p;n++)q=m&&m[n],k=g[n]=g[n]||{},k.config=k.config||{},l=k.config,r=this.components.data[n].config,q.value=r.showMean?r.mean:null,l.x=this.components.data[n]._xPos,l.setValue=r=t.getCleanValue(q.value),
l.setLink=d(q.link),l.anchorProps=this._parseAnchorProperties(n,b,"mean"),u=e.getLabel(n),l.label=v.getValidValue(c(d(u.tooltext,u.label,u.name))),l.showValue=0,l.dashed=a(q.dashed,C),l.color=d(q.color,h.lineColor),l.alpha=d(q.alpha,q.linealpha,h.lineAlpha),w=N(w,r),x=E(x,r),l.dashStyle=l.dashed?z:"none",l.toolTipValue=r=t.dataLabels(r,y),l.setDisplayValue=u=c(q.displayvalue),l.displayValue=d(u,r),l.formatedVal=l.toolTipValue,l.setTooltext=v.getValidValue(c(d(q.tooltext,f.plottooltext,s.plottooltext))),
q=d(q.meaniconshape,f.meaniconshape,s.meaniconshape,"polygon"),h.dip=l.dip="polygon"===q?0:"spoke"===q?1:0,q=h.showTooltip?"<b>Mean"+D+"</b>":!1,l.toolText=q,l.setTooltext=q,k?k.graphics||(g[n].graphics={}):g[n]={graphics:{}},l.hoverEffects={enabled:!1};h.maxValue=w;h.minValue=x},configureSD:function(b){var g=b.chart,e=g.components,c=v.parseUnsafeString,h=b.config,f=b.JSONData,s=g.jsonData.chart,l=e.colorManager,m=b.index||b.stackIndex,k=b.type,n=!g.singleseries||F(s.palettecolors)?l.getPlotColor(m):
l.getColor("plotFillColor").split(/\s*\,\s*/)[0],m=f.data,q,p=g.config.categories,p=E(p&&p.length,m&&m.length),t=e.numberFormatter,r=g.use3dlineshift,u,w=-Infinity,x=Infinity,y,z,D=d(s.tooltipsepchar,": "),C=a(f.dashed,s.linedashed);z=g.isStacked;q=g.hasLineSet;e=e.xAxis[0];b.visible=1===a(b.JSONData.visible,!Number(b.JSONData.initiallyhidden),1);h.use3dlineshift=void 0!==r?a(s.use3dlineshift,r):1;h.plotColor=n;h.legendSymbolColor=h.plotColor;g=a(g.defaultPlotShadow,l.getColor("showShadow"));h.drawFullAreaBorder=
a(s.drawfullareaborder,1);h.parentYAxis=q?y=1:y="s"===d(f.parentyaxis&&f.parentyaxis.toLowerCase(),"p")?1:0;h.connectNullData=a(s.connectnulldata,0);h.enableAnimation=l=a(s.animation,s.defaultanimation,1);h.animation=l?{duration:1E3*a(s.animationduration,1)}:!1;h.transposeanimation=a(s.transposeanimation,l);h.transposeanimduration=1E3*a(s.transposeanimduration,.2);h.showValues=0;h.valuePadding=a(s.valuepadding,2);h.valuePosition=d(f.valueposition,s.valueposition,"auto");h.stack100Percent=l=a(s.stack100percent,
0);h.showPercentValues=a(s.showpercentvalues,z&&l?1:0);h.showPercentInToolTip=a(s.showpercentintooltip,z&&l?1:0);h.showTooltip=a(s.showtooltip,1);h.seriesNameInTooltip=a(s.seriesnameintooltip,1);h.showHoverEffect=a(s.plothovereffect,s.anchorhovereffect,s.showhovereffect,void 0);h.rotateValues=a(s.rotatevalues)?270:0;h.lineThickness=a(f.linethickness,s.linethickness,1);h.lineDashLen=a(f.linedashlen,s.linedashlen,5);h.lineDashGap=a(f.linedashgap,s.linedashgap,4);h.drawLine=h.lineAlpha=a(s.drawsdconnector,
f.drawsdconnector,0)&&100;z=v.getDashStyle(h.lineDashLen,h.lineDashGap,h.lineThickness);h.lineDashStyle=C?z:"none";h.shadow={opacity:a(s.showshadow,g)?k===pa?h.lineAlpha/100:h.plotBorderAlpha/100:0};h.drawAnchors=a(f.drawanchors,f.showanchors,s.drawanchors,s.showanchors);h.anchorBgColor=d(f.sdiconcolor,s.sdiconcolor,"000000");h.anchorBorderColor="000000";h.anchorRadius=a(f.sdiconradius,s.sdiconradius,5);h.anchorAlpha=d(f.alpha,f.sdiconalpha,s.sdiconalpha);h.anchorBgAlpha=d(f.sdiconalpha,s.sdiconalpha,
100);h.anchorBorderThickness=d(f.anchorborderthickness,s.anchorborderthickness,1);h.anchorSides=d(f.sdiconsides,s.sdiconsides,3);h.lineColor=h.anchorBgColor;h.minimizeTendency=a(s.minimizetendency,s.minimisetendency,0);h.anchorImageUrl=d(f.anchorimageurl,s.anchorimageurl);h.anchorImageAlpha=a(f.anchorimagealpha,s.anchorimagealpha,100);h.anchorImageScale=a(f.anchorimagescale,s.anchorimagescale,100);h.anchorImagePadding=a(f.anchorimagepadding,s.anchorimagepadding,1);h.anchorStartAngle=a(f.anchorstartangle,
s.anchorstartangle,90);h.anchorShadow=a(f.anchorshadow,s.anchorshadow,0);!b.components.data&&(b.components.data=[]);g=b.components.data;for(n=0;n<p;n++)q=m&&m[n],k=g[n]=g[n]||{},k.config=k.config||{},l=k.config,r=this.components.data[n].config,q.value=r.showSD?r.sd:null,l.x=this.components.data[n]._xPos,l.setValue=r=t.getCleanValue(q.value),l.setLink=d(q.link),l.anchorProps=this._parseAnchorProperties(n,b,"sd"),u=e.getLabel(n),l.label=v.getValidValue(c(d(u.tooltext,u.label,u.name))),l.showValue=0,
l.dashed=a(q.dashed,C),l.color=d(q.color,h.lineColor),l.alpha=d(q.alpha,q.linealpha,h.lineAlpha),w=N(w,r),x=E(x,r),l.dashStyle=l.dashed?z:"none",l.toolTipValue=r=t.dataLabels(r,y),l.setDisplayValue=u=c(q.displayvalue),l.displayValue=d(u,r),l.formatedVal=r=l.toolTipValue,l.setTooltext=v.getValidValue(c(d(q.tooltext,f.plottooltext,s.plottooltext))),q=d(q.sdiconshape,f.sdiconshape,s.sdiconshape,"polygon"),h.dip=l.dip="polygon"===q?0:"spoke"===q?1:0,q=h.showTooltip?null===r?!1:"<b>SD"+D+"</b>":!1,l.toolText=
q,l.setTooltext=q,k?k.graphics||(g[n].graphics={}):g[n]={graphics:{}},l.hoverEffects={enabled:!1};h.maxValue=w;h.minValue=x},configureMD:function(b){var g=b.chart,e=g.components,c=v.parseUnsafeString,h=b.config,f=b.JSONData,s=g.jsonData.chart,l=e.colorManager,m=b.index||b.stackIndex,k=b.type,n=!g.singleseries||F(s.palettecolors)?l.getPlotColor(m):l.getColor("plotFillColor").split(/\s*\,\s*/)[0],m=f.data,q,p=g.config.categories,p=E(p&&p.length,m&&m.length),t=e.numberFormatter,r=g.use3dlineshift,u,
w=-Infinity,x=Infinity,y,z,D=d(s.tooltipsepchar,": "),C=a(f.dashed,s.linedashed);z=g.isStacked;q=g.hasLineSet;e=e.xAxis[0];b.visible=1===a(b.JSONData.visible,!Number(b.JSONData.initiallyhidden),1);h.use3dlineshift=void 0!==r?a(s.use3dlineshift,r):1;h.plotColor=n;h.legendSymbolColor=h.plotColor;g=a(g.defaultPlotShadow,l.getColor("showShadow"));h.drawFullAreaBorder=a(s.drawfullareaborder,1);h.parentYAxis=q?y=1:y="s"===d(f.parentyaxis&&f.parentyaxis.toLowerCase(),"p")?1:0;h.connectNullData=a(s.connectnulldata,
0);h.enableAnimation=l=a(s.animation,s.defaultanimation,1);h.animation=l?{duration:1E3*a(s.animationduration,1)}:!1;h.transposeanimation=a(s.transposeanimation,l);h.transposeanimduration=1E3*a(s.transposeanimduration,.2);h.showValues=0;h.valuePadding=a(s.valuepadding,2);h.valuePosition=d(f.valueposition,s.valueposition,"auto");h.stack100Percent=l=a(s.stack100percent,0);h.showPercentValues=a(s.showpercentvalues,z&&l?1:0);h.showPercentInToolTip=a(s.showpercentintooltip,z&&l?1:0);h.showTooltip=a(s.showtooltip,
1);h.seriesNameInTooltip=a(s.seriesnameintooltip,1);h.showHoverEffect=a(s.plothovereffect,s.anchorhovereffect,s.showhovereffect,void 0);h.rotateValues=a(s.rotatevalues)?270:0;h.lineThickness=a(f.linethickness,s.linethickness,1);h.lineDashLen=a(f.linedashlen,s.linedashlen,5);h.lineDashGap=a(f.linedashgap,s.linedashgap,4);h.drawLine=h.lineAlpha=a(s.drawmdconnector,f.drawmdconnector,0)&&100;z=v.getDashStyle(h.lineDashLen,h.lineDashGap,h.lineThickness);h.lineDashStyle=C?z:"none";h.shadow={opacity:a(s.showshadow,
g)?k===pa?h.lineAlpha/100:h.plotBorderAlpha/100:0};h.drawAnchors=a(f.drawanchors,f.showanchors,s.drawanchors,s.showanchors);h.anchorBgColor=d(f.mdiconcolor,s.mdiconcolor,"000000");h.anchorBorderColor="000000";h.anchorRadius=a(f.mdiconradius,s.mdiconradius,5);h.anchorAlpha=d(f.alpha,f.mdiconalpha,s.mdiconalpha);h.anchorBgAlpha=d(f.mdiconalpha,s.mdiconalpha,100);h.anchorBorderThickness=d(f.anchorborderthickness,s.anchorborderthickness,1);h.anchorSides=d(f.mdiconsides,s.mdiconsides,3);h.lineColor=h.anchorBgColor;
h.minimizeTendency=a(s.minimizetendency,s.minimisetendency,0);h.anchorImageUrl=d(f.anchorimageurl,s.anchorimageurl);h.anchorImageAlpha=a(f.anchorimagealpha,s.anchorimagealpha,100);h.anchorImageScale=a(f.anchorimagescale,s.anchorimagescale,100);h.anchorImagePadding=a(f.anchorimagepadding,s.anchorimagepadding,1);h.anchorStartAngle=a(f.anchorstartangle,s.anchorstartangle,90);h.anchorShadow=a(f.anchorshadow,s.anchorshadow,0);!b.components.data&&(b.components.data=[]);g=b.components.data;for(n=0;n<p;n++)q=
m&&m[n],k=g[n]=g[n]||{},k.config=k.config||{},l=k.config,r=this.components.data[n].config,q.value=r.showMD?r.md:null,l.x=this.components.data[n]._xPos,l.setValue=r=t.getCleanValue(q.value),l.setLink=d(q.link),l.anchorProps=this._parseAnchorProperties(n,b,"md"),u=e.getLabel(n),l.label=v.getValidValue(c(d(u.tooltext,u.label,u.name))),l.showValue=0,l.dashed=a(q.dashed,C),l.color=d(q.color,h.lineColor),l.alpha=d(q.alpha,q.linealpha,h.lineAlpha),w=N(w,r),x=E(x,r),l.dashStyle=l.dashed?z:"none",l.toolTipValue=
r=t.dataLabels(r,y),l.setDisplayValue=u=c(q.displayvalue),l.displayValue=d(u,r),l.formatedVal=l.toolTipValue,l.setTooltext=v.getValidValue(c(d(q.tooltext,f.plottooltext,s.plottooltext))),q=d(q.mdiconshape,f.mdiconshape,s.mdiconshape,"polygon"),h.dip=l.dip="polygon"===q?0:"spoke"===q?1:0,q=h.showTooltip?"<b>MD"+D+"</b>":!1,l.toolText=q,l.setTooltext=q,k?k.graphics||(g[n].graphics={}):g[n]={graphics:{}},l.hoverEffects={enabled:!1};h.maxValue=w;h.minValue=x},configureQD:function(b){var g=b.chart,e=g.components,
c=v.parseUnsafeString,h=b.config,f=b.JSONData,s=g.jsonData.chart,l=e.colorManager,m=b.index||b.stackIndex,k=b.type,n=!g.singleseries||F(s.palettecolors)?l.getPlotColor(m):l.getColor("plotFillColor").split(/\s*\,\s*/)[0],m=f.data,q,p=g.config.categories,p=E(p&&p.length,m&&m.length),t=e.numberFormatter,r=g.use3dlineshift,u,w=-Infinity,x=Infinity,y,z,D=d(s.tooltipsepchar,": "),C=a(f.dashed,s.linedashed);z=g.isStacked;q=g.hasLineSet;e=e.xAxis[0];b.visible=1===a(b.JSONData.visible,!Number(b.JSONData.initiallyhidden),
1);h.use3dlineshift=void 0!==r?a(s.use3dlineshift,r):1;h.plotColor=n;h.legendSymbolColor=h.plotColor;g=a(g.defaultPlotShadow,l.getColor("showShadow"));h.drawFullAreaBorder=a(s.drawfullareaborder,1);h.parentYAxis=q?y=1:y="s"===d(f.parentyaxis&&f.parentyaxis.toLowerCase(),"p")?1:0;h.connectNullData=a(s.connectnulldata,0);h.enableAnimation=l=a(s.animation,s.defaultanimation,1);h.animation=l?{duration:1E3*a(s.animationduration,1)}:!1;h.transposeanimation=a(s.transposeanimation,l);h.transposeanimduration=
1E3*a(s.transposeanimduration,.2);h.showValues=0;h.valuePadding=a(s.valuepadding,2);h.valuePosition=d(f.valueposition,s.valueposition,"auto");h.stack100Percent=l=a(s.stack100percent,0);h.showPercentValues=a(s.showpercentvalues,z&&l?1:0);h.showPercentInToolTip=a(s.showpercentintooltip,z&&l?1:0);h.showTooltip=a(s.showtooltip,1);h.seriesNameInTooltip=a(s.seriesnameintooltip,1);h.showHoverEffect=a(s.plothovereffect,s.anchorhovereffect,s.showhovereffect,void 0);h.rotateValues=a(s.rotatevalues)?270:0;h.lineThickness=
a(f.linethickness,s.linethickness,1);h.lineDashLen=a(f.linedashlen,s.linedashlen,5);h.lineDashGap=a(f.linedashgap,s.linedashgap,4);h.drawLine=h.lineAlpha=a(s.drawqdconnector,f.drawqdconnector,0)&&100;z=v.getDashStyle(h.lineDashLen,h.lineDashGap,h.lineThickness);h.lineDashStyle=C?z:"none";h.shadow={opacity:a(s.showshadow,g)?k===pa?h.lineAlpha/100:h.plotBorderAlpha/100:0};h.drawAnchors=a(f.drawanchors,f.showanchors,s.drawanchors,s.showanchors);h.anchorBgColor=d(f.qdiconcolor,s.qdiconcolor,"000000");
h.anchorBorderColor="000000";h.anchorRadius=a(f.qdiconradius,s.qdiconradius,5);h.anchorAlpha=d(f.alpha,f.qdiconalpha,s.qdiconalpha);h.anchorBgAlpha=d(f.qdiconalpha,s.qdiconalpha,100);h.anchorBorderThickness=d(f.anchorborderthickness,s.anchorborderthickness,1);h.anchorSides=d(f.qdiconsides,s.qdiconsides,3);h.lineColor=h.anchorBgColor;h.minimizeTendency=a(s.minimizetendency,s.minimisetendency,0);h.anchorImageUrl=d(f.anchorimageurl,s.anchorimageurl);h.anchorImageAlpha=a(f.anchorimagealpha,s.anchorimagealpha,
100);h.anchorImageScale=a(f.anchorimagescale,s.anchorimagescale,100);h.anchorImagePadding=a(f.anchorimagepadding,s.anchorimagepadding,1);h.anchorStartAngle=a(f.anchorstartangle,s.anchorstartangle,90);h.anchorShadow=a(f.anchorshadow,s.anchorshadow,0);!b.components.data&&(b.components.data=[]);g=b.components.data;for(n=0;n<p;n++)q=m&&m[n],k=g[n]=g[n]||{},k.config=k.config||{},l=k.config,r=this.components.data[n].config,q.value=r.showQD?r.qd:null,l.x=this.components.data[n]._xPos,l.setValue=r=t.getCleanValue(q.value),
l.setLink=d(q.link),l.anchorProps=this._parseAnchorProperties(n,b,"qd"),u=e.getLabel(n),l.label=v.getValidValue(c(d(u.tooltext,u.label,u.name))),l.showValue=0,l.dashed=a(q.dashed,C),l.color=d(q.color,h.lineColor),l.alpha=d(q.alpha,q.linealpha,h.lineAlpha),w=N(w,r),x=E(x,r),l.dashStyle=l.dashed?z:"none",l.toolTipValue=r=t.dataLabels(r,y),l.setDisplayValue=u=c(q.displayvalue),l.displayValue=d(u,r),l.formatedVal=r=l.toolTipValue,l.setTooltext=v.getValidValue(c(d(q.tooltext,f.plottooltext,s.plottooltext))),
q=d(q.qdiconshape,f.qdiconshape,s.qdiconshape,"polygon"),h.dip=l.dip="polygon"===q?0:"spoke"===q?1:0,q=h.showTooltip?null===r?!1:"<b>QD"+D+"</b>":!1,l.toolText=q,l.setTooltext=q,k?k.graphics||(g[n].graphics={}):g[n]={graphics:{}},l.hoverEffects={enabled:!1};h.maxValue=w;h.minValue=x},configureOutliers:function(b,g){var e=b.chart,c=e.components,h=v.parseUnsafeString,f=b.config,k=b.JSONData,l=e.jsonData.chart,m=c.colorManager,n=b.index||b.stackIndex,p=b.type,q=!e.singleseries||F(l.palettecolors)?m.getPlotColor(n):
m.getColor("plotFillColor").split(/\s*\,\s*/)[0],n=k.data,r,t=e.config.categories,t=E(t&&t.length,n&&n.length),u=c.numberFormatter,w=e.use3dlineshift,x,y=-Infinity,D=Infinity,z,X,C=d(l.tooltipsepchar,": "),I=a(k.dashed,l.linedashed);X=e.isStacked;r=e.hasLineSet;c=c.xAxis[0];b.visible=1===a(b.JSONData.visible,!Number(b.JSONData.initiallyhidden),1);f.use3dlineshift=void 0!==w?a(l.use3dlineshift,w):1;f.plotColor=q;f.legendSymbolColor=f.plotColor;e=a(e.defaultPlotShadow,m.getColor("showShadow"));f.drawFullAreaBorder=
a(l.drawfullareaborder,1);f.parentYAxis=r?z=1:z="s"===d(k.parentyaxis&&k.parentyaxis.toLowerCase(),"p")?1:0;f.connectNullData=a(l.connectnulldata,0);f.enableAnimation=m=a(l.animation,l.defaultanimation,1);f.animation=m?{duration:1E3*a(l.animationduration,1)}:!1;f.transposeanimation=a(l.transposeanimation,m);f.transposeanimduration=1E3*a(l.transposeanimduration,.2);f.showValues=0;f.valuePadding=a(l.valuepadding,2);f.valuePosition=d(k.valueposition,l.valueposition,"auto");f.stack100Percent=m=a(l.stack100percent,
0);f.showPercentValues=a(l.showpercentvalues,X&&m?1:0);f.showPercentInToolTip=a(l.showpercentintooltip,X&&m?1:0);f.showTooltip=a(l.showtooltip,1);f.seriesNameInTooltip=a(l.seriesnameintooltip,1);f.showHoverEffect=a(l.plothovereffect,l.anchorhovereffect,l.showhovereffect,void 0);f.rotateValues=a(l.rotatevalues)?270:0;f.lineThickness=a(k.linethickness,l.linethickness,1);f.lineDashLen=a(k.linedashlen,l.linedashlen,5);f.lineDashGap=a(k.linedashgap,l.linedashgap,4);f.lineAlpha=0;X=v.getDashStyle(f.lineDashLen,
f.lineDashGap,f.lineThickness);f.lineDashStyle=I?X:"none";f.shadow={opacity:a(l.showshadow,e)?p===pa?f.lineAlpha/100:f.plotBorderAlpha/100:0};f.drawAnchors=a(k.drawanchors,k.showanchors,l.drawanchors,l.showanchors);f.anchorBgColor=d(k.outliericoncolor,l.outliericoncolor,"000000");f.anchorBorderColor="000000";f.anchorRadius=a(k.outliericonradius,l.outliericonradius,5);f.anchorAlpha=d(k.alpha,k.outliericonalpha,l.outliericonalpha);f.anchorBgAlpha=d(k.outliericonalpha,l.outliericonalpha,100);f.anchorBorderThickness=
d(k.anchorborderthickness,l.anchorborderthickness,1);f.anchorSides=d(k.outliericonsides,l.outliericonsides,3);f.lineColor=f.anchorBgColor;f.minimizeTendency=a(l.minimizetendency,l.minimisetendency,0);f.anchorImageUrl=d(k.anchorimageurl,l.anchorimageurl);f.anchorImageAlpha=a(k.anchorimagealpha,l.anchorimagealpha,100);f.anchorImageScale=a(k.anchorimagescale,l.anchorimagescale,100);f.anchorImagePadding=a(k.anchorimagepadding,l.anchorimagepadding,1);f.anchorStartAngle=a(k.anchorstartangle,l.anchorstartangle,
90);f.anchorShadow=a(k.anchorshadow,l.anchorshadow,0);!b.components.data&&(b.components.data=[]);e=b.components.data;for(q=0;q<t;q++)r=n&&n[q],p=e[q]=e[q]||{},p.config=p.config||{},m=p.config,x=this.components.data[q].config,r.value=x.outliers?x.outliers[g]:null,m.x=this.components.data[q]._xPos,m.setValue=w=u.getCleanValue(r.value),w>=x.min&&w<=x.max&&(m.setValue=r.value=null),m.setLink=d(r.link),m.anchorProps=this._parseAnchorProperties(q,b,"outlier"),x=c.getLabel(q),m.label=v.getValidValue(h(d(x.tooltext,
x.label,x.name))),m.showValue=0,m.dashed=a(r.dashed,I),m.color=d(r.color,f.lineColor),m.alpha=d(r.alpha,r.linealpha,f.lineAlpha),y=N(y,w),D=E(D,w),m.dashStyle=m.dashed?X:"none",m.toolTipValue=w=u.dataLabels(w,z),m.setDisplayValue=x=h(r.displayvalue),m.displayValue=d(x,w),m.formatedVal=w=m.toolTipValue,m.setTooltext=v.getValidValue(h(d(r.tooltext,k.plottooltext,l.plottooltext))),r=d(r.outliericonshape,k.outliericonshape,l.outliericonshape,"polygon"),f.dip=m.dip="polygon"===r?0:"spoke"===r?1:0,r=f.showTooltip?
null===w?!1:"<b>Outlier"+C+"</b>":!1,m.toolText=r,m.setTooltext=r,p?p.graphics||(e[q].graphics={}):e[q]={graphics:{}},m.hoverEffects={enabled:!1};f.maxValue=y;f.minValue=D},initSubDataset:function(b,a){var e=a.chart,c=e.components,d=e.hasLineSet,d=b.parentyaxis&&"s"===b.parentyaxis.toLowerCase()||d?1:0;a.chart=e;a.yAxis=c.yAxis[d];a.components={};a.graphics={};a.JSONData=b},_parseAnchorProperties:function(b,g,e){var c=g.config,h="area"===g.type?0:1,f=g.JSONData,k=g.chart.jsonData.chart;b=f.data[b];
g={};var l=v.graphics.mapSymbolName,f=void 0!==d(b.anchorstartangle,f.anchorstartangle,k.anchorstartangle,b.anchorimagealpha,f.anchorimagealpha,k.anchorimagealpha,b.anchorimagescale,f.anchorimagescale,k.anchorimagescale,b.anchorimagepadding,f.anchorimagepadding,k.anchorimagepadding,b.anchorimageurl,f.anchorimageurl,k.anchorimageurl,b.meaniconradius,f.meaniconradius,k.meaniconradius,b.meaniconcolor,f.meaniconcolor,k.meaniconcolor,b.anchorbordercolor,f.anchorbordercolor,k.anchorbordercolor,b.anchoralpha,
f.anchoralpha,k.anchoralpha,b.meaniconsides,f.meaniconsides,k.meaniconsides,b.anchorborderthickness,f.anchorborderthickness,k.anchorborderthickness,void 0),k=a(b.drawanchors,c.drawAnchors);g.enabled=f?a(k,f):a(k,h);g.startAngle=a(b.anchorstartangle,c.anchorStartAngle);g.imageAlpha=a(b.anchorimagealpha,c.anchorImageAlpha);g.imageScale=a(b.anchorimagescale,c.anchorImageScale);g.imagePadding=a(b.anchorimagepadding,c.anchorImagePadding);0>g.imagePadding&&(g.imagePadding=0);g.imageUrl=d(b.anchorimageurl,
c.anchorImageUrl);g.radius=a(b[e+"iconradius"],c.anchorRadius);g.isAnchorRadius=g.radius;g.bgColor=d(b[e+"iconcolor"],c.anchorBgColor);h=g.enabled?Za(d(b.anchoralpha,c.anchorAlpha,g.enabled?La:"0")):0;g.bgAlpha=Za(d(b[e+"iconalpha"],c.meaniconalpha,h));g.borderColor=d(b.anchorbordercolor,c.anchorBorderColor);g.borderAlpha=h;g.sides=d(b[e+"iconsides"],c.anchorSides);g.borderThickness=d(b.anchorborderthickness,c.anchorBorderThickness);g.symbol=l(g.sides).split("_");g.shadow=a(b.anchorshadow,c.anchorShadow)&&
1<=g.radius?{opacity:h/100}:!1;return g},init:function(b){var a=this.chart,e=a.components,c=b.parentyaxis&&"s"===b.parentyaxis.toLowerCase()?1:0,e=e.yAxis[c];if(!b)return!1;this.JSONData=b;this.yAxis=e;this.chartGraphics=a.chartGraphics;this.components={};this.graphics={};this.configure()},draw:function(){var b,d,e,c,h,f,k,l=this,m=l.JSONData,n=l.config,p=l.groupManager,q=l.index,r=l.chart.config.categories,t=m.data,v=r&&r.length,w=t&&t.length,D,F,I,z=l.visible,X=l.chart,C=X.config,K=X.components.paper,
T=X.components.xAxis[0],M=l.yAxis,W=X.graphics.columnGroup,H,J,R=X.graphics,$=n.showtooltip,Q=X.get("config","animationObj"),S=Q.animType,U=Q.animObj,Z=Q.dummyObj,L=Q.duration,Y=T.getAxisPosition(0),ea=T.getAxisPosition(1)-Y,da=n.definedGroupPadding,aa=n.plotSpacePercent/200,G=p.getDataSetPosition(l),ia=n.maxcolwidth,pa=(1-.01*da)*ea||E(ea*(1-2*aa),1*ia),O=a(G.columnWidth,pa/1),ha,la=G.xPosOffset||0,ka=G.height,ja,na=l.components.data,ma,oa,ta,va,ca,ya,Aa=M.getAxisBase(),ua,Ha,Ia=n.showShadow,xa=
l.graphics.upperBoxContainer,Ca=l.graphics.lowerBoxContainer,Ka=l.graphics.medianContainer,Ga=l.graphics.upperWhiskerContainer,Fa=l.graphics.lowerWhiskerContainer,Ba=l.graphics.dataLabelContainer,Da=l.graphics.shadowContainer,sa,La,Ja,Qa,Pa,ub,$a,Ta,Ra,Oa,Ua,fb,ob,ib,kb,vb,Ma,db,Wa,wb,Na,cb,Xa,fa=X.config.dataLabelStyle,Fb=R.datalabelsGroup,Ea=n.rotatevalues,gb=n.valuepadding,Db={fontFamily:fa.fontFamily,fontSize:fa.fontSize,lineHeight:fa.lineHeight,fontWeight:fa.fontWeight,fontStyle:fa.fontStyle},
Ya=X.components.numberFormatter,lb=Ea?gc:"middle",Kb=X.linkedItems.smartLabel,wa,eb,rb,Yb,xb,yb,ab,mb,bb,qb,Eb,hb,Za,jb,nb,Jb=Infinity,Va,Cb,sb=!0,Zb=(l.components.removeDataArr||[]).length,Pb,Qb,Rb,Sb,Tb,Ub,Vb,Wb,Xb,Hb,Ib,Lb=n.showHoverEffect,zb,Ab,Mb=function(b){za.call(this,X,b)},Nb=function(b){return function(a){var c;if(0!==this.data("showHoverEffect"))for(c in b)"label"!==c&&(b[c].attr(this.data("setRolloverAttr")[c]),za.call(this,X,a,"DataPlotRollOver"))}},Ob=function(b){return function(a){var c;
if(0!==this.data("showHoverEffect"))for(c in b)"label"!==c&&(b[c].attr(this.data("setRolloutAttr")[c]),za.call(this,X,a,"DataPlotRollOut"))}},Bb=function(){!1!==l.visible||!1!==l._conatinerHidden&&void 0!==l._conatinerHidden||(xa.hide(),Ca.hide(),Ga.hide(),Fa.hide(),Ka.hide(),Da.hide(),Ba&&Ba.hide(),l._conatinerHidden=!0)};Ba||(Ba=l.graphics.dataLabelContainer=K.group("datalabel",Fb),z||Ba.hide());xa||(xa=l.graphics.upperBoxContainer=K.group("upperBox",W).trackTooltip(!0).toBack(),z||xa.hide());Ga||
(Ga=l.graphics.upperWhiskerContainer=K.group("upperWhisker",W).trackTooltip(!0).toBack(),z||Ga.hide());Ca||(Ca=l.graphics.lowerBoxContainer=K.group("lowerBox",W).trackTooltip(!0).toBack(),z||Ca.hide());Fa||(Fa=l.graphics.lowerWhiskerContainer=K.group("lowerWhisker",W).trackTooltip(!0).toBack(),z||Fa.hide());Ka||(Ka=l.graphics.medianContainer=K.group("median",W).trackTooltip(!0),z||Ka.hide());Da||(Da=l.graphics.shadowContainer=K.group("shadow",W).toBack(),z||Da.hide());z&&(xa.show(),Ca.show(),Ga.show(),
Fa.show(),Ka.show(),Da.show(),Ba&&Ba.show(),l._conatinerHidden=!1,l.components.mean.show(),l.components.sd.show(),l.components.qd.show(),l.components.md.show());D=E(v,w);for(I=0;I<D;I++)if(ta=(ca=(ma=na[I])&&ma.config)&&ca.setValue,Xb=Wb=Vb=Ub=Tb=Sb=Rb=Qb=Pb=!1,void 0!==ma&&void 0!==ta&&null!==ta)for(wa=ma.graphics,ya=0<=ta,oa=ca.setLink,ma.graphics||(na[I].graphics={}),wa.label||(na[I].graphics.label=[]),ua=ya?ca.previousPositiveY:ca.previousNegativeY,Ha=M.getAxisPosition(ua||Aa),H=T.getAxisPosition(I)+
la,0===ka&&(Jb=0,Va=Ha),J=E(J,Ha),ha=O,Ja=((La=(sa=ca.upperQuartile||{},sa.value))||0===La)&&M.getAxisPosition(La),ub=((Pa=(Qa=ca.lowerQuartile||{},Qa.value))||0===Pa)&&M.getAxisPosition(Pa),Ra=((Ta=($a=ca.median)&&$a.value)||0===Ta)&&M.getAxisPosition(Ta),Oa=Ra-Ja,Ua=ub-Ra,fb=ca.upperBoxBorder||{},ob=ca.lowerBoxBorder||{},ja=ca.toolText,eb=l.index+"_"+I,va={index:I,link:oa,maximum:ca.max,minimum:ca.min,median:Ta,q3:sa.value,q1:Qa.value,maxDisplayValue:ca.showMaxValues?Ya.dataLabels(ca.max):u,minDisplayValue:ca.showMinValues?
Ya.dataLabels(ca.min):u,medianDisplayValue:ca.showMedianValues?Ya.dataLabels(Ta):u,q1DisplayValue:ca.showQ1Values?Ya.dataLabels(Qa.value):u,q3DisplayValue:ca.showQ3Values?Ya.dataLabels(sa.value):u,categoryLabel:ca.label,toolText:ja,datasetIndex:q,datasetName:m.seriesname,visible:z},Na=ga(H)+fb.borderWidth%2*.5,cb=ga(H+ha)+fb.borderWidth%2*.5,Xa=ga(Ja)+sa.borderWidth%2*.5,ha=cb-Na,b={fill:x(ca.upperColorArr[0]),"stroke-width":0,"stroke-dasharray":"none",cursor:oa?"pointer":u,ishot:!0,visibility:z},
d={fill:x(ca.lowerColorArr[0]),"stroke-width":0,"stroke-dasharray":"none",cursor:oa?"pointer":y,ishot:!0,visibility:z},e={stroke:fb.color,"stroke-width":fb.borderWidth,"stroke-linecap":"round",dashstyle:fb.dashStyle,ishot:!0,visibility:z},c={stroke:ob.color,"stroke-width":ob.borderWidth,dashstyle:ob.dashStyle,"stroke-linecap":"round",ishot:!0,visibility:z},h={stroke:x(sa.color),"stroke-width":sa.borderWidth,"stroke-dasharray":sa.dashSyle,"stroke-linecap":"round",cursor:oa?"pointer":y,ishot:!0,visibility:z},
f={stroke:x(Qa.color),"stroke-width":Qa.borderWidth,"stroke-dasharray":Qa.dashSyle,cursor:oa?"pointer":u,"stroke-linecap":"round",ishot:!0,visibility:z},k={stroke:x($a.color),"stroke-width":$a.borderWidth,"stroke-dasharray":$a.dashSyle,cursor:oa?"pointer":u,"stroke-linecap":"round",ishot:!0,visibility:z},F={x:Na,y:Va||Xa,width:N(ha,0),height:N(E(Jb,Oa),0),r:0},(ib=ma.graphics.upperBoxElem)?(ib.animateWith(Z,U,F,L,S,sb&&Bb),sb=!1):(ib=ma.graphics.upperBoxElem=K.rect(F,xa),Pb=!0),ib.attr(b).shadow({opacity:Ia?
n.upperBoxAlpha/100:0},Da),F={path:["M",Na,Va||Xa,"V",Va||Xa+Oa,"M",cb,Va||Xa,"V",Va||Xa+Oa]},(kb=ma.graphics.upperBoxBorderEle)?kb.animateWith(Z,U,F,L,S,sb&&Bb):(kb=ma.graphics.upperBoxBorderEle=K.path(F,xa),Rb=!0),kb.attr(e),F={path:["M",Na,Va||Xa,"H",Na+ha]},(vb=ma.graphics.upperQuartileEle)?vb.animateWith(Z,U,F,L,S,sb&&Bb):(vb=ma.graphics.upperQuartileEle=K.path(F,xa),Tb=!0),vb.attr(h),rb=Xa,Yb=n.whiskerslimitswidthratio/100*ha,xb=Yb/2,mb=yb=M.getAxisPosition(ca.max),ab=Na,mb=ga(yb)+ca.upperWhiskerThickness%
2/2,Na=ga(Na+ha/2)+ca.upperWhiskerThickness%2/2,qb=["M",Na,Va||rb,"V",Va||mb,"M",Na-xb,Va||mb,"H",Na+xb],bb=ma.graphics.upperWhiskerEle,F={path:qb,ishot:!$,"stroke-width":ca.upperWhiskerThickness,cursor:oa?"pointer":u,"stroke-linecap":"round"},bb?bb.animateWith(Z,U,F,L,S,sb&&Bb):(bb=ma.graphics.upperWhiskerEle=K.path(F,Ga),Wb=!0),bb.attr({stroke:ca.upperWhiskerColor}),bb.shadow({opacity:ca.upperWhiskerShadowOpacity},Da),Kb.useEllipsesOnOverflow(X.config.useEllipsesWhenOverflow),Kb.setStyle(fa),hb=
Kb.getOriSize(Ya.dataLabels(ca.max)),Za=Ea?hb.width:hb.height,nb=yb-.5*ca.upperWhiskerThickness-gb-Za*(Ea?.5:1),nb-(Ea?Za/2:0)<C.canvasTop&&(nb=C.canvasTop+(Ea?Za/2:0)),F={text:Ya.dataLabels(ca.max),x:ab+ha/2,title:sa.originalText||u,y:nb,"text-anchor":Ea?"middle":lb,"vertical-align":Ea?"middle":"top",visibility:"visible",direction:n.textDirection,fill:fa.color,transform:K.getSuggestiveRotation(Ea,ab+ha/2,nb),"text-bound":[fa.backgroundColor,fa.borderColor,fa.borderThickness,fa.borderPadding,fa.borderRadius,
fa.borderDash]},ca.showMaxValues?(wa.label[3]?(wa.label[3].show(),zb=ab+ha/2,Ab=Va||nb,wa.label[3].attr({text:Ya.dataLabels(ca.max),title:sa.originalText||u,"text-anchor":Ea?"middle":lb,"vertical-align":Ea?"middle":"top",visibility:"visible",direction:n.textDirection,fill:fa.color,"text-bound":[fa.backgroundColor,fa.borderColor,fa.borderThickness,fa.borderPadding,fa.borderRadius,fa.borderDash]}),wa.label[3].animateWith(Z,U,{x:zb,y:Ab,transform:K.getSuggestiveRotation(Ea,zb,Ab)},L,S,sb&&Bb)):wa.label[3]=
K.text(F,Ba),wa.label[3].data("groupId",eb).css(Db)):wa.label[3]&&wa.label[3].hide()&&wa.label[3].attr({"text-bound":[]}),Na=ga(H)+ob.borderWidth%2*.5,cb=ga(H+ha)+ob.borderWidth%2*.5,Xa=ga(Ra+Ua)+Qa.borderWidth%2*.5,F={x:Na,y:Va||Ra,width:N(ha,0),height:N(E(Jb,Xa-Ra),0),r:0},(Ma=ma.graphics.lowerBoxElem)?Ma.animateWith(Z,U,F,L,S,sb&&Bb):(Ma=ma.graphics.lowerBoxElem=K.rect(F,Ca),Qb=!0),Ma.attr(d).shadow({opacity:Ia?n.lowerBoxAlpha/100:0},Da),F={path:["M",Na,Va||Ra,"V",Va||Ra+Ua,"M",cb,Va||Ra,"V",Va||
Ra+Ua]},(db=ma.graphics.lowerBoxBorderEle)?db.animateWith(Z,U,F,L,S,sb&&Bb):(db=ma.graphics.lowerBoxBorderEle=K.path(F,Ca),Sb=!0),db.attr(c),Xa=ga(Ra+Ua)+Qa.borderWidth%2*.5,F={path:["M",Na,Va||Xa,"H",Na+ha]},(Wa=ma.graphics.lowerQuartileEle)?Wa.animateWith(Z,U,F,L,S,sb&&Bb):(Wa=ma.graphics.lowerQuartileEle=K.path(F,Ca),Ub=!0),Wa.attr(f),rb=Xa,Yb=n.whiskerslimitswidthratio/100*ha,xb=Yb/2,mb=yb=M.getAxisPosition(ca.min),ab=Na,mb=ga(yb)+ca.lowerWhiskerThickness%2/2,ab=ga(ab+ha/2)+ca.lowerWhiskerThickness%
2/2,qb=["M",ab,Va||rb,"V",Va||mb,"M",ab-xb,Va||mb,"H",ab+xb],Eb=ma.graphics.lowerWhiskerEle,Kb.setStyle(fa),hb=Kb.getOriSize(Ya.dataLabels(ca.min)),Za=Ea?hb.width:hb.height,jb=yb+.5*ca.lowerWhiskerThickness+gb,jb+Za>C.canvasBottom&&(jb=C.canvasBottom-Za),F={text:Ya.dataLabels(ca.min),x:ab,title:sa.originalText||u,y:jb,"text-anchor":Ea?"end":lb,"vertical-align":Ea?"middle":"top",visibility:"visible",direction:n.textDirection,fill:fa.color,transform:K.getSuggestiveRotation(Ea,ab,jb),"text-bound":[fa.backgroundColor,
fa.borderColor,fa.borderThickness,fa.borderPadding,fa.borderRadius,fa.borderDash]},ca.showMinValues?(wa.label[4]?(wa.label[4].show(),zb=ab,Ab=Va||jb,wa.label[4].animateWith(Z,U,{x:zb,y:Ab,transform:K.getSuggestiveRotation(Ea,zb,Ab)},L,S,sb&&Bb),wa.label[4].attr({text:Ya.dataLabels(ca.min),title:sa.originalText||u,"text-anchor":Ea?"end":lb,"vertical-align":Ea?"middle":"top",visibility:"visible",direction:n.textDirection,fill:fa.color,"text-bound":[fa.backgroundColor,fa.borderColor,fa.borderThickness,
fa.borderPadding,fa.borderRadius,fa.borderDash]})):wa.label[4]=K.text(F,Ba),wa.label[4].data("groupId",eb).css(Db)):wa.label[4]&&wa.label[4].hide()&&wa.label[4].attr({"text-bound":[]}),F={path:qb,ishot:!$,"stroke-width":ca.lowerWhiskerThickness,cursor:oa?"pointer":u,"stroke-linecap":"round"},Eb?Eb.animateWith(Z,U,F,L,S,sb&&Bb):(Eb=ma.graphics.lowerWhiskerEle=K.path(F,Fa),Xb=!0),Eb.attr({stroke:ca.lowerWhiskerColor}),Eb.shadow({opacity:ca.lowerWhiskerShadowOpacity},Da),Xa=ga(Ra)+$a.borderWidth%2*.5,
F={path:["M",Na,Va||Xa,"H",Na+ha]},(wb=ma.graphics.midLineElem)?wb.animateWith(Z,U,F,L,S,sb&&Bb):(wb=ma.graphics.midLineElem=K.path(F,Ka),Vb=!0),wb.attr(k),Hb={upperBoxElem:ca.setUpperBoxRolloverAttr,lowerBoxElem:ca.setLowerBoxRolloverAttr,upperBoxBorderEle:ca.setUpperBoxBorderRolloverAttr,lowerBoxBorderEle:ca.setLowerBoxBorderRolloverAttr,upperQuartileEle:ca.setUpperQuartileRolloverAttr,lowerQuartileEle:ca.setLowerQuartileRolloverAttr,midLineElem:ca.setMedianRolloverAttr},Ib={upperBoxElem:ca.setUpperBoxRolloutAttr,
lowerBoxElem:ca.setLowerBoxRolloutAttr,upperBoxBorderEle:ca.setUpperBoxBorderRolloutAttr,lowerBoxBorderEle:ca.setLowerBoxBorderRolloutAttr,upperQuartileEle:ca.setUpperQuartileRolloutAttr,lowerQuartileEle:ca.setLowerQuartileRolloutAttr,midLineElem:ca.setMedianRolloutAttr},ib.data("groupId",eb).data("eventArgs",va).data("showHoverEffect",Lb).data("setRolloverAttr",Hb).data("setRolloutAttr",Ib),Pb&&ib.click(Mb).hover(Nb(ma.graphics),Ob(ma.graphics)),Ma.data("groupId",eb).data("eventArgs",va).data("showHoverEffect",
Lb).data("setRolloverAttr",Hb).data("setRolloutAttr",Ib),Qb&&Ma.click(Mb).hover(Nb(ma.graphics),Ob(ma.graphics)),kb.data("groupId",eb).data("eventArgs",va).data("showHoverEffect",Lb).data("setRolloverAttr",Hb).data("setRolloutAttr",Ib),Rb&&kb.click(Mb).hover(Nb(ma.graphics),Ob(ma.graphics)),db.data("groupId",eb).data("eventArgs",va).data("showHoverEffect",Lb).data("setRolloverAttr",Hb).data("setRolloutAttr",Ib),Sb&&db.click(Mb).hover(Nb(ma.graphics),Ob(ma.graphics)),vb.data("groupId",eb).data("eventArgs",
va).data("showHoverEffect",Lb).data("setRolloverAttr",Hb).data("setRolloutAttr",Ib),Tb&&vb.click(Mb).hover(Nb(ma.graphics),Ob(ma.graphics)),Wa.data("groupId",eb).data("eventArgs",va).data("showHoverEffect",Lb).data("setRolloverAttr",Hb).data("setRolloutAttr",Ib),Ub&&Wa.click(Mb).hover(Nb(ma.graphics),Ob(ma.graphics)),wb.data("groupId",eb).data("eventArgs",va).data("showHoverEffect",Lb).data("setRolloverAttr",Hb).data("setRolloutAttr",Ib),Vb&&wb.click(Mb).hover(Nb(ma.graphics),Ob(ma.graphics)),bb.data("groupId",
eb).data("eventArgs",va).data("showHoverEffect",Lb).data("setRolloverAttr",Hb).data("setRolloutAttr",Ib),Wb&&bb.click(Mb).hover(Nb(ma.graphics),Ob(ma.graphics)),Eb.data("groupId",eb).data("eventArgs",va).data("showHoverEffect",Lb).data("setRolloverAttr",Hb).data("setRolloutAttr",Ib),Xb&&Eb.click(Mb).hover(Nb(ma.graphics),Ob(ma.graphics)),lb=Ea?gc:"middle",F={text:sa.displayValue,x:H+ha/2,title:sa.originalText||u,y:Ja-gb,"text-anchor":Ea?"start":lb,"vertical-align":Ea?"middle":"bottom",visibility:"visible",
direction:n.textDirection,fill:fa.color,transform:K.getSuggestiveRotation(Ea,H+ha/2,Ja-gb),"text-bound":[fa.backgroundColor,fa.borderColor,fa.borderThickness,fa.borderPadding,fa.borderRadius,fa.borderDash]},ba(sa.displayValue)&&sa.displayValue!==y&&ca.showQ3Values?(wa.label[0]?(wa.label[0].show(),zb=H+ha/2,Ab=Va||Ja-gb,wa.label[0].animateWith(Z,U,{x:zb,y:Ab,transform:K.getSuggestiveRotation(Ea,zb,Ab)},L,S,sb&&Bb),wa.label[0].attr({text:sa.displayValue,title:sa.originalText||u,"text-anchor":Ea?"start":
lb,"vertical-align":Ea?"middle":"bottom",visibility:"visible",direction:n.textDirection,fill:fa.color,"text-bound":[fa.backgroundColor,fa.borderColor,fa.borderThickness,fa.borderPadding,fa.borderRadius,fa.borderDash]})):wa.label[0]=K.text(F,Ba),wa.label[0].data("groupId",eb).css(Db)):wa.label[0]&&wa.label[0].hide()&&wa.label[0].attr({"text-bound":[]}),F={text:$a.displayValue,x:Na+ha/2,y:Ra-gb,title:$a.originalText||u,"text-anchor":Ea?"start":lb,"vertical-align":Ea?"middle":"bottom",visibility:"visible",
direction:n.textDirection,fill:fa.color,transform:K.getSuggestiveRotation(Ea,Na+ha/2,Ra-gb),"text-bound":[fa.backgroundColor,fa.borderColor,fa.borderThickness,fa.borderPadding,fa.borderRadius,fa.borderDash]},ba($a.displayValue)&&$a.displayValue!==y&&ca.showMedianValues?(wa.label[1]?(wa.label[1].show(),zb=Na+ha/2,Ab=Va||Ra-gb,wa.label[1].animateWith(Z,U,{x:zb,y:Ab,transform:K.getSuggestiveRotation(Ea,zb,Ab)},L,S,sb&&Bb),wa.label[1].attr({text:$a.displayValue,title:$a.originalText||u,"text-anchor":Ea?
"start":lb,"vertical-align":Ea?"middle":"bottom",visibility:"visible",direction:n.textDirection,fill:fa.color,"text-bound":[fa.backgroundColor,fa.borderColor,fa.borderThickness,fa.borderPadding,fa.borderRadius,fa.borderDash]})):wa.label[1]=K.text(F,Ba),wa.label[1].data("groupId",eb).css(Db)):wa.label[1]&&wa.label[1].hide()&&wa.label[1].attr({"text-bound":[]}),F={text:Qa.displayValue,x:H+ha/2,y:ub+gb,title:Qa.originalText||u,"text-anchor":Ea?"start":lb,"vertical-align":Ea?"middle":"top",visibility:"visible",
direction:n.textDirection,fill:fa.color,transform:K.getSuggestiveRotation(Ea,H+ha/2,ub+gb),"text-bound":[fa.backgroundColor,fa.borderColor,fa.borderThickness,fa.borderPadding,fa.borderRadius,fa.borderDash]},ba(Qa.displayValue)&&Qa.displayValue!==y&&ca.showQ1Values?(wa.label[2]?(wa.label[2].show(),zb=H+ha/2,Ab=Va||ub+gb,wa.label[2].animateWith(Z,U,{x:zb,y:Ab,transform:K.getSuggestiveRotation(Ea,zb,Ab)},L,S,sb&&Bb),wa.label[2].attr({text:Qa.displayValue,title:Qa.originalText||u,"text-anchor":Ea?"start":
lb,"vertical-align":Ea?"middle":"top",visibility:"visible",direction:n.textDirection,fill:fa.color,"text-bound":[fa.backgroundColor,fa.borderColor,fa.borderThickness,fa.borderPadding,fa.borderRadius,fa.borderDash]})):wa.label[2]=K.text(F,Ba),wa.label[2].data("groupId",eb).css(Db)):wa.label[2]&&wa.label[2].hide()&&wa.label[2].attr({"text-bound":[]}),sb&&Bb(),$?(ib.tooltip(ja),Ma.tooltip(ja),kb.tooltip(ja),db.tooltip(ja),vb.tooltip(ja),Wa.tooltip(ja),wb.tooltip(ja),bb.tooltip(ja),Eb.tooltip(ja)):(ib.tooltip(!1),
Ma.tooltip(!1),kb.tooltip(!1),db.tooltip(!1),vb.tooltip(!1),Wa.tooltip(!1),wb.tooltip(!1),bb.tooltip(!1),Eb.tooltip(!1)),H+=ha/2,l.components.mean.components.data[I].config.xPos=H,l.components.sd.components.data[I].config.xPos=H,l.components.qd.components.data[I].config.xPos=H,l.components.md.components.data[I].config.xPos=H,Cb=0;Cb<n.maxNumberOfOutliers;Cb++)l.components.outliers[Cb].components.data[I].config.xPos=H;l.flag=!0;Zb&&l.remove()},remove:function(){var b=this.components,a=b.removeDataArr,
e=b.pool||(b.pool={element:[],hotElement:[],label:[]}),c=a.length,d,f=this.maxminFlag,k,l,m,n,p;for(m=0;m<c;m++)if(d=a[0],a.splice(0,1),d&&d.graphics){l=d.graphics;for(k in l)if("label"!==k)l[k].shadow({opacity:0}),l[k].hide();else for(n=l[k].length,p=0;p<n;p++)l[k][p]&&(l[k][p].shadow({opacity:0}),l[k][p].hide(),l[k][p].attr({"text-bound":[]}));d.graphics.element&&(e.element=e.element.concat(d.graphics.element));d.graphics.hotElement&&(e.hotElement=e.hotElement.concat(d.graphics.hotElement));d.graphics.label&&
(e.label=e.label.concat(d.graphics.label))}b.pool=e;f&&this.setMaxMin()},removeData:function(b,a,e){var c=this.components,d=c.data,f=c.removeDataArr||(c.removeDataArr=[]),k=c.mean.components.removeDataArr||(c.mean.components.removeDataArr=[]),l=c.sd.components.removeDataArr||(c.sd.components.removeDataArr=[]),m=c.md.components.removeDataArr||(c.md.components.removeDataArr=[]),n=c.qd.components.removeDataArr||(c.qd.components.removeDataArr=[]),p=this.config,q=this.groupManager,r=this.maxminFlag;a=
a||1;b=b||0;if(b+a===d.length)this.endPosition=!0;else if(0===b||void 0===b)this.endPosition=!1;c.removeDataArr=f=f.concat(d.splice(b,a));c.mean.components.removeDataArr=k.concat(c.mean.components.data.splice(b,a));c.sd.components.removeDataArr=l.concat(c.sd.components.data.splice(b,a));c.md.components.removeDataArr=m.concat(c.md.components.data.splice(b,a));c.qd.components.removeDataArr=n.concat(c.qd.components.data.splice(b,a));k=c.outliers.length;for(d=0;d<k;d++)l=c.outliers[d].components.removeDataArr||
(c.outliers[d].components.removeDataArr=[]),c.outliers[d].components.removeDataArr=l.concat(c.outliers[d].components.data.splice(b,a));q&&q.removeSumLabels&&q.removeSumLabels(b,a,this.positionIndex);k=f.length;for(d=0;d<k;d++)if(f[d]){b=f[d].config;if(b.setValue===p.maxValue||b.setValue===p.minValue)r=this.maxminFlag=!0;if(r)break}r&&this.setMaxMin();e&&this.draw()},_addLegendSubDS:function(b){var a;a=b.config;var d=b.chart.components.legend,c=a.anchorBgColor;a={anchorSide:a.anchorSides,legendBackgroundColor:this.config.upperBoxColor,
fillColor:ea(c),strokeColor:ea("#000000"),enabled:this.config.includeInLegend,label:this.JSONData.seriesname&&la(b.name),customLegendIcon:!1,spoke:a.dip?1:0,drawLine:a.drawLine?!0:!1,lineColor:x({color:c,alpha:"100"})};b.itemId=d.addItems(b,b.legendInteractivity,a)},_addLegendOutliers:function(b){var g=this.JSONData,e=this.chart.jsonData.chart,c=this.config,h=c.upperBoxColor,f=this.chart.components.legend,k=d(g.outliericoncolor,e.outliericoncolor,"#000000"),g={anchorSide:a(g.outliericonsides,e.outliericonsides,
3),fillColor:ea(k),legendBackgroundColor:h,strokeColor:ea("#000000"),enabled:c.includeInLegend,label:this.JSONData.seriesname&&"Outliers",customLegendIcon:!1,spoke:b[0].config.dip?1:0,drawLine:!1,datasetObj:b[0]};b[0]&&(b[0].itemId=f.addItems(b,this.legendInteractivityOutliers,g))},legendInteractivityOutliers:function(b,a){var d=this.config,c=a.config,h=a.graphics,f=d.itemHiddenStyle.color,d=d.itemStyle.color,k=c.fillColor,c=c.strokeColor,l,m;b.visible=b.visible?!1:!0;for(l=0;l<b.length;l++)m=b[l].visible,
b[l].visible=m?!1:!0,b[l].draw(),m?(h.legendItemSymbol&&h.legendItemSymbol.attr({fill:f,stroke:f}),h.legendItemText&&h.legendItemText.attr({fill:f}),h.legendIconLine&&h.legendIconLine.attr({stroke:f})):(h.legendItemSymbol&&h.legendItemSymbol.attr({fill:k,stroke:c}),h.legendItemText&&h.legendItemText.attr({fill:d}),h.legendIconLine&&h.legendIconLine.attr({stroke:k}))},_addLegend:function(){var b;b=this.config;var a=this.chart.components.legend,d=b.upperBoxColor;b={fillColor:x({FCcolor:{color:d+","+
b.lowerBoxColor,angle:90,ratio:"50, 0",alpha:"100, 100"}}),legendBackgroundColor:d,strokeColor:x("#000000"),rawFillColor:d,rawStrokeColor:"#000000",enabled:b.includeInLegend,label:la(this.JSONData.seriesname),index:this.index};this.itemId=a.addItems(this,this.legendInteractivity,b)},legendInteractivity:function(b,a){var d=this.config,c=b.visible,h=a.config,f=a.graphics,k=d.itemHiddenStyle.color,d=d.itemStyle,l=d.color,m=h.fillColor,h=h.strokeColor,n=a.index,p=b.subDS;c?b.hide():b.show();if(c)for(f.legendItemSymbol&&
f.legendItemSymbol.attr({fill:k,stroke:k}),f.legendItemText&&f.legendItemText.attr({fill:k}),f.legendItemLine&&f.legendItemLine.attr({stroke:k}),c=n+1;c<=n+p;c++)f=this.components.items[c].graphics,f.legendItemSymbol&&f.legendItemSymbol.attr({fill:k,stroke:k}),f.legendItemText&&f.legendItemText.attr({fill:k}),f.legendItemLine&&f.legendItemLine.attr({stroke:k});else for(f.legendItemSymbol&&f.legendItemSymbol.attr({fill:m,stroke:h}),f.legendItemText&&f.legendItemText.attr({fill:l}),f.legendItemLine&&
f.legendItemLine.attr({stroke:m}),c=n+1;c<=n+p;c++)f=this.components.items[c].graphics,h=this.components.items[c].config,l=d.color,m=h.fillColor,h=h.strokeColor,f.legendItemSymbol&&f.legendItemSymbol.attr({fill:m,stroke:h}),f.legendItemText&&f.legendItemText.attr({fill:l}),f.legendItemLine&&f.legendItemLine.attr({stroke:m})},show:function(){var b=this.graphics.upperBoxContainer,a=this.graphics.lowerBoxContainer,d=this.graphics.medianContainer,c=this.graphics.upperWhiskerContainer,h=this.graphics.lowerWhiskerContainer,
f=this.graphics.dataLabelContainer,k=this.graphics.shadowContainer,l=this.chart,m=this.yAxis;l._chartAnimation();this.visible=!0;this.components.outliers.visible=!0;this._conatinerHidden=!1;b.show();a.show();d.show();c.show();h.show();f.show();k.show();for(b=0;b<this.config.maxNumberOfOutliers;b++)this.components.outliers[b].show();l._setAxisLimits();m.draw();l._drawDataset();this.components.mean.show();this.components.sd.show();this.components.qd.show();this.components.md.show()},hide:function(){var b=
this.chart,a=this.yAxis,d,c;b._chartAnimation();this.visible=!1;d=this.config.maxNumberOfOutliers;for(c=0;c<d;c++)this.components.outliers[c].hide();b._setAxisLimits();a.draw();b._drawDataset();this.components.mean.hide();this.components.sd.hide();this.components.qd.hide();this.components.md.hide();d=this.config.maxNumberOfOutliers||this.components.outliers.length;this.components.outliers.visible=!1;for(c=0;c<d;c++)this.components.outliers[c].visible=!1,this.components.outliers[c].draw()}},"Column",
{showplotborder:void 0,plotborderdashlen:void 0,plotborderdashgap:void 0,plotfillalpha:void 0,useroundedges:void 0,ratio:void 0,plotborderthickness:void 0,showvalues:void 0,valuepadding:void 0,showtooltip:void 0,maxcolwidth:void 0,rotatevalues:void 0,use3dlighting:void 0,whiskerslimitswidthratio:void 0,outliersupperrangeratio:void 0,outlierslowerrangeratio:void 0,showalloutliers:void 0,showmean:void 0,showsd:void 0,showmd:void 0,showqd:void 0,showminvalues:void 0,showmaxvalues:void 0,showq1values:void 0,
showq3values:void 0,showmedianvalues:void 0}]);FusionCharts.register("component",["dataset","subDS",{show:function(){var b=this.chart,a=this.yAxis;b._chartAnimation();this.visible=!0;this._conatinerHidden=!1;b._setAxisLimits();a.draw();this.draw()},hide:function(){var b=this.chart,a=this.yAxis;b._chartAnimation();this.visible=!1;b._setAxisLimits();a.draw();this.draw()},getEventArgs:function(){return{datasetName:this.name,datasetIndex:this.index,id:(this.config||{}).userID,visible:this.visible}},legendInteractivity:function(b,
a){var d=this.config,c=b.visible,h=a.config,f=a.graphics,k=d.itemHiddenStyle.color,d=d.itemStyle.color,l=h.fillColor,m,n=h.strokeColor;c?b.hide():b.show();c={legendItemSymbol:{fill:c?k:l,stroke:c?k:n},legendItemText:{fill:c?k:d},legendItemLine:{stroke:c?k:h.lineAttr&&h.lineAttr.stroke}};for(m in f)(h=f[m])&&c[m]&&h.attr(c[m])}},"Line"]);FusionCharts.register("component",["datasetGroup","boxandwhisker2d",{draw:function(){var b=this.positionStackArr,a=b.length,d,c,h,f;d=this.chart;c=d.graphics.datasetGroup;
var k=d.graphics;h=d.components.canvas.config.clip["clip-canvas"].slice(0);f=W([],d.components.canvas.config.clip["clip-canvas-init"]);var k=k.datalabelsGroup,l=d.get("config","animationObj"),m=l.animType,n=l.animObj,p=l.dummyObj,l=l.duration;d.fireInitialAnimation&&(c.attr({"clip-rect":f}),k.attr({"clip-rect":f}));d.fireInitialAnimation=!1;c.animateWith(p,n,{"clip-rect":h},l,m);k.animateWith(p,n,{"clip-rect":h},l,m);this.preDrawCalculate();this.drawSumValueFlag=!0;for(d=0;d<a;d++)for(c=b[d],h=c.length,
this.manageClip=!0,c=0;c<h;c++)f=b[d][c].dataSet,f.draw()}},xa]);M("heatmap",{friendlyName:"Heatmap Chart",standaloneInit:!0,creditLabel:n,hasLegend:!0,tooltipsepchar:": ",tooltipConstraint:"chart",defaultDatasetType:"heatmap",applicableDSList:{heatmap:!0},isSingleSeries:!0,hasGradientLegend:!0,_createAxes:function(){var b=this.components,a=FusionCharts.register("component",["axis","cartesian"]),d;b.yAxis=[];b.xAxis=[];b.yAxis[0]=d=new a;b.xAxis[0]=b=new a;d.chart=this;b.chart=this;d.init();b.init()},
_postSpaceManagement:function(){var b=this.config,a=b.placeAxisLabelsOnTop,d=this.components,c=d.xAxis&&d.xAxis[0],h=d.yAxis&&d.yAxis[0],f=d.legend,k=b.xDepth,d=d.canvas.config.canvasBorderWidth;c&&c.setAxisDimention({x:b.canvasLeft,y:a?b.canvasTop+(b.shift||0)-d:b.canvasBottom+(b.shift||0)+d,opposite:b.canvasTop-d,axisLength:b.canvasWidth});h&&h.setAxisDimention({x:b.canvasLeft-d,y:b.canvasTop,opposite:b.canvasRight+d,axisLength:b.canvasHeight});c&&c.shiftLabels(-k,0);f.postSpaceManager();this.config.realtimeEnabled&&
this._setRealTimeCategories&&this._setRealTimeCategories();this._adjustCanvasPadding()},_adjustCanvasPadding:function(){},_feedAxesRawData:function(){var b=this.components,g=b.colorManager,e=this.jsonData,c=e.chart,h;h=this.is3d;var f=v.chartPaletteStr,f=h?f.chart3D:f.chart2D;h={outCanfontFamily:d(c.outcnvbasefont,c.basefont,"Verdana,sans"),outCanfontSize:hb(c.outcnvbasefontsize,c.basefontsize,10),outCancolor:d(c.outcnvbasefontcolor,c.basefontcolor,g.getColor(f.baseFontColor)).replace(/^#?([a-f0-9]+)/ig,
"#$1"),axisNamePadding:c.xaxisnamepadding,axisValuePadding:c.labelpadding,axisNameFont:c.xaxisnamefont,axisNameFontSize:c.xaxisnamefontsize,axisNameFontColor:c.xaxisnamefontcolor,axisNameFontBold:c.xaxisnamefontbold,axisNameFontItalic:c.xaxisnamefontitalic,axisNameBgColor:c.xaxisnamebgcolor,axisNameBorderColor:c.xaxisnamebordercolor,axisNameAlpha:c.xaxisnamealpha,axisNameFontAlpha:c.xaxisnamefontalpha,axisNameBgAlpha:c.xaxisnamebgalpha,axisNameBorderAlpha:c.xaxisnameborderalpha,axisNameBorderPadding:c.xaxisnameborderpadding,
axisNameBorderRadius:c.xaxisnameborderradius,axisNameBorderThickness:c.xaxisnameborderthickness,axisNameBorderDashed:c.xaxisnameborderdashed,axisNameBorderDashLen:c.xaxisnameborderdashlen,axisNameBorderDashGap:c.xaxisnameborderdashgap,useEllipsesWhenOverflow:c.useellipseswhenoverflow,divLineColor:d(c.vdivlinecolor,c.divlinecolor,g.getColor(f.divLineColor)),divLineAlpha:d(c.vdivlinealpha,c.divlinealpha,h?g.getColor("divLineAlpha3D"):g.getColor("divLineAlpha")),divLineThickness:a(c.vdivlinethickness,
c.divlinethickness,1),divLineIsDashed:Boolean(a(c.vdivlinedashed,c.vdivlineisdashed,c.divlinedashed,c.divlineisdashed,0)),divLineDashLen:a(c.vdivlinedashlen,c.divlinedashlen,4),divLineDashGap:a(c.vdivlinedashgap,c.divlinedashgap,2),showAlternateGridColor:a(c.showalternatevgridcolor,0),alternateGridColor:d(c.alternatevgridcolor,g.getColor("altVGridColor")),alternateGridAlpha:d(c.alternatevgridalpha,g.getColor("altVGridAlpha")),numDivLines:c.numvdivlines,labelFont:c.labelfont,labelFontSize:c.labelfontsize,
labelFontColor:c.labelfontcolor,labelFontAlpha:c.labelalpha,labelFontBold:c.labelfontbold,labelFontItalic:c.labelfontitalic,axisName:c.xaxisname,axisMinValue:c.xaxisminvalue,axisMaxValue:c.xaxismaxvalue,setAdaptiveMin:c.setadaptivexmin,adjustDiv:c.adjustvdiv,labelDisplay:c.labeldisplay,showLabels:a(c.showxaxislabels,c.showlabels),rotateLabels:c.rotatexaxislabels,slantLabel:a(c.slantlabels,c.slantlabel),labelStep:a(c.labelstep,c.xaxisvaluesstep),showAxisValues:a(c.showxaxisvalues,c.showxaxisvalue),
maxLabelHeight:c.maxlabelheight,showZeroPlane:c.showvzeroplane,zeroPlaneColor:c.vzeroplanecolor,zeroPlaneThickness:c.vzeroplanethickness,zeroPlaneAlpha:c.vzeroplanealpha,showZeroPlaneValue:c.showvzeroplanevalue,trendlineColor:c.trendlinecolor,trendlineToolText:c.trendlinetooltext,trendlineThickness:c.trendlinethickness,trendlineAlpha:c.trendlinealpha,showTrendlinesOnTop:c.showtrendlinesontop,showAxisLine:a(c.showxaxisline,c.showaxislines,c.drawAxisLines,0),axisLineThickness:a(c.xaxislinethickness,
c.axislinethickness,1),axisLineAlpha:a(c.xaxislinealpha,c.axislinealpha,100),axisLineColor:d(c.xaxislinecolor,c.axislinecolor,"#000000")};g={outCanfontFamily:d(c.outcnvbasefont,c.basefont,"Verdana,sans"),outCanfontSize:hb(c.outcnvbasefontsize,c.basefontsize,10),outCancolor:d(c.outcnvbasefontcolor,c.basefontcolor,g.getColor(f.baseFontColor)).replace(/^#?([a-f0-9]+)/ig,"#$1"),axisNamePadding:c.yaxisnamepadding,axisValuePadding:c.yaxisvaluespadding,axisNameFont:c.yaxisnamefont,axisNameFontSize:c.yaxisnamefontsize,
axisNameFontColor:c.yaxisnamefontcolor,axisNameFontBold:c.yaxisnamefontbold,axisNameFontItalic:c.yaxisnamefontitalic,axisNameBgColor:c.yaxisnamebgcolor,axisNameBorderColor:c.yaxisnamebordercolor,axisNameAlpha:c.yaxisnamealpha,axisNameFontAlpha:c.yaxisnamefontalpha,axisNameBgAlpha:c.yaxisnamebgalpha,axisNameBorderAlpha:c.yaxisnameborderalpha,axisNameBorderPadding:c.yaxisnameborderpadding,axisNameBorderRadius:c.yaxisnameborderradius,axisNameBorderThickness:c.yaxisnameborderthickness,axisNameBorderDashed:c.yaxisnameborderdashed,
axisNameBorderDashLen:c.yaxisnameborderdashlen,axisNameBorderDashGap:c.yaxisnameborderdashgap,axisNameWidth:c.yaxisnamewidth,useEllipsesWhenOverflow:c.useellipseswhenoverflow,rotateAxisName:a(c.rotateyaxisname,1),axisName:c.yaxisname,showAlternateGridColor:a(c.showalternatehgridcolor,1),alternateGridColor:d(c.alternatehgridcolor,g.getColor("altHGridColor")),alternateGridAlpha:d(c.alternatehgridalpha,g.getColor("altHGridAlpha")),numDivLines:c.numdivlines,axisMinValue:c.yaxisminvalue,axisMaxValue:c.yaxismaxvalue,
setAdaptiveMin:c.setadaptiveymin,adjustDiv:c.adjustdiv,labelStep:c.yaxisvaluesstep,showLabels:a(c.showyaxislabels,c.showlabels),maxLabelWidthPercent:c.maxlabelwidthpercent,showAxisValues:a(c.showyaxisvalues,c.showyaxisvalue),divLineColor:d(c.hdivlinecolor,g.getColor(f.divLineColor)),divLineAlpha:d(c.hdivlinealpha,g.getColor("divLineAlpha")),divLineThickness:a(c.hdivlinethickness,1),divLineIsDashed:Boolean(a(c.hdivlinedashed,c.hdivlineisdashed,0)),divLineDashLen:a(c.hdivlinedashlen,4),divLineDashGap:a(c.hdivlinedashgap,
2),showZeroPlane:c.showzeroplane,zeroPlaneColor:c.zeroplanecolor,zeroPlaneThickness:c.zeroplanethickness,zeroPlaneAlpha:c.zeroplanealpha,showZeroPlaneValue:c.showzeroplanevalue,trendlineColor:c.trendlinecolor,trendlineToolText:c.trendlinetooltext,trendlineThickness:c.trendlinethickness,trendlineAlpha:c.trendlinealpha,showTrendlinesOnTop:c.showtrendlinesontop,showAxisLine:a(c.showyaxisline,c.showaxislines,c.drawAxisLines,0),axisLineThickness:a(c.yaxislinethickness,c.axislinethickness,1),axisLineAlpha:a(c.yaxislinealpha,
c.axislinealpha,100),axisLineColor:d(c.yaxislinecolor,c.axislinecolor,"#000000")};h.vtrendlines=e.vtrendlines;g.trendlines=e.trendlines;e=b.yAxis[0];b=b.xAxis[0];e.setCommonConfigArr(g,!0,!0,!1);b.setCommonConfigArr(h,!1,!1,this.config.placeAxisLabelsOnTop?!0:!1);e.configure();b.configure();this._setCategories()},_setAxisLimits:function(){},_setCategories:function(){var b=this.components,a=this.jsonData,e=b.xAxis,b=b.yAxis,c=a.dataset&&a.dataset[0].data&&a.dataset[0].data.length,h,f,k,l,m,n=[],p=
[],q;if(!a.columns||!a.rows)for(a.columns={},a.columns.column=l=[],a.rows={},a.rows.row=m=[],h=0;h<c;h++){k=f=!0;for(q=0;q<l.length;q++)a.dataset[0].data[h].columnid==l[q].id&&(f=!1);f&&(f={id:a.dataset[0].data[h].columnid,label:a.dataset[0].data[h].columnid},a.columns.column.push(f));for(q=0;q<m.length;q++)a.dataset[0].data[h].rowid==m[q].id&&(k=!1);k&&(k={id:a.dataset[0].data[h].rowid,label:a.dataset[0].data[h].rowid},a.rows.row.push(k))}l=a.columns.column;m=a.rows.row;for(h=0;h<(l&&l.length);h++)l[h].label=
d(l[h].label,l[h].name,l[h].id),void 0!==l[h].label&&n.push(l[h]);a.columns.column=n;for(h=0;h<(m&&m.length);h++)m[h].label=d(m[h].label,m[h].name,m[h].id),void 0!==m[h].label&&p.push(m[h]);a.rows.row=p;a.columns&&e[0].setAxisPadding(.5,.5);a.columns&&e[0].setCategory(a.columns.column);a.columns&&b[0].setAxisPadding(.5,.5);a.rows&&b[0].setCategory(a.rows.row);e[0].setAxisData({categoryNumDivLines:a.columns.column.length-1,categoryDivLinesFromZero:0,showAlternateGridColor:0});b[0].setAxisData({categoryNumDivLines:a.rows.row.length-
1,categoryDivLinesFromZero:0,showAlternateGridColor:0})}},M.mscartesian);FusionCharts.register("component",["dataset","HeatMap",{type:"heatmap",configure:function(){var b=this.chart,g=b.components,e=g.postLegendInitFn,c=g.gradientLegend,h=b.config.dataLabelStyle,f=this.config,k=b.jsonData,l=this.JSONData,m=l.data,n=b.singleseries,p=m&&m.length,q=b.jsonData.chart,r=b.components.colorManager,t,w=f.plotColor=r.getPlotColor(this.index||this.positionIndex),D=a(l.dashed,q.plotborderdashed),K=a(q.useplotgradientcolor,
1),I=a(q.showtooltip,1),T=v.parseUnsafeString,z=T(q.yaxisname),X=T(q.xaxisname),C=T(d(q.tooltipsepchar,": ")),M=v.parseTooltext,W,Z,$,H,J,R,ba,Q,S,U,ja,L,Y,da,ia,aa,G,pa,oa,O,ha,la,ka,na=k.colorrange||{},ta=b.components.xAxis[0],ma=b.components.yAxis[0],za,ya,va=f.mapByPercent=a(na.mapbypercent,0),ca=f.mapByCategory=a(q.mapbycategory,0),Aa=b.jsonData,ua=Aa.colorrange&&a(Aa.colorrange.gradient),Ba=v.nonGradientColorRange,xa,Ca,Ha,Ka,Fa,Ga,Ia,Da,Ja,sa,Pa,Oa,Qa,Ua=v.getDashStyle,ub=this.components.data,
$a=b.components.numberFormatter,Ta,Ra,Za=b.isBar,cb=b.is3D,fb,hb,ib,kb,vb,Ma,db=-Infinity,Wa=Infinity,wb,Na,jb=F(q.tltype,y),Xa=F(q.trtype,y),fa=F(q.bltype,y),nb=F(q.brtype,y),Ea,gb,Db,Ya,lb,qb,wa,eb,rb,Fb,xb,yb,ab,mb,bb,Cb,Eb;t=f.showplotborder=a(q.showplotborder,cb?0:1);f.plotDashLen=ba=a(q.plotborderdashlen,5);f.plotDashGap=Q=a(q.plotborderdashgap,4);f.plotfillAngle=L=a(360-q.plotfillangle,Za?180:90);f.plotFillAlpha=Y=d(l.alpha,q.plotfillalpha,La);f.plotColor=w=d(l.color,w);f.isRoundEdges=U=a(q.useroundedges,
0);f.plotRadius=a(q.useRoundEdges,f.isRoundEdges?1:0);f.plotFillRatio=da=d(l.ratio,q.plotfillratio);f.plotgradientcolor=ia=v.getDefinedColor(q.plotgradientcolor,r.getColor("plotGradientColor"));!K&&(ia=u);f.plotBorderAlpha=aa=t?d(q.plotborderalpha,Y,La):0;f.plotBorderColor=G=d(q.plotbordercolor,cb?"#ffffff":r.getColor("plotBorderColor"));f.plotBorderThickness=S=a(q.plotborderthickness,1);f.plotBorderDashStyle=oa=D?Ua(ba,Q,S):"none";f.showValues=a(l.showvalues,q.showvalues,1);f.valuePadding=a(q.valuepadding,
2);f.enableAnimation=fb=a(q.animation,q.defaultanimation,1);f.animation=fb?{duration:1E3*a(q.animationduration,1)}:!1;f.transposeAnimation=a(q.transposeanimation,fb);f.transposeAnimDuration=1E3*a(q.transposeanimduration,.2);f.showShadow=U||cb?a(q.showshadow,1):a(q.showshadow,r.getColor("showShadow"));f.showHoverEffect=ja=a(q.plothovereffect,q.showhovereffect,void 0);f.showTooltip=a(q.showtooltip,1);f.definedGroupPadding=N(a(q.plotspacepercent),0);f.plotSpacePercent=N(a(q.plotspacepercent,20)%100,
0);f.maxColWidth=a(Za?q.maxbarheight:q.maxcolwidth,50);f.plotPaddingPercent=a(q.plotpaddingpercent);f.rotateValues=a(q.rotatevalues)?270:0;f.placeValuesInside=a(q.placevaluesinside,0);xb=h.fontFamily;yb=h.fontSize;ab=h.color;mb=h.fontWeight;bb=h.fontStyle;f.tlLabelStyle={fontFamily:d(q.tlfont,xb),fontSize:a(q.tlfontsize,yb.replace(/px/i,u))+"px",color:ea(d(q.tlfontcolor,ab),100),fontWeight:mb,fontStyle:bb};ec(f.tlLabelStyle);f.trLabelStyle={fontFamily:d(q.trfont,xb),fontSize:a(q.trfontsize,yb.replace(/px/i,
u))+"px",color:ea(d(q.trfontcolor,ab),100),fontWeight:mb,fontStyle:bb};f.brLabelStyle={fontFamily:d(q.brfont,xb),fontSize:a(q.brfontsize,yb.replace(/px/i,u))+"px",color:ea(d(q.brfontcolor,ab),100),fontWeight:mb,fontStyle:bb};f.blLabelStyle={fontFamily:d(q.blfont,xb),fontSize:a(q.blfontsize,yb.replace(/px/i,u))+"px",color:ea(d(q.blfontcolor,ab),100),fontWeight:mb,fontStyle:bb};f.use3DLighting=a(q.use3dlighting,1);f.parentYAxis=hb="s"===d(l.parentyaxis&&l.parentyaxis.toLowerCase(),"p")?1:0;ub||(ub=
this.components.data=[]);for(Ma=0;Ma<p;Ma++)O=m&&m[Ma],ka=(la=ub[Ma])&&la.config,la||(la=ub[Ma]={graphics:{}}),la.config||(ka=ub[Ma].config={}),ka.showValue=a(O.showvalue,f.showValues),ka.setValue=ha=$a.getCleanValue(O.value),ka.setLink=d(O.link),ka.toolTipValue=Ta=$a.dataLabels(ha,hb),ka.setDisplayValue=Ra=T(O.displayvalue),ka.displayValue=d(Ra,Ta),ib=a(O.dashed),kb=a(O.dashlen,ba),vb=Q=a(O.dashgap,Q),db=N(db,ha),Wa=E(Wa,ha),ka.plotBorderDashStyle=pa=1===ib?Ua(kb,vb,S):0===ib?"none":oa,n?(w=r.getPlotColor(Ma),
w=d(O.color,w),da=d(O.ratio,f.plotFillRatio)):w=d(O.color,f.plotColor),ka.plotFillAlpha=Y=d(O.alpha,f.plotFillAlpha),0>ha&&!U&&(J=L,L=Za?180-L:360-L),ka.colorArr=v.graphics.getColumnColor(w+","+f.plotgradientcolor,Y,da=f.plotFillRatio,L,U,f.plotBorderColor,aa.toString(),Za?1:0,cb?!0:!1),W=ka.toolTipValue,J&&(L=J);f.maxValue=db;f.minValue=Wa;wb=db-Wa;if(ua&&!ca)e({min:Wa,max:db}),this.components.colorRange=na=c.colorRange;else{this.components.colorRange=na=new Ba({colorRange:k.colorrange,dataMin:Wa,
dataMax:db,sortLegend:0,mapByCategory:ca,defaultColor:"cccccc",numberFormatter:$a});f.colorMap=[];for(Ma=0;Ma<na.colorArr.length;Ma++)f.colorMap[Ma]={config:na.colorArr[Ma],dataSet:this},f.colorMap[Ma].config.visible=!0;0===f.colorMap.length&&(b.setChartMessage(),c&&c.elem&&c.elem.gl.carpet.group.hide())}for(Ma=0;Ma<p;Ma++)O=m&&m[Ma],ka=(la=ub[Ma])&&la.config,ka.percentValue=va?rb=O.value&&ga((O.value-Wa)/wb*1E4)/100:void 0,ka.value=Cb=ca?O.colorrangelabel||O.categoryid:va?rb:ka.setValue,ua&&!ca?
Eb=na.getColorByValue(Cb):(Na=na.getColorObj(Cb),la.legendItemIndex=Na.seriesIndex),void 0===Na&&void 0===Eb?ka.visible=!1:Na&&Na.outOfRange?(ka.visible=!1,ka.displayValue=u):(ka.visible=!0,w=d(O.color,Na&&Na.code||Eb),ka.color=ea(w,d(O.alpha,f.plotFillAlpha)),0!==ja&&(xa=d(O.hovercolor,l.hovercolor,q.plotfillhovercolor,q.columnhovercolor,w),Ca=d(O.hoveralpha,l.hoveralpha,q.plotfillhoveralpha,q.columnhoveralpha,"25"),Ha=d(O.hovergradientcolor,l.hovergradientcolor,q.plothovergradientcolor,ia),!Ha&&
(Ha=u),Ka=d(O.hoverratio,l.hoverratio,q.plothoverratio,da),Fa=a(360-O.hoverangle,360-l.hoverangle,360-q.plothoverangle,L),Ga=d(O.borderhovercolor,l.borderhovercolor,q.plotborderhovercolor,G),Ia=d(O.borderhoveralpha,l.borderhoveralpha,q.plotborderhoveralpha,aa,Y),Da=a(O.borderhoverthickness,l.borderhoverthickness,q.plotborderhoverthickness,S),Ja=a(O.borderhoverdashed,l.borderhoverdashed,q.plotborderhoverdashed),sa=a(O.borderhoverdashgap,l.borderhoverdashgap,q.plotborderhoverdashgap,ba),Pa=a(O.borderhoverdashlen,
l.borderhoverdashlen,q.plotborderhoverdashlen,Q),Oa=Ja?Ua(Pa,sa,Da):pa,1==ja&&xa===w&&(xa=ob(xa,70)),Qa=v.graphics.getColumnColor(xa,Ca,Ka,Fa,U,Ga,Ia.toString(),Za?1:0,cb?!0:!1),ka.setRolloutAttr={fill:x(ka.color),stroke:t&&x(Qa[1]),"stroke-width":S,"stroke-dasharray":pa},ka.setRolloverAttr={fill:x(Qa[0]),stroke:t&&x(Qa[1]),"stroke-width":Da,"stroke-dasharray":Oa}),va&&(rb=$a.percentValue(rb)),ka.setValue=ha=$a.getCleanValue(O.value),ka.toolTipValue=Ta=$a.dataLabels(ha,hb),W=ka.toolTipValue,$=F(T(d(O.tooltext,
l.plottooltext,q.plottooltext))),ka.tlLabel=Ea=T(d(O.tllabel,O.ltlabel)),ka.trLabel=gb=T(d(O.trlabel,O.rtlabel)),ka.blLabel=Db=T(d(O.bllabel,O.lblabel)),ka.brLabel=Ya=T(d(O.brlabel,O.rblabel)),Ra=F(T(O.displayvalue)),Fb=ca?Ra:d(O.displayvalue,W),ka.displayValue=d(Ra,rb,ka.toolTipValue),jb!==y&&(lb="<b>"+jb+C+"</b>"),Xa!==y&&(qb="<b>"+Xa+C+"</b>"),fa!==y&&(wa="<b>"+fa+C+"</b>"),nb!==y&&(eb="<b>"+nb+C+"</b>"),za=ta.getCategoryFromId(m[Ma].columnid.toLowerCase()),ya=ma.getCategoryFromId(m[Ma].rowid.toLowerCase()),
I?(null===W?R=!1:void 0!==$?(H=[1,2,5,6,7,14,93,94,95,96,97,98,112,113,114,115,116,117],Z={formattedValue:W,value:O.value,yaxisName:z,xaxisName:X,displayValue:Ra,percentValue:va?rb:y,tlLabel:Ea,trLabel:gb,blLabel:Db,brLabel:Ya,rowLabel:ya.catObj&&ya.catObj.label,columnLabel:za.catObj&&za.catObj.label,percentDataValue:va?rb:y,trtype:Xa,tltype:jb,brType:nb,blType:fa,colorRangeLabel:ka.colorRangeLabel},R=M($,H,Z,O,q,Z)):R=(va?"<b>Value"+C+"</b>"+W+"<br /><b>Percentage"+C+"</b>"+rb:Fb)+(Ea!==y?"<br />"+
(lb+Ea):y)+(gb!==y?"<br />"+qb+gb:y)+(Db!==y?"<br />"+wa+Db:y)+(Ya!==y?"<br />"+eb+Ya:y),ka.toolText=R,ka.setTooltext=R):R=!1);!1===b.hasLegend||ua&&!ca||this._addLegend()},init:function(b){var d=this.chart,e=d.components,c=b.parentyaxis&&"s"===b.parentyaxis.toLowerCase()?1:0,e=e.yAxis[c];if(!b)return!1;this.JSONData=b;this.yAxis=e;this.chartGraphics=d.chartGraphics;this.components={};this.graphics={};this.visible=1===a(this.JSONData.visible,!Number(this.JSONData.initiallyhidden),1);this.configure()},
_addLegend:function(){var b=this.components.data,d=this.chart,e=d.jsonData.chart,c,h,f=this.config.colorMap,k=this.components.colorRange,l,m,n,p;m=d.components.legend;e=a(e.us3dlighting,e.useplotgradientcolor,1);m.emptyItems();m=0;for(n=f.length;m<n;m++)p=f[m],l=k.colorArr[m].code,c=ob(l,60).replace($,na),ob(l,40),e?(h=ob(l,40),h={FCcolor:{color:l+","+l+","+h,ratio:"0,70,30",angle:270,alpha:"100,100,100"}}):h={FCcolor:{color:l,angle:0,ratio:"0",alpha:"100"}},c={fillColor:x(h),label:p.config.label,
rawFillColor:l,strokeColor:x(c),datasetObj:this},f[m].legendItemId=d.components.legend.addItems(p,this.legendInteractivity,c);for(m=0;m<b.length;m++)for(e=k.getColorObj(b[m].config.value).code,d=0;d<f.length;d++)if(f[d].config.code==e){b[m].legendItemId=f[d].legendItemId;b[m].datasetIndex=d;b[m].datasetName=f[d].config.label;break}},legendInteractivity:function(a,d){var e=this.config,c=a.config.visible,h=a.dataSet,f=d.config,k=d.graphics,l=e.itemHiddenStyle.color,e=e.itemStyle.color,m=f.fillColor,
f=f.strokeColor;c?h.hide(a):h.show(a);c?(k.legendItemSymbol&&k.legendItemSymbol.attr({fill:l,stroke:l}),k.legendItemText&&k.legendItemText.attr({fill:l}),k.legendIconLine&&k.legendIconLine.attr({stroke:l})):(k.legendItemSymbol&&k.legendItemSymbol.attr({fill:m,stroke:f}),k.legendItemText&&k.legendItemText.attr({fill:e}),k.legendIconLine&&k.legendIconLine.attr({stroke:m}))},hide:function(a){var d=this.components.data,e=this.chart.get("config","animationObj"),c=e.animType,h=e.animObj,f=e.dummyObj,e=
e.duration,k=this.components.colorRange,l,m,n,p,q;p=a.config.code;l=0;for(m=d.length;l<m;l++)q=k.getColorObj(d[l].config.value).code,n=d[l].config,p===q&&(d[l].graphics.element&&d[l].graphics.element.animateWith(f,h,{"fill-opacity":0,"stroke-width":0},e,c),d[l].graphics.hotElement&&d[l].graphics.hotElement.hide(),d[l].graphics.valEle&&d[l].graphics.valEle.hide(),d[l].graphics.tlLabel&&d[l].graphics.tlLabel.hide(),d[l].graphics.trLabel&&d[l].graphics.trLabel.hide(),d[l].graphics.blLabel&&d[l].graphics.blLabel.hide(),
d[l].graphics.brLabel&&d[l].graphics.brLabel.hide(),n.visible=!1,d[l].visible=!1);a.visible=!1;a.config.visible=!1},show:function(a){var d=this.components.data,e=this.config,c=this.chart.get("config","animationObj"),h=c.animType,f=c.animObj,k=c.dummyObj,c=c.duration,l,m,n=this.components.colorRange,p,q,r,t;r=a.config.code;p=0;for(q=d.length;p<q;p++)l=d[p].config,m=l.plotFillAlpha/100,t=n.getColorObj(d[p].config.value).code,r===t&&(d[p].graphics.element&&d[p].graphics.element.attr({visibility:"visible"}).animateWith(k,
f,{"fill-opacity":m,"stroke-width":e.plotBorderThickness},c,h),d[p].graphics.hotElement&&d[p].graphics.hotElement.show(),d[p].graphics.valEle&&d[p].graphics.valEle.show(),d[p].graphics.tlLabel&&d[p].graphics.tlLabel.show(),d[p].graphics.trLabel&&d[p].graphics.trLabel.show(),d[p].graphics.blLabel&&d[p].graphics.blLabel.show(),d[p].graphics.brLabel&&d[p].graphics.brLabel.show(),l.visible=!0,d[p].visible=!0);a.visible=!0;a.config.visible=!0},updatePlot:function(a,d){var e=this.config,c=this.chart.get("config",
"animationObj"),h=c.animType,f=c.animObj,k=c.dummyObj,c=c.duration,l,m,n=this.components.data,p,q,r;p=0;for(q=n.length;p<q;p++)l=n[p].config,m=l.plotFillAlpha/100,r=n[p].config.value,r<a||r>d?l.visible&&(n[p].graphics.element&&n[p].graphics.element.animateWith(k,f,{"fill-opacity":0,"stroke-width":0},c,h),n[p].graphics.hotElement&&n[p].graphics.hotElement.hide(),n[p].graphics.valEle&&n[p].graphics.valEle.hide(),n[p].graphics.tlLabel&&n[p].graphics.tlLabel.hide(),n[p].graphics.trLabel&&n[p].graphics.trLabel.hide(),
n[p].graphics.blLabel&&n[p].graphics.blLabel.hide(),n[p].graphics.brLabel&&n[p].graphics.brLabel.hide(),l.visible=!1,n[p].visible=!1):l.visible||(n[p].graphics.element&&n[p].graphics.element.animateWith(k,f,{"fill-opacity":m,"stroke-width":e.plotBorderThickness},c,h),n[p].graphics.hotElement&&n[p].graphics.hotElement.show(),n[p].graphics.valEle&&n[p].graphics.valEle.show(),n[p].graphics.tlLabel&&n[p].graphics.tlLabel.show(),n[p].graphics.trLabel&&n[p].graphics.trLabel.show(),n[p].graphics.blLabel&&
n[p].graphics.blLabel.show(),n[p].graphics.brLabel&&n[p].graphics.brLabel.show(),l.visible=!0,n[p].visible=!0)},draw:function(){var a=this,d=a.config,e=a.JSONData.data,c,h,f,k=a.visible,l=a.chart,m=l.components.paper,n=l.components.xAxis[0],r=l.components.yAxis[0],q=l.components.gradientLegend;c=l.graphics.datasetGroup;var t,v,w=l.graphics,y=d.showTooltip,E=l.get("config","animationObj"),D=E.animType,F=E.animObj,z=E.dummyObj,K=E.duration,C,I,N,T=a.components.data,M,H,J,R,W,Q;W={};var S={},U=r.getAxisBase();
H=r.yBasePos=r.getAxisPosition(U);h=0;var U=d.showShadow,Z=d.plotBorderThickness,L=d.plotRadius,Y=a.graphics.container,$=a.graphics.trackerContainer;f=a.graphics.dataLabelContainer;var ba=a.graphics.shadowContainer;I=w.datalabelsGroup;M=w.trackerGroup;var aa,G,w=!0,ea=!1,ga=!1,O=l.components.legend.config.isActive,ha,ja=[],ka=(a.components.removeDataArr||[]).length,da,ia=d.showHoverEffect,ma=function(a){za.call(this,l,a)},la=function(a){return function(b){0!==this.data("showHoverEffect")&&a.attr(this.data("setRolloverAttr"));
za.call(this,l,b,"DataPlotRollOver")}},pa=function(a){return function(b){0!==this.data("showHoverEffect")&&a.attr(this.data("setRolloutAttr"));za.call(this,l,b,"DataPlotRollOut")}},na=function(){a.drawLabel()};q&&q.enabled&&(q.resetLegend(),q.clearListeners());q.notifyWhenUpdate(a.updatePlot,a);Y||(Y=a.graphics.container=m.group("columns",c),k||Y.hide());$||($=a.graphics.trackerContainer=m.group("col-hot",M),k||$.hide());ba||(ba=a.graphics.shadowContainer=m.group("shadow",c).toBack(),k||ba.hide());
f||(f=a.graphics.dataLabelContainer=m.group("datalabel",I),k||f.hide());c=e&&e.length;ha=l.config.canvasWidth/l.jsonData.columns.column.length;I=l.config.canvasHeight/l.jsonData.rows.row.length;for(f=0;f<c;f++)if(J=(M=T[f])&&M.config,W=J.setValue,da=!1,q&&q.enabled&&!O&&(J.visible=!0),S=n.getCategoryFromId(e[f].columnid.toLowerCase()),Q=r.getCategoryFromId(e[f].rowid.toLowerCase()),S.catObj&&Q.catObj&&J.value!==u)if(d.mapByCategory||null!==W){ga=!1;N=S.index.toString()+Q.index.toString();ja.push(N);
R=J.setLink;aa=J.colorArr;M.graphics||(T[f].graphics={});H=J.displayValue;t=n.getAxisPosition(S.index)-ha/2;v=r.getAxisPosition(Q.index)-I/2;C=ha;N=J.toolText;G=J.plotBorderDashStyle;M.graphics.valEle&&M.graphics.valEle.hide();M.graphics.tlLabel&&M.graphics.tlLabel.hide();M.graphics.trLabel&&M.graphics.trLabel.hide();M.graphics.blLabel&&M.graphics.blLabel.hide();M.graphics.brLabel&&M.graphics.brLabel.hide();Q={index:f,link:R,value:J.percentValue||W,displayValue:H,columnId:S.catObj.id,rowId:Q.catObj.id,
tlLabel:J.tlLabel,trLabel:J.trLabel,blLabel:J.blLabel,brLabel:J.brLabel,toolText:N,id:u,datasetIndex:O?M.datasetIndex:void 0,datasetName:O?M.datasetName:void 0,visible:k};W=J.setRolloutAttr;S=J.setRolloverAttr;H=v;h=I;h={x:t,y:H,width:C,height:h||1,r:L,ishot:!y,fill:J.color,stroke:x(aa[1]),"stroke-width":K?0:Z,"stroke-dasharray":G,"fill-opacity":K?0:J.plotFillAlpha/100,"stroke-linejoin":"miter",visibility:J.visible?"visible":"hidden"};M._xPos=t;M._yPos=v;M._height=I;M._width=C;M.graphics.element?
(ea=!0,h={x:t,y:v,width:C,height:I||1},H=M.graphics.element,H.animateWith(z,F,h,K,E.animType),H.attr({ishot:!y,fill:J.color,stroke:x(aa[1]),"fill-opacity":J.visible?J.plotFillAlpha/100:0,"stroke-width":J.visible?Z:0,"stroke-dasharray":G,"stroke-linejoin":"miter",visibility:J.visible?"visible":"hidden"})):(H=M.graphics.element=m.rect(h,Y),da=!0,H.animateWith(z,F,{"fill-opacity":J.plotFillAlpha/100,"stroke-width":Z},K,D,w&&na),w=!1,K||(ea=!0));H.shadow({opacity:U},ba).data("BBox",void 0);if(R||y)I<
Pa&&(v-=(Pa-I)/2,I=Pa),h={x:t,y:v,width:C,height:I,r:L,cursor:R?"pointer":u,stroke:p,"stroke-width":Z,fill:p,ishot:!0,visibility:J.visible?"visible":"hidden"},M.graphics.hotElement?M.graphics.hotElement.attr(h):(J=M.graphics.hotElement=m.rect(h,$),da=!0);J=M.graphics.hotElement;da&&(J||H).click(ma).hover(la(H),pa(H));(J||H).data("eventArgs",Q).data("groupId",void 0).data("showHoverEffect",ia).data("setRolloverAttr",S).data("setRolloutAttr",W).tooltip(N)}else M.graphics.element&&M.graphics.element.hide(),
M.graphics.hotElement&&M.graphics.hotElement.hide(),ga=!0;(ea||ga)&&a.drawLabel();ka&&a.remove()},drawLabel:function(){var a=this.chart,d=a.config,e=a.graphics,c=a.components.paper,h=a.linkedItems.smartLabel,f=a.config.dataLabelStyle,k=this.config,l=this.JSONData.data.length,m=this.components.data,n=this.visible,p,q,r,t,v,w,x=this.graphics.dataLabelContainer,E={fontFamily:f.fontFamily,fontSize:f.fontSize,lineHeight:f.lineHeight,fontWeight:f.fontWeight,fontStyle:f.fontStyle},D,z,F,C,I,K,N,M,H,J,R,
T,Q,S,U,W,L,Y,a=a.get("config","animationObj"),Z=a.animObj,$=a.dummyObj,aa=a.duration,e=e.datalabelsGroup;x||(x=this.graphics.dataLabelContainer=c.group("datalabel",e),n||x.hide());n=k.tlLabelStyle;e=k.trLabelStyle;D=k.blLabelStyle;z=k.brLabelStyle;F={fontFamily:n.fontFamily,fontSize:n.fontSize,lineHeight:n.lineHeight,fontWeight:n.fontWeight,fontStyle:n.fontStyle};C={fontFamily:e.fontFamily,fontSize:e.fontSize,lineHeight:e.lineHeight,fontWeight:e.fontWeight,fontStyle:e.fontStyle};I={fontFamily:D.fontFamily,
fontSize:D.fontSize,lineHeight:D.lineHeight,fontWeight:D.fontWeight,fontStyle:D.fontStyle};K={fontFamily:z.fontFamily,fontSize:z.fontSize,lineHeight:z.lineHeight,fontWeight:z.fontWeight,fontStyle:z.fontStyle};h.useEllipsesOnOverflow(d.useEllipsesWhenOverflow);h.setStyle(f);for(p=0;p<l;p++)if(d=m[p],void 0!==d&&(r=d.graphics))if(r=d&&d.config,N=r.setValue,k.mapByCategory||null!==N){if(q=r.displayValue,N=d.graphics.element)N=d._width,M=d._height,H=d._xPos,J=d._yPos,h.setStyle(f),ba(q)&&q!==y&&r.showValue?
(R=h.getSmartText(q,N,M,!1),q=R.text,t=J+.5*M,v=H+.5*N,d.graphics.valEle?(d.graphics.valEle.animateWith($,Z,{x:v,y:t},aa,a.animType),d.graphics.valEle.attr({text:q,title:R.tooltext||u,visibility:r.visible?"visible":"hidden",fill:f.color,direction:r.textDirection,"text-bound":[f.backgroundColor,f.borderColor,f.borderThickness,f.borderPadding,f.borderRadius,f.borderDash]})):(d.graphics.valEle=c.text(x),d.graphics.valEle.attr({text:q,title:R.tooltext||u,visibility:r.visible?"visible":"hidden",fill:f.color,
direction:r.textDirection,x:v,y:t,"text-bound":[f.backgroundColor,f.borderColor,f.borderThickness,f.borderPadding,f.borderRadius,f.borderDash]})),r.visible&&d.graphics.valEle.show(),d.graphics.valEle.css(E),q=r.tlLabel,v=r.trLabel,T=r.blLabel,Q=r.brLabel,w=ba(q)&&q!==y,S=ba(v)&&v!==y,U=ba(T)&&T!==y,W=ba(Q)&&Q!==y,L=N*(w&&S?.5:.9),Y=.5*(M-(R&&R.height||0)),t=J+4,w?(h.setStyle(n),R=h.getSmartText(q,L,Y,!1),q=R.text,w=H,d.graphics.tlLabel?(d.graphics.tlLabel.animateWith($,Z,{x:w+4,y:t},aa,a.animType),
d.graphics.tlLabel.attr({text:q,title:R.tooltext||u,visibility:r.visible?"visible":"hidden",fill:n.color,"text-anchor":"start","vertical-align":"top",direction:r.textDirection,"text-bound":[n.backgroundColor,n.borderColor,n.borderThickness,n.borderPadding,n.borderRadius,n.borderDash]})):(d.graphics.tlLabel=c.text(x),d.graphics.tlLabel.attr({text:q,title:R.tooltext||u,visibility:r.visible?"visible":"hidden",fill:n.color,"text-anchor":"start","vertical-align":"top",direction:r.textDirection,x:w+4,y:t,
"text-bound":[n.backgroundColor,n.borderColor,n.borderThickness,n.borderPadding,n.borderRadius,n.borderDash]})),r.visible&&d.graphics.tlLabel.show(),d.graphics.tlLabel.css(F)):d.graphics.tlLabel&&(d.graphics.tlLabel.remove(),delete d.graphics.tlLabel),S?(h.setStyle(e),R=h.getSmartText(v,L,Y,!1),q=R.text,w=H+N,d.graphics.trLabel?(d.graphics.trLabel.animateWith($,Z,{x:w-4,y:t},aa,a.animType),d.graphics.trLabel.attr({text:q,title:R.tooltext||u,visibility:r.visible?"visible":"hidden",fill:e.color,"text-anchor":"end",
"vertical-align":"top",direction:r.textDirection,"text-bound":[e.backgroundColor,e.borderColor,e.borderThickness,e.borderPadding,e.borderRadius,e.borderDash]})):(d.graphics.trLabel=c.text(x),d.graphics.trLabel.attr({text:q,title:R.tooltext||u,visibility:r.visible?"visible":"hidden",fill:e.color,"text-anchor":"end","vertical-align":"top",direction:r.textDirection,x:w-4,y:t,"text-bound":[e.backgroundColor,e.borderColor,e.borderThickness,e.borderPadding,e.borderRadius,e.borderDash]})),r.visible&&d.graphics.trLabel.show(),
d.graphics.trLabel.css(C)):d.graphics.trLabel&&(d.graphics.trLabel.remove(),delete d.graphics.trLabel),t=J+M-4,U?(h.setStyle(D),R=h.getSmartText(T,L,Y,!1),q=R.text,w=H,d.graphics.blLabel?(d.graphics.blLabel.animateWith($,Z,{x:w+4,y:t},aa,a.animType),d.graphics.blLabel.attr({text:q,title:R.tooltext||u,visibility:r.visible?"visible":"hidden",fill:D.color,"text-anchor":"start","vertical-align":"bottom",direction:r.textDirection,"text-bound":[D.backgroundColor,D.borderColor,D.borderThickness,D.borderPadding,
D.borderRadius,D.borderDash]})):(d.graphics.blLabel=c.text(x),d.graphics.blLabel.attr({text:q,title:R.tooltext||u,visibility:r.visible?"visible":"hidden",fill:D.color,"text-anchor":"start","vertical-align":"bottom",direction:r.textDirection,x:w+4,y:t,"text-bound":[D.backgroundColor,D.borderColor,D.borderThickness,D.borderPadding,D.borderRadius,D.borderDash]})),r.visible&&d.graphics.blLabel.show(),d.graphics.blLabel.css(I)):d.graphics.blLabel&&(d.graphics.blLabel.remove(),delete d.graphics.blLabel),
W?(h.setStyle(D),R=h.getSmartText(Q,L,Y,!1),q=R.text,w=H+N-4,d.graphics.brLabel?(d.graphics.brLabel.animateWith($,Z,{x:w,y:t},aa,a.animType),d.graphics.brLabel.attr({text:q,title:R.tooltext||u,visibility:r.visible?"visible":"hidden",fill:z.color,"text-anchor":"end","vertical-align":"bottom",direction:r.textDirection,"text-bound":[z.backgroundColor,z.borderColor,z.borderThickness,z.borderPadding,z.borderRadius,z.borderDash]})):(d.graphics.brLabel=c.text(x),d.graphics.brLabel.attr({text:q,title:R.tooltext||
u,visibility:r.visible?"visible":"hidden",fill:z.color,"text-anchor":"end","vertical-align":"bottom",direction:r.textDirection,x:w,y:t,"text-bound":[z.backgroundColor,z.borderColor,z.borderThickness,z.borderPadding,z.borderRadius,z.borderDash]})),r.visible&&d.graphics.brLabel.show(),d.graphics.brLabel.css(K)):d.graphics.brLabel&&(d.graphics.brLabel.remove(),delete d.graphics.brLabel)):(d.graphics.valEle&&(d.graphics.valEle.remove(),delete d.graphics.valEle),d.graphics.tlLabel&&(d.graphics.tlLabel.remove(),
delete d.graphics.tlLabel),d.graphics.trLabel&&(d.graphics.trLabel.remove(),delete d.graphics.trLabel),d.graphics.blLabel&&(d.graphics.blLabel.remove(),delete d.graphics.blLabel),d.graphics.brLabel&&(d.graphics.brLabel.remove(),delete d.graphics.brLabel))}else d.graphics.valEle&&d.graphics.valEle.hide(),d.graphics.tlLabel&&d.graphics.tlLabel.hide(),d.graphics.trLabel&&d.graphics.trLabel.hide(),d.graphics.blLabel&&d.graphics.blLabel.hide(),d.graphics.brLabel&&d.graphics.brLabel.hide();this.labelDrawn=
!0},remove:function(){var a=this.components,d=a.removeDataArr,e=a.pool||(a.pool={element:[],hotElement:[],label:[]}),c=d.length,h,f=this.maxminFlag,k,l,m;for(m=0;m<c;m++)if(h=d[0],d.splice(0,1),h&&h.graphics){l=h.graphics;for(k in l)l[k].stop(),l[k].hide();h.graphics.element&&(e.element=e.element.concat(h.graphics.element));h.graphics.hotElement&&(e.hotElement=e.hotElement.concat(h.graphics.hotElement));h.graphics.label&&(e.label=e.label.concat(h.graphics.label))}a.pool=e;f&&this.setMaxMin()},getEventArgs:function(a){var d=
a.dataset.config||{};return{datasetName:d.label,datasetIndex:a.index,visible:d.visible}}},"Column"]);FusionCharts.register("component",["datasetGroup","heatmap",{},xa]);FusionCharts.register("component",["dataset","Kagi",{type:"kagi",_parseShadowOptions:function(){var b=this.config;return{opacity:a(this.chart.jsonData.chart.showshadow,1)?b.lineAlpha/100:0}},configure:function(){var b,g,e=this.chart,c=e.components.xAxis[0],h=0,f,k=[],l,m,n,p,q,r,t,u,w,x,y=v.getDashStyle,D,z,E,C,F,I,K,N,H,J;w=0;var M;
this.__base__.configure.call(this);b=this.components;f=b.data;l=this.config;m=this.JSONData.data;e=e.jsonData.chart;n=l.maxValue;p=l.minValue;g=b.removeDataArr||(b.removeDataArr=[]);b=!1;q=0;r=a(e.reversalvalue,-1);t=a(e.reversalpercentage,5);for(u=0;u<f.length;u+=1)f[u].config.__nullCount=w,null===f[u].config.setValue&&(g.push(f.splice(u,1)[0]),w++,--u);if(f.length){l.rallyColor=d(e.rallycolor,"FF0000");l.rallyAlpha=a(e.rallyalpha,e.linealpha,100);l.declineColor=d(e.declinecolor,"0000FF");l.declineAlpha=
a(e.declinealpha,e.linealpha,100);l.canvasPadding=a(e.canvaspadding,15);l.maxHShiftPercent=a(e.maxhshiftpercent,10);l.rallyThickness=a(e.rallythickness,e.linethickness,2);u=a(e.rallydashlen,e.linedashlen,5);w=a(e.rallydashgap,e.linedashgap,4);l.declineThickness=a(e.declinethickness,e.linethickness,2);g=a(e.declinedashlen,e.linedashlen,5);x=a(e.declinedashgap,e.linedashgap,4);l.lineDashed={"true":a(e.rallydashed,e.linedashed,0),"false":a(e.declinedashed,e.linedashed,0)};l.rallyDashed=a(e.rallydashed,
e.linedashed,0)?y(u,w,l.rallyThickness):"none";l.declineDashed=a(e.declinedashed,e.linedashed,0)?y(g,x,l.declineThickness):"none";l.canvasPadding=a(e.canvaspadding,this.canvasPadding,15);r=0<r?r:t*(n-p)/100;y=f[0].config.setValue;n=function(a,b){for(var c,d=1,e=f[0].config.setValue;d<a;)c=f[d].config.setValue,b?c<=e&&(f[d].config.isDefined=!1):c>=e&&(f[d].config.isDefined=!1),d+=1;f[0].config.vAlign=b?Qb:Wb;f[0].config.align="center"};p=m.length;for(t=u=0;t<p;t+=1,u+=1)if(D=m[t],!D||!D.vline)if(g=
f[u]&&f[u].config,z&&(z=!1),g&&(g.isDefined=!0),D.tooltext||this.JSONData.plottooltext||e.plottooltext||g&&(g.toolText+=g.displayValue),u&&g){g.isShift=void 0;E=f[u-1].config;g.vAlign="middle";g.align=fc;g.showLabel=!1;w=null;x=g.setValue;C=f[u+1]&&f[u+1].config.setValue;F=Ca(y-x);b?x<K&&I?I=!1:x>N&&!I&&(I=!0):(x>y&&F>r?(I=!0,K=y,N=null,b=H=!0,n(u,I)):x<y&&F>r?(I=!1,K=null,N=y,H=!1,b=!0,n(u,I)):(H=I=null,b=!1),ba(E)&&(E.isRally=I),null!=I&&(f[0].config.isRally=I));g.isRally=I;if(H&&x<y||!H&&x>y)w=
y;J=w?w:x;F=Ca(J-C);C=null==H?null:H?J>C&&F>=r:J<C&&F>=r;if(E&&E.isShift)for(H?(K=y,M=Qb):H||(N=y,M=Wb),E=u;1<E;--E)if(f[E].y==y){f[E].vAlign=M;f[E].align="center";f[E].showLabel=!0;break}C?(q+=1,z=!0,H=!H,g.isShift=!0,y=J,k.push(m[u+g.__nullCount]),h=this._appendCategory(h,u,k,0)):H&&x>y||!H&&x<y?y=x:w=y;g.plotValue=w;g.objParams={isRally:I,lastHigh:N,lastLow:K,isRallyInitialised:b}}this._appendCategory(h,u,k,1);k.push(D);c.setCategory(k);l.shiftCount=q+1}},_appendCategory:function(b,d,e,c){var h,
f,k,l=this.JSONData.catData;if(b<l.length)for(h=b;h<l.length;h+=1,b=h){f=l[h];k=f.data;f=f.index-(h+1);if(f<d)k.lineposition=a(k.lineposition,c);else if(f>d)break;e.push(k)}return b},draw:function(){var a,d,e=this,c=e.graphics,h=e.JSONData,f=e.chart,k=f.components,l=f.config,m=e.config,n=e.components,r=n.data;a=(n=n.removeDataArr)&&n.length;var q=r&&r.length,n=r&&r.length,t=l.style,v=k.paper,w=k.xAxis[0],D,F,I=f.graphics,k=I.datalabelsGroup,K,z,M,C,T,W,Z,$=e.components.data,H,J,R,ba={fontFamily:t.fontFamily,
fontSize:t.fontSize,lineHeight:t.lineHeight,fontWeight:t.fontWeight,fontStyle:t.fontStyle,color:t.color},Q=c.container,S=c.trackerContainer,U=I.tracker,ea,L,Y=I.datasetGroup,da,I=m.shadow,ja,aa=c.dataLabelContainer,G={},ia,la,O,ha=!1,na=function(){Q.lineGroup.attr({"clip-rect":null});Q.lineShadowGroup.show();Q.anchorShadowGroup.show();Q.anchorGroup.show();S.show();aa&&aa.show()},ka=!0,oa=w.getAxisPosition(0),ta=w.getAxisPosition(1)-oa,t={"clip-rect":[N(0,l.canvasLeft),N(0,l.canvasTop),N(1,l.canvasWidth),
N(1,l.canvasHeight)]},ma={"clip-rect":[N(0,l.canvasLeft),N(0,l.canvasTop),1,N(1,l.canvasHeight)]},l={stroke:x({color:m.rallyColor,alpha:m.rallyAlpha}),"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":m.rallyThickness,"stroke-dasharray":m.rallyDashed},za={stroke:x({color:m.declineColor,alpha:m.declineAlpha}),"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":m.declineThickness,"stroke-dasharray":m.declineDashed},ya={"true":l["stroke-width"],"false":za["stroke-width"]},
va=[],ca=[],ua=c.rallyElem,xa=c.declineElem,Aa=e.visible,Ba=w.getAxisPosition(0),Ca=r[0]&&!!r[0].isRally,Ha,oa=oa-ta/2,Da,Fa,Ga,Ia=c.lineElement,Ja=e.pool||(e.pool={}),Pa=f.get("config","animationObj"),sa=Pa.duration||0,La=Pa.dummyObj,Oa=Pa.animObj,Qa=Pa.animType;a&&e.remove();if(r.length){ua&&ua.show();xa&&xa.show();Q||(Q=e.graphics.container={lineShadowGroup:v.group("connector-shadow",Y).attr(ma),anchorShadowGroup:v.group("anchor-shadow",Y).attr(ma),lineGroup:v.group(pa,Y).attr(ma),anchorGroup:v.group("anchors",
Y).attr(ma)},Aa||(Q.lineShadowGroup.hide(),Q.anchorShadowGroup.hide(),Q.lineGroup.hide(),Q.anchorGroup.hide()));S||(S=e.graphics.trackerContainer=v.group("line-hot").trackTooltip(!0),Aa||S.hide());$||($=e.components.data=[]);U&&U.appendChild(S);f._addCSSDefinition(".fusioncharts-datalabels .fusioncharts-label",ba);aa||(aa=e.graphics.dataLabelContainer=e.graphics.dataLabelContainer||v.group("datalabel",k),Aa||aa.hide());E(q,n);if(r[0].config.setValue)Da=r[0].config.plotY;else for(a=1;a<n;a+=1)if(T=
r[a].config.setValue){Da=r[a].config.plotY;break}Ca=!!r[0].config.isRally;n=ga(Da)+ya[Ca]%2/2;Ca?va.push("M",oa,n,"H",Ba):ca.push("M",oa,n,"H",Ba);Ua(r,function(a,b){a=a.config;H=$[b];O=H.config;d=H.graphics;da=O.hoverEffects;T=O.setValue;Z=O.displayValue;ha=!1;Fa=r[b+1]&&r[b+1].config||{};Ga=["M",Ba,Da];Ca=a.isRally;a.isShift&&(Ba+=ta,Da=a.graphY,Ga.push("H",Ba),Ga[2]=ga(Ga[2])+ya[Ca]%2/2,Ga=Ga.toString(),Ca?va.push(Ga):ca.push(Ga),Ga=["M",Ba,Da]);Fa.isChanged&&(Da=Fa.ty,Ga.push("V",Da),Ga[1]=ga(Ga[1])+
ya[Ca]%2/2,Ga=Ga.toString(),Ca?va.push(Ga):ca.push(Ga),Ga=["M",Ba,Da]);Ha=Fa.isRally;Fa.graphY!==Ga[2]&&(Ga.push("V",Fa.graphY),Ga[1]=ga(Ga[1])+ya[Ha]%2/2,Ga=Ga.toString(),Ha?va.push(Ga):ca.push(Ga));Da=Fa.graphY;D=H._xPos=w.getAxisPosition(a.plotX);F=H._yPos=a.plotY;G=O.anchorProps;la=G.symbol;ja=G.shadow;K=a.toolText;C=O.setLink;void 0!==F&&!isNaN(F)&&a.isDefined&&(W={index:b,link:C,value:T,displayValue:Z,categoryLabel:O.label,toolText:K,id:m.userID,datasetIndex:0,datasetName:h.seriesname,visible:Aa},
J=R={},G.imageUrl?(ia=new Ka,ia.onload=e._onAnchorImageLoad(e,b,W,D,F,H),ia.onerror=e._onErrorSetter(D,F,b,e),ia.src=G.imageUrl):((z=d.element)?(z.animateWith(La,Oa,{polypath:[la[1]||2,D,F,G.radius,G.startAngle,0]},sa,Qa),ka&&na(),ka=!1):(Ja.element&&Ja.element.length?z=d.element=Ja.element.shift():(z=d.element=v.polypath(Q.anchorGroup),ha=!0),z.attr({polypath:[la[1]||2,D,F,G.radius,G.startAngle,0]})),z.attr({fill:x({color:G.bgColor,alpha:G.bgAlpha}),stroke:x({color:G.borderColor,alpha:G.borderAlpha}),
"stroke-width":G.borderThickness,visibility:G.radius?Aa:"hidden"}).shadow(ja,Q.anchorShadowGroup)),da.enabled&&(R={polypath:[da.anchorSides||2,D,F,da.anchorRadius,da.startAngle,da.dip],fill:x({color:da.anchorColor,alpha:da.anchorBgAlpha}),stroke:x({color:da.anchorBorderColor,alpha:da.anchorBorderAlpha}),"stroke-width":da.anchorBorderThickness},J={polypath:[G.sides,D,F,G.radius,G.startAngle,0],fill:x({color:G.bgColor,alpha:G.bgAlpha}),stroke:x({color:G.borderColor,alpha:G.borderAlpha}),"stroke-width":G.borderThickness},
z&&z.data("anchorRadius",G.radius).data("anchorHoverRadius",da.anchorRadius).data("setRolloverAttr",R).data("setRolloutAttr",J)),ea=N(G.radius,da&&da.anchorRadius||0),L={cx:D,cy:F,r:ea,cursor:C?"pointer":u,stroke:p,"stroke-width":G.borderThickness,fill:p,ishot:!0,visibility:Aa},M=H.graphics.hotElement,M||(Ja.element&&Ja.element.length?M=d.hotElement=Ja.hotElement.shift():(M=d.hotElement=v.circle(S),ha=!0)),M.attr(L).show(),(M||z).data("eventArgs",W).data("groupId",void 0).data("hoverEnabled",da.enabled).data("dataset",
e).tooltip(m.showTooltip?K:y),ha&&(M||z).click(e.getPlotClickFn(f)).hover(e.rolloverResponseSetter(H,f),e.rolloutResponseSetter(H,f)),e.drawLabel(b))});Ia||(ua||(Ia=ua=c.rallyElem=v.path(Q.lineGroup)),ua.animateWith(La,Oa,{path:va},ka?0:sa,Qa).attr(l).shadow(I,Q.lineShadowGroup),xa||(Ia=xa=c.declineElem=v.path(Q.lineGroup)),xa.animateWith(La,Oa,{path:ca},ka?0:sa,Qa).attr(za).shadow(I,Q.lineShadowGroup));sa&&ka||(ka=!1);Q.anchorGroup.animateWith(La,Oa,t,sa,Qa);aa.hide();Q.lineShadowGroup.animateWith(La,
Oa,t,sa,Qa);Q.anchorShadowGroup.animateWith(La,Oa,t,sa,Qa);Q.lineShadowGroup.animateWith(La,Oa,t,sa,Qa);Q.lineGroup.animateWith(La,Oa,t,sa,Qa,na)}else ua&&ua.hide(),xa&&xa.hide()},hidingPosition:function(){return function(a){a=a.graphics.element;return{polypath:(a&&a.attr("polypath"))[3]=0,r:0,text:u}}}},"Line"]);Da.addSymbol({resizeIcon:function(b,d,e){var c=a(e,15)/3,h=[];0>c&&(c=-c,e=-e,b+=e-c/2,d+=e-c/2);for(e=3;0<e;--e)h.push("M",b-c*e,d-3,"L",b-3,d-c*e);return h},closeIcon:function(a,d,e){var c=
1.3*e,h=43*dc,f=48*dc,k=a+c*da(h),h=d+c*T(h),l=a+c*da(f),m=d+c*T(f),f=.71*(e-2);e=.71*(e-2);c=["A",c,c,0,1,0,l,m];k=["M",k,h];k=k.concat(c);return k=k.concat(["M",a+f,d-e,"L",a-f,d+e,"M",a-f,d-e,"L",a+f,d+e])},configureIcon:function(a,d,e){--e;var c=.71*e,h=.71*(e+2),f=a-e,k=d-e,l=a+e;e=d+e;var m=a+.5,n=d+.5,p=a-.5,q=d-.5,r=f-2,t=k-2,u=l+2,v=e+2,w=a+c,x=d+c,y=a-c,c=d-c,z=a+h,D=d+h;a-=h;d-=h;return["M",f,n,"L",r,n,r,q,f,q,y-.25,c+.25,a-.25,d+.25,a+.25,d-.25,y+.25,c-.25,p,k,p,t,m,t,m,k,w-.25,c-.25,
z-.25,d-.25,z+.25,d+.25,w+.25,c+.25,l,q,u,q,u,n,l,n,w+.25,x-.25,z+.25,D-.25,z-.25,D+.25,w-.25,x+.25,m,e,m,v,p,v,p,e,y+.25,x+.25,a+.25,D+.25,a-.25,D-.25,y-.25,x-.25,"Z"]},axisIcon:function(a,d,e){--e;var c=.33*e,h=e/2,f=a-e,k=d-e,l=a+h;e=d+e;a-=h;h=d+c;d-=c;return["M",f,k,"L",l,k,l,e,f,e,"M",a,h,"L",l,h,"M",a,d,"L",l,d]},loggerIcon:function(a,d,e){--e;a-=e;d-=e;var c=a+2*e,h=a+2,f=c-2,k=d+2;e=k+e;var l=e+2;return["M",a,d,"L",c,d,c,k,f,k,f,e,c,e,c,l,a,l,a,e,h,e,h,k,a,k,a,d]}})},[3,2,1,"release"]]);
