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

 @version 3.11.0
*/
FusionCharts.register("module",["private","modules.renderer.js-gantt",function(){var P=this,z=P.hcLib,ba=P.window,ca=/msie/i.test(ba.navigator.userAgent)&&!ba.opera,Y=z.chartAPI,W=z.extend2,r=z.pluck,q=z.pluckNumber,oa=z.pluckFontSize,T=z.getFirstColor,ja=z.parseConfiguration,pa=z.setAttribDefs,ka=z.graphics,N=ka.convertColor,Z=ka.getDarkColor,Q=z.parseUnsafeString,ga=z.getFirstValue,qa=z.getValidValue,$=z.toPrecision,S=z.Raphael,ra=z.chartPaletteStr,ya=z.componentDispose,za=z.COMMASTRING,V=z.setLineHeight,
ha=z.getDashStyle,X=z.toRaphaelColor,sa=z.each,H=z.attrTypeNum,aa=z.attrTypeBool,Aa=z.dropHash,Ba=z.HASHSTRING,ba=!/fusioncharts\.com$/i.test(ba.location.hostname),da="rgba(192,192,192,"+(ca?.002:1E-6)+")",ta=ka.mapSymbolName,ca=Math,K=ca.max,ia=ca.min,ua=ca.abs,Ca=parseInt,va=parseFloat,wa=z.graphics.getLightColor,M=z.plotEventHandler,ea,U,la=function(c){return void 0!==c&&null!==c},Da={left:"start",right:"end",center:"middle"},Ea={left:0,right:1,center:.5,undefined:.5},Fa={left:5,right:-5,center:0,
undefined:0},Ga=function(){},ma=function(){for(var c=0,a=arguments.length,d=!1,c=0;c<a;c++){d=arguments[c];if(isNaN(d))return!1;d=!0}return d};Y("gantt",{defaultDatasetType:"task",applicableDSList:{task:!0,milestone:!0,connectors:!0},fireGroupEvent:!0,aligncaptionwithcanvas:0,hasInteractiveLegend:!1,creditLabel:ba,_createDatasets:function(){var c=this.config,a=this.components,d=this.jsonData,b=[],g,e,h=this.defaultDatasetType,n=this.applicableDSList,f,p,l,t=c.datasetMap||(c.datasetMap={task:[],milestone:[],
connectors:[]}),m={task:[],milestone:[],connectors:[]},s,A,u,k={};d.tasks&&(b=b.concat(d.tasks));d.milestones&&(b=b.concat(d.milestones));d.connectors&&(b=b.concat(d.connectors));g=b&&b.length;!b||b instanceof Array||(b=[b],g=1);g||this.setChartMessage();this.config.categories=d.categories&&d.categories[0].category;d=a.dataset=[];for(a=0;a<g;a++)if(l=b[a],l.task?u=f="task":l.milestone?u=f="milestone":l.connector&&(f="connectors",u="connector"),f=f&&f.toLowerCase(),n[f]||(f=h),p=FusionCharts.get("component",
["dataset",f]))void 0===k[f]?k[f]=0:k[f]++,e=t[f],(s=e[0])?(p=s.JSONData,p=p[u].length,A=l[u].length,m[f].push(s),d.push(s),s.index=a,p>A&&s.removeData(A-1,p-A,!1),s.JSONData=l,s.configure(),e.shift()):(e=new p,m[f].push(e),d.push(e),e.chart=this,e.index=a,e.init(l));this._createLegendItems();for(f in t)if(b=t[f],g=b.length)for(a=0;a<g;a++)(e=b[a])&&ya.call(e);c.datasetMap=m},configure:function(){var c=this.config,a=this.components.background.config,d=this.jsonData.chart;this.__setDefaultConfig();
Y.mscartesian.configure.call(this);c.showBorder=q(d.showborder,0);c.borderWidth=c.showBorder?q(d.borderthickness,1):0;a.borderWidth=c.borderWidth;c.lastVScrollPosition=void 0;c.lastHScrollPosition=void 0},_createLegendItems:function(){var c=this.components,a=this.jsonData,d=c.legend,b,g,e,h,n,f,p=c.legendItems,a=a.legend&&a.legend.item||[];b=c.legendItems&&c.legendItems.length||0;g=a.length;b>g&&(d.emptyItems(g,b-g),p&&p.splice(g,b-g));p||(c.legendItems=p=[]);b=0;for(c=a.length;b<c;b++)n=a[b],f=p[b],
h=n.color,g=wa(h,60).replace(Aa,Ba),e=wa(h,40),e={FCcolor:{color:h+","+h+","+e+","+h+","+h,ratio:"0,70,30",angle:270,alpha:"100,100,100,100,100"}},!f&&(f=p[b]={}),g={fillColor:X(e),strokeColor:X(g),label:n.label,interactiveLegend:!1,legendItemId:f.legendItemId},p[b].legendItemId=d.addItems(this,Ga,g)},_setAxisLimits:function(){},_createAxes:function(){var c=this.components,a=FusionCharts.get("component",["axis","time"]),d=FusionCharts.get("component",["axis","process"]);c.yAxis=[];c.xAxis=[];c.yAxis[0]=
d=new d;c.xAxis[0]=c=new a;d.chart=this;c.chart=this;d.init();c.init()},_feedAxesRawData:function(){var c=this.components,a=c.colorManager,d=this.jsonData,b=d.chart,g,e=this.is3d,h=e?ra.chart3D:ra.chart2D;g={outCanfontFamily:r(b.outcnvbasefont,b.basefont,"Verdana,sans"),outCanfontSize:oa(b.outcnvbasefontsize,b.basefontsize,10),outCancolor:r(b.outcnvbasefontcolor,b.basefontcolor,a.getColor(h.baseFontColor)).replace(/^#? ([a-f0-9]+)/ig,"#$1"),axisBreaks:b.xaxisbreaks,axisNamePadding:b.xaxisnamepadding,
axisValuePadding:b.labelpadding,axisNameFont:b.xaxisnamefont,axisNameFontSize:b.xaxisnamefontsize,axisNameFontColor:b.xaxisnamefontcolor,axisNameFontBold:b.xaxisnamefontbold,axisNameFontItalic:b.xaxisnamefontitalic,axisNameBgColor:b.xaxisnamebgcolor,axisNameBorderColor:b.xaxisnamebordercolor,axisNameAlpha:b.xaxisnamealpha,axisNameFontAlpha:b.xaxisnamefontalpha,axisNameBgAlpha:b.xaxisnamebgalpha,axisNameBorderAlpha:b.xaxisnameborderalpha,axisNameBorderPadding:b.xaxisnameborderpadding,axisNameBorderRadius:b.xaxisnameborderradius,
axisNameBorderThickness:b.xaxisnameborderthickness,axisNameBorderDashed:b.xaxisnameborderdashed,axisNameBorderDashLen:b.xaxisnameborderdashlen,axisNameBorderDashGap:b.xaxisnameborderdashgap,useEllipsesWhenOverflow:b.useellipseswhenoverflow,divLineColor:r(b.vdivlinecolor,a.getColor(h.divLineColor)),divLineAlpha:r(b.vdivlinealpha,e?a.getColor("divLineAlpha3D"):a.getColor("divLineAlpha")),divLineThickness:q(b.vdivlinethickness,1),divLineIsDashed:Boolean(q(b.vdivlinedashed,b.vdivlineisdashed,0)),divLineDashLen:q(b.vdivlinedashlen,
4),divLineDashGap:q(b.vdivlinedashgap,2),showAlternateGridColor:q(b.showalternatevgridcolor,0),alternateGridColor:r(b.alternatevgridcolor,a.getColor("altVGridColor")),alternateGridAlpha:r(b.alternatevgridalpha,a.getColor("altVGridAlpha")),numDivLines:q(b.numvdivlines,this.numVDivLines),labelFont:b.labelfont,labelFontSize:b.labelfontsize,labelFontColor:b.labelfontcolor,labelFontAlpha:b.labelalpha,labelFontBold:b.labelfontbold,labelFontItalic:b.labelfontitalic,maxLabelHeight:b.maxlabelheight,axisName:b.xaxisname,
axisMinValue:b.xaxisminvalue,axisMaxValue:b.xaxismaxvalue,setAdaptiveMin:b.setadaptivexmin,adjustDiv:b.adjustvdiv,labelDisplay:b.labeldisplay,showLabels:b.showlabels,rotateLabels:b.rotatelabels,slantLabel:q(b.slantlabels,b.slantlabel),labelStep:q(b.labelstep,b.xaxisvaluesstep),showAxisValues:q(b.showxaxisvalues,b.showxaxisvalue),showLimits:q(b.showvlimits,this.showvlimits),showDivLineValues:q(b.showvdivlinevalues,b.showvdivlinevalues),zeroPlaneColor:b.vzeroplanecolor,zeroPlaneThickness:b.vzeroplanethickness||
2,zeroPlaneAlpha:b.vzeroplanealpha,showZeroPlaneValue:b.showvzeroplanevalue,trendlineColor:b.trendlinecolor,trendlineToolText:b.trendlinetooltext,trendlineThickness:b.trendlinethickness,trendlineAlpha:b.trendlinealpha,showTrendlinesOnTop:b.showtrendlinesontop,showAxisLine:q(b.showxaxisline,b.showaxislines,b.drawAxisLines,0),axisLineThickness:q(b.xaxislinethickness,b.axislinethickness,1),axisLineAlpha:q(b.xaxislinealpha,b.axislinealpha,100),axisLineColor:r(b.xaxislinecolor,b.axislinecolor,"#000000")};
a={outCanfontFamily:r(b.outcnvbasefont,b.basefont,"Verdana,sans"),outCanfontSize:oa(b.outcnvbasefontsize,b.basefontsize,10),outCancolor:r(b.outcnvbasefontcolor,b.basefontcolor,a.getColor(h.baseFontColor)).replace(/^#? ([a-f0-9]+)/ig,"#$1"),axisBreaks:b.yaxisbreaks,axisNamePadding:b.yaxisnamepadding,axisValuePadding:b.yaxisvaluespadding,axisNameFont:b.yaxisnamefont,axisNameFontSize:b.yaxisnamefontsize,axisNameFontColor:b.yaxisnamefontcolor,axisNameFontBold:b.yaxisnamefontbold,axisNameFontItalic:b.yaxisnamefontitalic,
axisNameBgColor:b.yaxisnamebgcolor,axisNameBorderColor:b.yaxisnamebordercolor,axisNameAlpha:b.yaxisnamealpha,axisNameFontAlpha:b.yaxisnamefontalpha,axisNameBgAlpha:b.yaxisnamebgalpha,axisNameBorderAlpha:b.yaxisnameborderalpha,axisNameBorderPadding:b.yaxisnameborderpadding,axisNameBorderRadius:b.yaxisnameborderradius,axisNameBorderThickness:b.yaxisnameborderthickness,axisNameBorderDashed:b.yaxisnameborderdashed,axisNameBorderDashLen:b.yaxisnameborderdashlen,axisNameBorderDashGap:b.yaxisnameborderdashgap,
axisNameWidth:b.yaxisnamewidth,useEllipsesWhenOverflow:b.useellipseswhenoverflow,rotateAxisName:q(b.rotateyaxisname,1),axisName:b.yaxisname,divLineColor:r(b.divlinecolor,a.getColor(h.divLineColor)),divLineAlpha:r(b.divlinealpha,e?a.getColor("divLineAlpha3D"):a.getColor("divLineAlpha")),divLineThickness:q(b.divlinethickness,1),divLineIsDashed:Boolean(q(b.divlinedashed,b.divlineisdashed,0)),divLineDashLen:q(b.divlinedashlen,4),divLineDashGap:q(b.divlinedashgap,2),showAlternateGridColor:q(b.showalternatehgridcolor,
1),alternateGridColor:r(b.alternatehgridcolor,a.getColor("altHGridColor")),alternateGridAlpha:r(b.alternatehgridalpha,a.getColor("altHGridAlpha")),numDivLines:q(b.numdivlines,this.numDivLines),axisMinValue:b.yaxisminvalue,axisMaxValue:b.yaxismaxvalue,setAdaptiveMin:b.setadaptiveymin,adjustDiv:b.adjustdiv,labelStep:b.yaxisvaluesstep,showAxisValues:q(b.showyaxisvalues,b.showyaxisvalue),showLimits:q(b.showlimits,this.showLimits),showDivLineValues:q(b.showdivlinevalues,b.showdivlinevalue),zeroPlaneColor:b.zeroplanecolor,
zeroPlaneThickness:b.zeroplanethickness||2,zeroPlaneAlpha:b.zeroplanealpha,showZeroPlaneValue:b.showzeroplanevalue,trendlineColor:b.trendlinecolor,trendlineToolText:b.trendlinetooltext,trendlineThickness:b.trendlinethickness,trendlineAlpha:b.trendlinealpha,showTrendlinesOnTop:b.showtrendlinesontop,showAxisLine:q(b.showyaxisline,b.showaxislines,b.drawAxisLines,0),axisLineThickness:q(b.yaxislinethickness,b.axislinethickness,1),axisLineAlpha:q(b.yaxislinealpha,b.axislinealpha,100),axisLineColor:r(b.yaxislinecolor,
b.axislinecolor,"#000000")};g.vtrendlines=d.trendlines;d=c.yAxis[0];c=c.xAxis[0];d.setCommonConfigArr(a,!0,!0,!1);c.setCommonConfigArr(g,!1,!1,!0);d.configure();c.configure()},_setCategories:function(){var c=this.get("components"),a=this.jsonData,d=c.xAxis,c=c.yAxis,b=a.processes,g=a.datatable,a=a.categories;c[0].setAxisPadding(.5,.5);c[0].setProcess(b);c[0].setDataTable(g);d[0].setCategory(a)},_setAxisValuePadding:function(){var c=this.components.dataset,a=c.length,d,b,g=-Infinity,e=-Infinity;for(d=
0;d<a;d++)b=c[d],b=b.getAxisValuePadding&&b.getAxisValuePadding()||{},g=K(g,b.left||-Infinity),e=K(e,b.right||-Infinity)},_spaceManager:function(){var c,a=this.config,d=this.components,b=d.xAxis&&d.xAxis[0],g=d.yAxis&&d.yAxis[0],e=d.legend.config.legendPos,h=100-(a.ganttwidthpercent||67);c=a.borderWidth;var n=d=0;this._resetViewPortConfig&&this._resetViewPortConfig();b.resetTransletAxis();g.resetTransletAxis();this._allocateSpace({top:c,bottom:c,left:c,right:c});c="bottom"===e?.225*a.canvasHeight:
.225*a.canvasWidth;this._manageChartMenuBar(c);this._manageLegendSpace("right"===e?.3*a.canvasWidth:.3*a.canvasHeight);a.actualCanvasTop=a.canvasTop;a.actualCanvasLeft=a.canvasLeft;e=g.placeAxis(h/100*a.canvasWidth);d+=(e.left||0)+(e.right||0);g&&this._allocateSpace(e);c=.6*a.canvasHeight;e=b.placeAxis(c);n+=e.top||0;a.totalWidth=d;a.totalHeight=n;b&&this._allocateSpace(e);a=g&&g.setProcessHeight();g.setAxisData({processTotalHeight:a})},_drawCanvas:function(){var c=this.jsonData.chart,a=this.components,
d=this.config,b=this.graphics,g=a.paper,e=a.canvas,a=e.graphics,h=e.config,e=h.clip={},n=a.canvasBorderElement,f=this.get("config","animationObj"),p=f.duration,l=f.dummyObj,t=f.animObj,f=f.animType,m=a.canvasElement,s=d.actualCanvasLeft,A=d.actualCanvasTop,u=d.canvasWidth,k=d.canvasHeight,r=d.canvasLeft,F=d.canvasTop,D=d.canvasWidth+d.totalWidth,d=d.canvasHeight+d.totalHeight,b=b.canvasGroup,y=h.canvasBorderRadius,x=h.canvasBorderWidth,w=.5*x,v=h.canvasBorderColor,E=h.canBGColor,G=h.shadow,c=h.showCanvasBG=
Boolean(q(c.showcanvasbg,1)),B=h.shadowOnCanvasFill,C=h.showCanvasBorder,h={x:s-w,y:A-w,width:D+x,height:d+x,r:y,"stroke-width":x,stroke:v,"stroke-linejoin":2<x?"round":"miter"};C?n?(n.show(),n.animateWith(l,t,{x:s-w,y:A-w,width:D+x,height:d+x,r:y},p,f),n.attr({"stroke-width":x,stroke:v,"stroke-linejoin":2<x?"round":"miter"}),n.shadow(G)):a.canvasBorderElement=g.rect(h,b).shadow(G):n&&n.hide();e["clip-canvas"]=[K(0,r),K(0,F),K(1,u),K(1,k)];e["clip-canvas-init"]=[K(0,r),K(0,F),1,K(1,k)];c?(h={x:s,
y:A,width:D,height:d,r:y,"stroke-width":0,stroke:"none",fill:X(E)},m?(m.show(),p&&m.animateWith(l,t,{x:s,y:A,width:D,height:d,r:y},p,f),m.attr(h),m.shadow(B)):a.canvasElement=g.rect(h,b).shadow(B)):m&&m.hide()},_postSpaceManagement:function(){var c=this.config,a=this.components,d=a.xAxis&&a.xAxis[0],b=a.yAxis&&a.yAxis[0],g=b.getAxisData("processTotalHeight"),e=c.canvasHeight,h=a.legend,n=c.xDepth,f=a.canvas.config,p=f.canvasBorderWidth,l=f.canvasPadding,t=a.vScrollBar.userConf,m,s=f.canvasPaddingLeft,
f=f.canvasPaddingRight,A=c.ganttpanedurationunit,u=a.hProcessScrollBar,a=(a=a.hScrollBar)&&a.userConf.height||0,u=u&&u.userConf.height||0,k,q;q=void 0!==Number(c.ganttpaneduration)&&void 0!==A?!0:!1;A=b.getAxisData("totalWidth");k=b.getAxisData("totalVisiblelWidth");a=K(A>k?u:0,q?a:0);g>e-a&&(m=!0);g=m?t.width||0:0;g=c.canvasWidth-(n||0)-K(s,l)-K(f,l)-g;d&&d.setAxisDimention({x:c.canvasLeft+(n||0)+K(s,l),y:c.canvasTop-(c.shift||0),opposite:c.canvasBottom+p,axisLength:g});c.currentCanvasWidth=g;b&&
b.setAxisDimention({x:c.canvasLeft-(c.shift||0),y:c.canvasTop,opposite:c.canvasRight+p,axisLength:c.canvasHeight});this._manageScrollerPosition();h.postSpaceManager()},_resetViewPortConfig:function(){this.config.viewPortConfig={scaleX:1,scaleY:1,x:0,y:0}},_manageScrollerPosition:function(){var c=this.config,a=this.components,d,b=a.hScrollBar,g=a.vScrollBar,e=a.hProcessScrollBar,h=c.totalWidth||0,n=c.totalHeight||0;this._setAxisScale&&this._setAxisScale();d=c.vScrollEnabled;a=c.hScrollEnabled;b=b.getLogicalSpace();
c.hScrollHeight=!1===a?0:b.height+g.conf.padding;b=g.getLogicalSpace();c.vScrollWidth=!1!==d?b.width+g.conf.padding:0;b=e.getLogicalSpace();c.hProcessScrollHeight=c.hProcessScrollEnabled?b.height+e.conf.padding:0;n+=K(c.hProcessScrollHeight,c.hScrollHeight);this._allocateSpace({bottom:K(c.hProcessScrollHeight,c.hScrollHeight)});c.totalWidth=h;c.totalHeight=n},updateManager:function(c,a){var d=this.config,b=this.config.viewPortConfig,g=b.scaleX,e=this.components.xAxis[0],h=this.components.yAxis[0],
n=this.graphics.datasetGroup,f=this.graphics.datalabelsGroup,p=this.graphics.trackerGroup,l=d.xOffset||0,t=d.yOffset||0,m=d.canvasHeight,s=d.currentCanvasWidth,A=b.scaleY;a?d.lastHScrollPosition=c:d.lastVScrollPosition=c;a?(l=d.xOffset=s*(g-1)*c,b.x=l/g,e.translateAxis(-l,void 0)):(t=d.yOffset=m*(A-1)*c,b.y=t/A,h.translateAxis(void 0,-t));d="t"+-l+", "+-t;n.attr({transform:d});f.attr({transform:d});p.attr({transform:d})},_setAxisScale:function(){var c=this.components,a=this.config,d=c.xAxis[0],b=
d.getLimit(),g=b.max,b=b.min,e=new Date(b),h=c.yAxis[0],n=this.components.numberFormatter,f=Number(a.ganttpaneduration),p=a.scrollOptions||(a.scrollOptions={}),l=a.ganttpanedurationunit,t=g-b,b=a.canvasHeight,m=a.scrolltodate,s=a.canvasWidth,A=a.canvasLeft,u=c.hProcessScrollBar,c=(c=c.hScrollBar)&&c.userConf.height||0,u=u&&u.userConf.height||0,k=d.getPixel(g)-A,g=h.getAxisData("processTotalHeight");if(void 0===f||void 0===l)a.hScrollEnabled=!1;else{switch(l){case "y":e.setFullYear(e.getFullYear()+
f);break;case "m":e.setMonth(e.getMonth()+f);break;case "d":e.setDate(e.getDate()+f);break;case "h":e.setHours(e.getHours()+f);break;case "mn":e.setMinutes(e.getMinutes()+f);break;default:e.setSeconds(e.getSeconds()+f)}e=e.getTime();e=d.getPixel(e)-A;a.hScrollEnabled=!0;a.viewPortConfig.scaleX=e=k/e;p.horizontalVxLength=t/NaN*f;m&&(n=n.getDateValue(m).ms,d=d.getPixel(n),a.viewPortConfig.x=ia(d-A,s*(e-1))/e)}d=h.getAxisData("totalWidth");h=h.getAxisData("totalVisiblelWidth");a.hProcessScrollEnabled=
d>h?!0:!1;h=K(a.hProcessScrollEnabled?u:0,a.hScrollEnabled?c:0);b-=h;Math.floor(g)>b?(a.viewPortConfig.scaleY=g/b,a.vScrollEnabled=!0):a.vScrollEnabled=!1},drawScrollBar:function(){var c=this,a=c.config,d=c.components,b=d.xAxis[0],g=b.config.axisData,e=b.config.axisRange,h=a.viewPortConfig,n=a.scrollOptions||(a.scrollOptions={}),f=e.max,p=e.min,l=n.horizontalVxLength,t=d.hScrollBar,e=t.node,m=d.vScrollBar,s=m.node,A=d.hProcessScrollBar,u=A.node,k=a.useverticalscrolling,r=f-p,F=a.canvasRight,D=h.scaleX,
y=h.scaleY,x,w,v,E,G,B=a.vScrollEnabled,C=d.yAxis[0],L=B?m.conf.width:0;x=a.canvasLeft;w=a.canvasTop;v=a.canvasHeight;E=a.canvasWidth;d=d.canvas.config;G=d.canvasBorderWidth;q(G,g.showLine?g.axisLineThickness:0);q(G,g.lineStartExtension);q(G,g.lineEndExtension);n.viewPortMin=p;n.viewPortMax=f;n.scrollRatio=l/r;g=n.windowedCanvasWidth=b.getAxisPosition(l);f=n.fullCanvasWidth=b.getAxisPosition(f-p)-g;b=n.fullCanvasHeight=C.getAxisData("processTotalHeight");n=n.windowedCanvasHeight=v;p=C.getAxisData("totalWidth");
C=C.getAxisData("totalVisiblelWidth");y=1/y;!1!==a.hScrollEnabled?(t.draw(x,w+v,{width:E-L,scrollRatio:1/D,scrollPosition:h.x*D/(E*(D-1)),roundEdges:d.isRoundEdges,fullCanvasWidth:f,windowedCanvasWidth:g}),!e&&function(){var a;S.eve.on("raphael.scroll.start."+t.node.id,function(b){a=b;P.raiseEvent("scrollstart",{scrollPosition:b},c.chartInstance)});S.eve.on("raphael.scroll.end."+t.node.id,function(b){P.raiseEvent("scrollend",{prevScrollPosition:a,scrollPosition:b},c.chartInstance)})}()):t&&t.node&&
t.node.hide();!1!==B&&k?(m.draw(F-L,w,{height:v,scrollRatio:y,roundEdges:d.isRoundEdges,fullCanvasWidth:b,windowedCanvasWidth:n}),!s&&function(){var a;S.eve.on("raphael.scroll.start."+m.node.id,function(b){a=b;P.raiseEvent("scrollstart",{scrollPosition:b},c.chartInstance)});S.eve.on("raphael.scroll.end."+m.node.id,function(b){P.raiseEvent("scrollend",{prevScrollPosition:a,scrollPosition:b},c.chartInstance)})}()):m&&m.node&&m.node.hide();C<p?(A.draw(x-C,w+v,{width:C,scrollRatio:C/p,roundEdges:d.isRoundEdges,
fullCanvasWidth:f,windowedCanvasWidth:g}),!u&&function(){var a;S.eve.on("raphael.scroll.start."+A.node.id,function(b){a=b;P.raiseEvent("scrollstart",{scrollPosition:b},c.chartInstance)});S.eve.on("raphael.scroll.end."+A.node.id,function(b){P.raiseEvent("scrollend",{prevScrollPosition:a,scrollPosition:b},c.chartInstance)})}()):A&&A.node&&A.node.hide()},_createLayers:function(){var c=this.components.paper,a,d;Y.mscartesian._createLayers.call(this);d=this.graphics;a=d.datasetGroup;d.parentTaskGroup=
d.parentTaskGroup||c.group("parentTaskGroup",a);d.parentConnectorsGroup=d.parentConnectorsGroup||c.group("parentConnectorsGroup",a);d.parentMilestoneGroup=d.parentMilestoneGroup||c.group("parentMilestoneGroup",a)},_drawDataset:function(){this._setClipping();Y.mscartesian._drawDataset.call(this)},drawLegend:function(){var c=this.config,a=this.components.legend,d=a.config,b=d.width,g=d.height,e=c.marginLeft,h=c.marginTop,n=c.width,f=c.marginRight,p=c.marginBottom,l=c.totalWidth+c.canvasWidth,t=c.totalHeight+
c.canvasHeight,c=c.height;"right"===d.legendPos?(d=t-g,b=n-b-f,g=h+(0>d?0:d)/2):(d=l-b,b=e+(0>d?0:d)/2,g=c-g-p);a.drawLegend(b,g)},_setClipping:function(){var c=this.config,a=this.graphics.datasetGroup,d=this.graphics.datalabelsGroup,b=this.graphics.trackerGroup,g=c.viewPortConfig,e=g.scaleX,g=g.x,h=this.config.animationObj,n=h.dummyAnimElem,f=h.animObj,p=h.animType,h=h.transposeAnimDuration,l=this.components.canvas.config.clip["clip-canvas"].slice(0);this.config.clipSet?(a.animateWith(n,f,{"clip-rect":l},
h,p),d.animateWith(n,f,{"clip-rect":l},h,p),b.animateWith(n,f,{"clip-rect":l},h,p)):(a.attr({"clip-rect":l}),d.attr({"clip-rect":l}),b.attr({"clip-rect":l}));c.xOffset=g*e;a.attr({transform:"T"+-(g*e)+",0"});d.attr({transform:"T"+-(g*e)+",0"});b.attr({transform:"T"+-(g*e)+",0"});this.config.clipSet=!0},_createToolBox:function(){var c=this.components,a=c.yAxis[0],d=this._scrollBar,b=d.get,g=d.add,e,h;(c.chartMenuBar||{}).drawn||(Y.mscartesian._createToolBox.call(this),e=c.tb,h=c.toolBoxAPI,h=h.Scroller,
d.clear(),g({isHorizontal:!0},{scroll:function(a,b){return function(c){a.updateManager.call(a,c,b)}}(this,!0)}),g({isHorizontal:!1},{scroll:function(a,b){return function(c){a.updateManager.call(a,c,b)}}(this,!1)}),g({isHorizontal:!0},{scroll:function(){return function(b){a.manageProcessScroll(b)}}(this,!0)}),d=b()[0],g=b()[1],b=b()[2],c.hScrollBar=c.hScrollBar||(new h(d.conf,1,e.pId)).attachEventHandlers(d.handler),c.vScrollBar=c.vScrollBar||(new h(g.conf,2,e.pId)).attachEventHandlers(g.handler),
c.hProcessScrollBar=c.hProcessScrollBar||(new h(b.conf,3,e.pId)).attachEventHandlers(b.handler))},_preDraw:function(){this._setAxisValuePadding();this._setCategories()},defaultPaletteOptions:function(){var c=arguments;return z.extend2(z.extend2(z.extend2(z.extend2({},c[0]),c[1]),c[2]),c[3])}(W({},z.defaultGaugePaletteOptions),{paletteColors:["AFD8F8 F6BD0F 8BBA00 FF8E46 008E8E D64646 8E468E 588526 B3AA00 008ED6 9D080D A186BE CC6600 FDC689 ABA000 F26D7D FFF200 0054A6 F7941C CC3300 006600 663300 6DCFF6".split(" "),
"AFD8F8 F6BD0F 8BBA00 FF8E46 008E8E D64646 8E468E 588526 B3AA00 008ED6 9D080D A186BE CC6600 FDC689 ABA000 F26D7D FFF200 0054A6 F7941C CC3300 006600 663300 6DCFF6".split(" "),"AFD8F8 F6BD0F 8BBA00 FF8E46 008E8E D64646 8E468E 588526 B3AA00 008ED6 9D080D A186BE CC6600 FDC689 ABA000 F26D7D FFF200 0054A6 F7941C CC3300 006600 663300 6DCFF6".split(" "),"AFD8F8 F6BD0F 8BBA00 FF8E46 008E8E D64646 8E468E 588526 B3AA00 008ED6 9D080D A186BE CC6600 FDC689 ABA000 F26D7D FFF200 0054A6 F7941C CC3300 006600 663300 6DCFF6".split(" "),
"AFD8F8 F6BD0F 8BBA00 FF8E46 008E8E D64646 8E468E 588526 B3AA00 008ED6 9D080D A186BE CC6600 FDC689 ABA000 F26D7D FFF200 0054A6 F7941C CC3300 006600 663300 6DCFF6".split(" ")],bgColor:["FFFFFF","FFFFFF","FFFFFF","FFFFFF","FFFFFF"],bgAngle:[270,270,270,270,270],bgRatio:["100","100","100","100","100"],bgAlpha:["100","100","100","100","100"],canvasBgColor:["FFFFFF","FFFFFF","FFFFFF","FFFFFF","FFFFFF"],canvasBgAngle:[0,0,0,0,0],canvasBgAlpha:["100","100","100","100","100"],canvasBgRatio:["","","","",""],
canvasBorderColor:["545454","545454","415D6F","845001","68001B"],canvasBorderAlpha:[100,100,100,90,100],gridColor:["DDDDDD","D8DCC5","99C4CD","DEC49C","FEC1D0"],gridResizeBarColor:["999999","545454","415D6F","845001","D55979"],categoryBgColor:["F1F1F1","EEF0E6","F2F8F9","F7F0E6","FFF4F8"],dataTableBgColor:["F1F1F1","EEF0E6","F2F8F9","F7F0E6","FFF4F8"],toolTipBgColor:["FFFFFF","FFFFFF","FFFFFF","FFFFFF","FFFFFF"],toolTipBorderColor:["545454","545454","415D6F","845001","68001B"],baseFontColor:["555555",
"60634E","025B6A","A15E01","68001B"],borderColor:["767575","545454","415D6F","845001","68001B"],borderAlpha:[50,50,50,50,50],legendBgColor:["ffffff","ffffff","ffffff","ffffff","ffffff"],legendBorderColor:["666666","545454","415D6F","845001","D55979"],plotBorderColor:["999999","8A8A8A","6BA9B6","C1934D","FC819F"],plotFillColor:["EEEEEE","D8DCC5","BCD8DE","E9D8BE","FEDAE3"],scrollBarColor:["EEEEEE","D8DCC5","99C4CD","DEC49C","FEC1D0"]})},Y.scrollbase,{taskbarroundradius:0,taskbarfillmix:" { light-10 }, { dark-20 }, { light-50 }, { light-85 }",
taskbarfillratio:"0,8,84,8",showslackasfill:1,dateintooltip:1,tasklabelsalign:"center",datepadding:3,showtasknames:0,showpercentlabel:!1,showhovereffect:1,slackfillcolor:"FF5E5E",connectorextension:10,tasklabelspadding:2,taskdatepadding:3,showlabels:void 0,showtooltip:1,showtaskhovereffect:void 0,useverticalscrolling:1,ganttpanedurationunit:void 0,ganttpaneduration:void 0,showtaskstartdate:void 0,showtaskenddate:void 0,ganttwidthpercent:void 0,showshadow:1});pa&&pa({showpercentlabel:{type:aa,pAttr:"showpercentlabel"},
fontsize:{type:H},alpha:{type:H},showborder:{type:aa},borderthickness:{type:H},borderalpha:{type:H},showHoverEffect:{type:H},hoverFillAlpha:{type:H},slackHoverFillColor:{type:H},slackHoverFillAlpha:{type:aa},showlabels:{type:aa,pAttr:"showtasknames"},slackfillcolor:{pAttr:"slackfillcolor"},showtasklabels:{type:aa,pAttr:"showtasknames"},showtasknames:{type:aa,pAttr:"showlabels"},showconnectorhovereffect:{type:H,pAttr:"showhovereffect"},connectorextension:{type:H},tasklabelspadding:{type:H},taskdatepadding:{type:H},
showstartdate:{type:H,pAttr:"showtaskstartdate"},showenddate:{type:H,pAttr:"showtaskenddate"},showtaskhovereffect:{type:H,pAttr:"showhovereffect"},useverticalscrolling:{type:H},taskbarroundradius:{type:H},showshadow:{type:H}});FusionCharts.register("component",["dataset","Task",{type:"task",configure:function(){var c=W({},this.JSONData);this.__setDefaultConfig();ja(c,this.config,this.chart&&this.chart.config,{task:!0});this._setConfigure()},_setConfigure:function(c){var a=this.config,d=this.chart,
b=d.jsonData,g=b.chart,e=this.JSONData;c=c||e.task;var h=(b.processes||{}).process||[],b=c&&c.length,n=d.components.colorManager,f=d.get("config"),p=d.get("components","numberFormatter"),l=f.taskbarfillmix,t=f.taskbarfillratio,m=f.showslackasfill,s=this.components.data,A,u,k,R,F,D,y,x=f.dateintooltip,w,v,h=h.length,E={right:"right",left:"left",undefined:"center",center:"center"},G,B,C,L,fa,I,J,H,M=d.components.tasksMap={},na=f.style.inCanvasStyle,S,xa,O,P=0;s||(s=this.components.data=[]);a.showlabels=
r(e.showlabels,e.showlabels,e.showname,g.showtasklabels,g.showtasknames,0);if(b)for(d=0;d<b;d+=1)v=c[d],A=P%h,(G=r(v.processid))&&"string"===typeof G&&(G=G.toLowerCase()),O=v.id,B=q(v.alpha,a.alpha),I=r(v.color,a.color,n.getColor("plotFillColor")),C=q(v.borderalpha,a.borderalpha,"100"),L=r(v.bordercolor,a.bordercolor,n.getColor("plotBorderColor")),fa=ga(r(v.label,v.name),""),R=n.parseColorMix(I,l),F=n.parseAlphaList(B.toString(),R.length),D=n.parseRatioList(t,R.length),J=q(v.angle,a.angle),w=s[d]||
(s[d]={config:{}}),w=w.config,w.index=d,w.link=v.link,w.processId=r(v.processid,"__FCDPID__"+A),w.style={color:T(r(v.fontcolor,a.fontcolor,na.color)),fontSize:q(v.fontsize,a.fontsize,na.fontSize)+"px",fontFamily:r(v.font,a.font,na.fontFamily)},V(w.style),w.startMs=p.getDateValue(v.start).ms,w.endMs=p.getDateValue(v.end).ms,k=p.getFormattedDate(w.startMs),u=p.getFormattedDate(w.endMs),w.tAlpha=B,w.tBorderColor=L,w.tBorderAlpha=C,y="",w.percentComplete=A=ia(q(v.percentcomplete,-1),100),w.labelAlign=
E[[r(v.labelalign,f.tasklabelsalign).toLowerCase()]],w.showAsGroup=q(v.showasgroup,0),H=w.showPercentLabel=q(v.showpercentlabel,a.showpercentlabel),q(v.showlabel,v.showname,a.showlabels)&&(y=fa),H&&-1!==A&&(y+=" "+A+"%"),w.percentComplete=A,xa={FCcolor:{color:R.join(),alpha:F,ratio:D,angle:J}},S=n.parseColorMix(r(v.slackfillcolor,a.slackfillcolor),l),S=m?{FCcolor:{color:S.join(),alpha:F,ratio:D,angle:J}}:da,F={FCcolor:{color:n.parseColorMix(r(v.hoverfillcolor,a.hoverfillcolor,f.taskhoverfillcolor,
Z(I,80)),l).join(),alpha:n.parseAlphaList(r(v.hoverfillalpha,a.hoverfillalpha).toString(),R.length),ratio:D,angle:J}},I=N(r(v.hoverbordercolor,a.hoverbordercolor,Z(L,80)),r(v.hoverborderalpha,a.hoverborderalpha,C)),R=m?{FCcolor:{color:n.parseColorMix(Z(r(v.slackhoverfillcolor,a.slackhoverfillcolor,f.slackfillcolor),80),l).join(),alpha:n.parseAlphaList(r(v.slackhoverfillalpha,a.slackhoverfillalpha,"100").toString(),R.length),ratio:D,angle:J}}:da,w.color=X(xa),w.slackColor=X(S),w.hoverFillColor=X(F),
w.hoverBorderColor=I,w.slackHoverColor=X(R),w.showHoverEffect=q(v.showhovereffect,a.showhovereffect,f.showtaskhovereffect,1),w.taskHeight=r(v.height,"35%"),w.topPadding=r(v.toppadding,"35%"),w.showPercentLabel=H,w.endDate=q(v.showenddate,a.showenddate)?u:void 0,w._endDate=u,w.startDate=q(v.showstartdate,a.showstartdate)?k:void 0,w._startDate=k,w.shadow={opacity:K(B,C)/100,inverted:!0},w.id=G,w.taskId=O,w.borderColor=N(L,C),w.borderThickness=q(v.showborder,a.showborder)?q(v.borderthickness,a.borderthickness):
0,v=qa(Q(r(v.tooltext,a.hovertext,a.plottooltext,g.plottooltext))),v=void 0!==v?z.parseTooltext(v,[3,28,29,30,31],{end:u,start:k,label:fa,percentComplete:-1!==A?p.percentValue(A):"",processName:""},a):(""!==fa?fa+(x?", ":""):"")+(x?k+" - "+u:""),w.label=y,w.toolText=v,"string"===typeof O&&(O=O.toLowerCase()),void 0!==O&&(M[O]=s[d]),P+=1;this.visible=q(e.visible,1)},getAxisValuePadding:function(){},draw:function(){var c;c=this.visible;var a=this.chart,d=a.jsonData,b=a.get("config"),g=a.get("config",
"animationObj"),e=g.duration,h=g.dummyObj,n=g.animObj,g=g.animType,f=a.components,p=b.canvasTop,l=f.paper,f=f.xAxis[0],t,m=this.yAxis;t=a.graphics.parentTaskGroup;var s=this.components,A=s.data,u,k,r=s.removeDataArr,F=r&&r.length,D=a.config.dataLabelStyle;u=a.graphics.datalabelsGroup;var y=this.graphics.dataLabelContainer;k={fontFamily:D.fontFamily,fontSize:D.fontSize,lineHeight:D.lineHeight,fontWeight:D.fontWeight,fontStyle:D.fontStyle,color:D.color};var D=function(){y.show();a._animCallBack()},
x=this.graphics,w=x.container,x=x.shadowContainer,s=s.pool||[],v,E,G,B,C,L,z,I,J,H,K,M,P,N,O,T,Q;Q=b.showtooltip;var V=b.datepadding,U=b.viewPortConfig,W=U.x,d=d.processes.process&&d.processes.process.length,U=U.scaleX,X=b.taskbarroundradius,Y=b.showshadow;w||(w=this.graphics.container=l.group("columns",t),c?w.show():w.hide());y||(y=this.graphics.dataLabelContainer=l.group("labels",u),c?y.show():y.hide());a._addCSSDefinition(".fusioncharts-datalabels .fusioncharts-label",k);x||(x=this.graphics.shadowContainer=
l.group("shadow",t).toBack(),c||x.hide());Q?w.trackTooltip(!0):w.trackTooltip(!1);t=A.length;for(c=Q=0;c<t;c++)E=(k=(u=A[c])&&u.config)&&k.startMs,G=k&&k.endMs,void 0!==u&&void 0!==E&&null!==G&&(B=k.toolText,G=k.taskHeight,E=k.link,M=k.borderThickness,C=k.id,T=k.color,P=!1,Q>d-1&&(Q=0),I=void 0!==k.id?m.getProcessPositionById(C):m.getProcessPositionByIndex(Q),Q++,L=I.height,J=L*(/%/g.test(k.topPadding)&&.01*va(k.topPadding,10))||q(k.topPadding,L),G=k.height=L*(/%/g.test(G)&&.01*va(G,10))||q(G,L),
void 0!==k.id&&m.getProcessPositionById(C),C=k.xPos=f.getAxisPosition(k.startMs)+W*U,v=f.getAxisPosition(k.endMs)+W*U,v=k.width=ua(z=v-C),I=I.bottom+p-L,I=k.yPos=I+ia(J,L-G),N=.5*G,!u.graphics&&(u.graphics={}),O=S.crispBound(C,I,v,G,M),C=O.x,I=O.y,v=O.width,G=O.height,!1!==ma(C,I,v,G)&&(J=u.graphics.element,k.showAsGroup?(L="path",z={path:["M",C,I]},N={path:["M",C,I,"v",G,"L",C+N,I+N,"H",C+v-N,"L",C+v,I+G,"v",-G,"H",C]}):(L="rect",N={x:O.x,y:O.y,width:O.width||1,height:G},z=e?{x:O.x,y:O.y,width:0,
height:G}:N),J&&J&&J.type!==L&&(J.hide(),J=u.graphics.element=null),J||(L=k.showAsGroup?"path":"rect",s.element&&s.element.length&&(J=s.element[0]).type===L?u.graphics.element=J=s.element.shift():(J=u.graphics.element=l[L](w).attr(z).data("dataset",this),P=!0,this.slackElemHandlers(J,a))),L={processId:k.processId,taskId:k.taskId,start:k._startDate,end:k._endDate,showAsGroup:k.showAsGroup,link:k.link,sourceType:"task",percentComplete:-1!==k.percentComplete},-1===k.percentComplete||k.showAsGroup?(u.graphics.taskFill&&
u.graphics.taskFill.hide(),u.graphics.slackElem&&u.graphics.slackElem.hide()):(z=v*k.percentComplete*.01,T=da,H=u.graphics.taskFill,K=u.graphics.slackElem,H||(s.taskFill&&s.taskFill.length?H=u.graphics.taskFill=s.taskFill.shift():(H=u.graphics.taskFill=l.rect(w),this.slackElemHandlers(H,a),P=!0,H.attr({x:C,y:I,height:G,width:e?0:z}))),K||(s.slackElem&&s.slackElem.length?K=u.graphics.slackElem=s.slackElem.shift():(K=u.graphics.slackElem=l.rect(w),this.slackElemHandlers(K,a),P=!0,K.attr({x:C,y:I,width:0,
height:G}))),H.show().animateWith(h,n,{x:C,y:I,height:G,width:z,r:0},e,g),H.attr({fill:k.color,cursor:E?"pointer":"",ishot:!0,"stroke-width":0}).data("chart",a).data("dataObj",u).data("dataset",this).tooltip(B),K.show().animateWith(h,n,{x:C+z||1,y:I,width:v-z,height:G,r:0},e,g),K.attr({fill:k.slackColor,cursor:E?"pointer":"",ishot:!0,"stroke-width":0}),H&&H.data("eventArgs",L),K&&K.data("eventArgs",L).data("dataObj",u).data("dataset",this).data("chart",a)),J.show().animateWith(h,n,N,e,g).attr({fill:T,
stroke:k.borderColor,cursor:E?"pointer":"",ishot:!0,r:X,"stroke-width":M}).shadow({opacity:Y},x).tooltip(B).data("dataObj",u).data("chart",a).data("dataset",this).data("eventArgs",L),e&&P&&(y.hide(),J.animateWith(h,n,{width:O.width||1},e,g,D)),M=u.graphics.label,la(k.label)&&""!==k.label?(B=k.labelAlign,M||(s.valElem&&s.valElem.length?M=u.graphics.label=s.valElem.shift():(M=u.graphics.label=l.text(y).data("dataset",this),this.slackElemHandlers(M,a))),M.show().animateWith(h,n,{x:C+v*Ea[B]+Fa[B],y:I-
.5*Ca(k.style.lineHeight,10)-b.tasklabelspadding},e,g).attr({text:k.label,"text-anchor":Da[B],direction:b.textDirection,cursor:E?"pointer":"",ishot:!0}).css(k.style).data("dataObj",u).data("dataObj",u).data("eventArgs",L)):M&&M.hide().attr({"text-bound":[]}),B=u.graphics.startLabel,la(k.startDate)&&""!==k.startDate?(B||(s.startValElem&&s.startValElem.length?B=u.graphics.startLabel=s.startValElem.shift():(B=u.graphics.startLabel=l.text(y).data("dataset",this),this.slackElemHandlers(B,a))),B.show().animateWith(h,
n,{x:C-2-V,y:I+.5*G},e,g).attr({text:k.startDate,"text-anchor":"end",cursor:E?"pointer":"",ishot:!0,direction:b.textDirection}).css(k.style).data("dataObj",u).data("chart",a).data("eventArgs",L)):B&&B.hide().attr({"text-bound":[]}),B=u.graphics.endLabel,la(k.endDate)&&""!==k.endDate?(B||(s.endValElem&&s.endValElem.length?B=u.graphics.endLabel=s.endValElem.shift():(B=u.graphics.endLabel=l.text(y).data("dataset",this),this.slackElemHandlers(B,a))),B.show().animateWith(h,n,{x:C+v+2+V,y:I+.5*G},e,g).attr({text:k.endDate,
cursor:E?"pointer":"",ishot:!0,direction:b.textDirection,"text-anchor":"start"}).css(k.style).data("dataObj",u).data("chart",a).data("eventArgs",L)):B&&B.hide().attr({"text-bound":[]})));this.drawn=!0;for(c=0;c<F;c++)this._removeDataVisuals(r.shift())},slackElemHandlers:function(c,a){var d=this;c&&c.click(function(b){M.call(this,a,b)}).hover(function(b){var c=this.data("dataObj");M.call(this,a,b,"DataPlotRollOver");c.config.showHoverEffect&&d.taskHoverHandler.call(this,a)},function(b){var c=this.data("dataObj");
M.call(this,a,b,"DataPlotRollOut");c.config.showHoverEffect&&d.taskHoverOutHandler.call(this,a)})},taskHoverHandler:function(){var c=this.data("dataObj")||{},a=this.data("dataset").components.data,c=c.config||{},d=c.index,a=a[d]&&a[d].graphics,d={fill:c.hoverFillColor,stroke:c.hoverBorderColor};-1===c.percentComplete||c.showAsGroup||(a.slackElem.attr({fill:c.slackHoverColor}),a.taskFill.attr({fill:c.hoverFillColor}),delete d.fill);a.element.attr(d)},taskHoverOutHandler:function(){var c=this.data("dataObj")||
{},a=(this.data("dataset")||{}).components.data,c=c.config||{},d=c.index,a=a[d]&&a[d].graphics,d={fill:c.color,stroke:c.borderColor,"stroke-width":c.borderThickness,"stroke-dasharray":c.dashedStyle};a&&(-1===c.percentComplete||c.showAsGroup||(a.slackElem.attr({fill:c.slackColor}),a.taskFill.attr({fill:c.color}),delete d.fill),a.element.attr(d))},slackElemClickHandler:function(c){var a=this.data("chart");M.call(this,a,c)},_removeDataVisuals:function(c){var a=this.components.pool||(this.components.pool=
{}),d,b,g;if(c)for(d in b=c.graphics,b)c=a[d]||(a[d]=[]),g=b[d],g.hide&&"function"===typeof g.hide&&(g.attr({"text-bound":[]}),g.hide(),g.transform&&g.transform("")),c.push(b[d])}},"column",{showpercentlabel:void 0,showlabels:void 0,showborder:1,borderthickness:1,font:"",fontcolor:"",fontsize:"",color:"",alpha:"100",angle:270,slackfillcolor:void 0,borderalpha:"100",hoverfillcolor:"",hoverfillalpha:"100",slackhoverfillalpha:"100",showstartdate:void 0,showenddate:void 0}]);FusionCharts.register("component",
["dataset","Milestone",{type:"Milestone",configure:function(){var c=this.config,a=W({},this.JSONData);this.__setDefaultConfig();ja(a,c,{milestones:!0});this._setConfigure()},_setConfigure:function(c){var a=this.chart,d=this.JSONData,b=(c=c||d.milestone)&&c.length,g=a.components.colorManager,e=a.get("config"),h=a.get("components","numberFormatter"),n=this.components.data,f=a.config.style,p=f.inCanvasStyle,a=a.components.tasksMap,l,t,m,s,A,u,k,R;n||(n=this.components.data=[]);for(t=0;t<b;t+=1)m=c[t],
(l=n[t])||(l=n[t]={config:{}}),l=l.config,R=ga(m.taskid,"").toLowerCase(),A=r(m.shape,"polygon").toLowerCase(),s=q(m.numsides,5),u=0,"star"===A?u=.4:(ta(s),ta(s).split("-")),A=r(m.color,g.getColor("legendBorderColor")),k=qa(Q(r(m.tooltext,m.hovertext,e.milestonetooltext))),void 0!==k&&a[R]?(f=a[R].config,k=z.parseTooltext(k,[28,32,33,34,35,36],{date:h.getFormattedDate(m.date),taskStartDate:f._startDate,taskEndDate:f._endDate,taskLabel:f.label,taskPercentComplete:-1!==f.percentComplete?h.percentValue(f.percentComplete):
"",processName:""},m)):(f=(new Date(m.date)).getTime(),k=isNaN(f)?m.date:h.getFormattedDate(m.date)),f={color:T(r(m.fontcolor,e.milestonefontcolor,p.color)),fontSize:q(m.fontsize,e.milestonefontsize,p.fontSize)+"px",fontFamily:r(m.font,e.milestonefont,p.fontFamily),fontWeight:q(m.fontbold,e.milestonefontbold,0)&&"bold"||"normal",fontStyle:q(m.fontitalic,e.milestonefontitalic,0)&&"italic"||"normal"},V(f),l.numSides=s,l.startAngle=q(m.startangle,90),l.radius=m.radius,l.origDate=m.date,l.date=h.getDateValue(m.date),
l.fillColor=T(A),l.fillAlpha=.01*q(m.fillalpha,m.alpha,100),l.borderColor=T(r(m.bordercolor,A)),l.borderAlpha=.01*q(m.borderalpha,m.alpha,100),l.displayValue=Q(m.label),l.style=f,l.hoverFillColor=T(r(m.hoverfillcolor,e.milestonehoverfillcolor,Z(A,80))),l.hoverFillAlpha=.01*q(m.hoverfillalpha,e.milestonehoverfillalpha,m.fillalpha,m.alpha,100),l.hoverBorderColor=T(r(m.hoverbordercolor,e.milestonehoverbordercolor,Z(r(m.bordercolor,A),80))),l.hoverBorderAlpha=.01*q(m.hoverborderalpha,e.milestonehoverborderalpha,
m.borderalpha,m.alpha,100),l.showHoverEffect=q(m.showhovereffect,e.showmilestonehovereffect,e.showhovereffect,1),l.depth=u,l.taskId=R,l.borderThickness=q(m.borderthickness,1),l.link=m.link,l.toolText=k;this.visible=q(d.visible,1)},draw:function(){var c=this.chart,a=c.components,d=a.xAxis[0],b=this.components.data,g=a.tasksMap,e=c.config,h=c.get("config","animationObj"),n=h.duration,f=c.graphics.datalabelsGroup,p=this.graphics.container,l=c.graphics.parentMilestoneGroup,t=this.graphics.dataLabelContainer,
m=this.visible,a=a.paper,s=this.components.removeDataArr||[],A=s.length,u=h.dummyObj,k=h.animObj,h=h.animType,r,F,D,y,x,w,v,E,G;D=e.showtooltip;var B=this.components.pool||[];p||(p=this.graphics.container=a.group("milestone",l),m?p.show():p.hide());t||(t=this.graphics.dataLabelContainer=a.group("labels",f),m?t.show():t.hide());D?p.trackTooltip(!0):p.trackTooltip(!1);G=b&&b.length;for(E=0;E<G;E+=1)if(f=b[E])m=f.config,r=g[m.taskId],!f.graphics&&(f.graphics={}),l=f.graphics,D=l.element,v=l.label,r?
(F=r.config,w=S.animation({"fill-opacity":m.fillAlpha,"stroke-opacity":m.borderAlpha},n,h),r={sides:m.sides,date:m.origDate,radius:m.radius,taskId:m.taskId,toolText:m.toolText,link:m.link,numSides:m.numSides},y=d.getPixel(m.date.ms),x=F.yPos+.5*F.height,F=q(m.radius,.6*F.height),!1!==ma(y,x,F)&&(F=[m.numSides,y,x,F,m.startAngle,m.depth],D||(D=B.element&&B.element.length?l.element=B.element.shift():l.element=a.polypath(p).click(this.clickHandler(c)).hover(this.rollOverHandler(c),this.rollOutHandler(c))),
D.show().animateWith(u,k,{polypath:F},n,h).attr({fill:m.fillColor,"fill-opacity":n?0:m.fillAlpha,stroke:m.borderColor,"stroke-opacity":n?0:m.borderAlpha,groupId:"gId"+E,ishot:!0,cursor:m.link?"pointer":"","stroke-width":m.borderThickness}).tooltip(m.toolText).data("eventArgs",r).data("dataObj",f),""!==m.displayValue&&void 0!==m.displayValue&&(v||(v=B.label&&B.label.length?l.label=B.label.shift():l.label=a.text(t).click(this.clickHandler(c)).hover(this.rollOverHandler(c),this.rollOutHandler(c))),v.show().animateWith(u,
k,{x:y,y:x},n,h).attr({text:m.displayValue,groupId:"gId"+E,cursor:m.link?"pointer":"",ishot:!0,direction:e.textDirection,"text-anchor":"middle"}).css(m.style).tooltip(m.toolText).data("eventArgs",r).data("dataObj",f)),n&&w&&l.element.animate(w.delay(n)))):(D&&D.hide(),v&&v.hide().attr({"text-bound":[]}));for(E=0;E<A;E++)this._removeDataVisuals(s.shift())},clickHandler:function(c){return function(a){M.call(this,c,a,"MilestoneClick")}},rollOverHandler:function(c){return function(a){var d=this.data("dataObj"),
b=d.config;M.call(this,c,a,"MilestoneRollOver");b.showHoverEffect&&d.graphics.element.attr({fill:b.hoverFillColor,stroke:b.hoverBorderColor,"fill-opacity":b.hoverFillAlpha,"stroke-opacity":b.hoverBorderAlpha})}},rollOutHandler:function(c){return function(a){var d=this.data("dataObj"),b=d.config;M.call(this,c,a,"MilestoneRollOut");b.showHoverEffect&&d.graphics.element.attr({fill:b.fillColor,stroke:b.borderColor,"fill-opacity":b.fillAlpha,"stroke-opacity":b.borderAlpha})}}},"Task",{showpercentlabel:0,
showstartdate:0,showenddate:0,showlabels:void 0,showborder:1,borderthickness:1,showHoverEffect:1,slackFillColor:"FF5E5E",font:"",fontcolor:"",fontsize:"",color:"",alpha:"100",bordercolor:"",borderalpha:"100",hoverFillColor:"",hoverFillAlpha:"100",slackHoverFillColor:10,slackHoverFillAlpha:"100"}]);FusionCharts.register("component",["dataset","Connectors",{configure:function(){var c=this.config,a=W({},this.JSONData);this.__setDefaultConfig();ja(a,c,{connector:!0});this._setConfigure()},_setConfigure:function(c){var a=
this.config,d=this.chart,b=this.JSONData,g=(c=c||b.connector)&&c.length||0,e=d.components.colorManager,d=d.get("config"),h=this.components.data,n,f,p,l,t,m,s;h||(h=this.components.data=[]);for(n=0;n<g;n+=1)p=c[n],(f=h[n])||(f=h[n]={config:{}}),!f.config&&(f.config={}),f=f.config,l=r(p.color,a.color,e.getColor("plotBorderColor")),t=q(p.alpha,a.alpha,100),m=q(p.thickness,a.thickness,1),s=q(p.isdashed,a.isdashed,1),f.fromTaskId=ga(p.fromtaskid,"").toLowerCase(),f.toTaskId=ga(p.totaskid,"").toLowerCase(),
f.fromTaskConnectStart=q(p.fromtaskconnectstart,0),f.toTaskConnectStart=q(p.totaskconnectstart,1),f.color=N(l),f.alpha=.01*t,f.link=p.link,f.showHoverEffect=q(p.showhovereffect,a.showhovereffect,d.showconnectorhovereffect,1),f.hoverColor=N(r(p.hovercolor,a.hovercolor,d.connectorhovercolor,Z(l,80)),q(p.hoveralpha,a.hoveralpha,d.connectorhoveralpha,t)),f.hoverThickness=q(p.hoverthickness,a.hoverthickness,d.connectorhoverthickness,m),f.thickness=m,f.dashedStyle=s?ha(q(p.dashlen,a.dashlen,5),q(p.dashgap,
a.dashgap,m),m):"none";this.visible=q(b.visible,1)},draw:function(){var c=this.chart,a=c.components,d=this.components.data,b=a.paper,g=d.length,a=a.tasksMap,e=c.config.connectorextension,h=c.graphics.parentConnectorsGroup,n=this.graphics.container,f=this.components.pool||[],p=this.visible,l=c.get("config","animationObj"),t=l.duration,m=l.dummyObj,s=l.animObj,l=l.animType,A=this.components.removeDataArr||[],u=A.length,k,q,r,D,y,x,w,v,E,G,B,C,z,H,I,J;n||(n=this.graphics.container=b.group("connectors",
h),p?n.show():n.hide());for(J=0;J<=g;J+=1)if(h=d[J])if(B=h.config,!h.graphics&&(h.graphics={}),p=h.graphics,k=B.fromTaskId&&B.fromTaskId.toLowerCase(),q=B.toTaskId&&B.toTaskId.toLowerCase(),k=a[k],r=a[q],q=p.connector,k&&r){if(C=k.config,v=r.config,k=C.yPos+.5*C.height,r=v.yPos+.5*v.height,D=k==r,y=C.xPos,x=C.xPos+C.width,w=v.xPos,v=v.xPos+v.width,!1!==ma(y,x,w,v)){G=0;0===B.fromTaskConnectStart&&1===B.toTaskConnectStart&&(G=1);0===B.fromTaskConnectStart&&0===B.toTaskConnectStart&&(G=2);1===B.fromTaskConnectStart&&
1===B.toTaskConnectStart&&(G=3);1===B.fromTaskConnectStart&&0===B.toTaskConnectStart&&(G=4);if(D)switch(C=C.height,G){case 1:E=(w-x)/10;E=["M",x,k,x+E,k,"L",x+E,k,x+E,k-C,"L",x+E,k-C,w-E,k-C,"L",w-E,k-C,w-E,k,"L",w-E,k,w,r];break;case 2:E=["M",x,k,x+e,k,"L",x+e,k,x+e,k-C,"L",x+e,k-C,v+e,k-C,"L",v+e,r-C,v+e,r,v,r];break;case 3:E=["M",y,k,y-e,k,"L",y-e,k,y-e,k-C,"L",y-e,k-C,w-e,k-C,"L",w-e,k-C,w-e,k,"L",w-e,k,w,k];break;case 4:E=["M",y,k,y-e,k,"L",y-e,k,y-e,k-C,"L",y-e,k-C,v+e,k-C,"L",v+e,k-C,v+e,k,
"L",v+e,k,v,k]}else switch(G){case 1:E=x<=w?["M",x,k,x+(w-x)/2,k,"L",x+(w-x)/2,k,x+(w-x)/2,r,"L",x+(w-x)/2,r,w,r]:["M",x,k,x+e,k,"L",x+e,k,x+e,k+(r-k)/2,"L",x+e,k+(r-k)/2,w-e,k+(r-k)/2,"L",w-e,k+(r-k)/2,w-e,r,"L",w-e,r,w,r];break;case 2:E=0>v-x?0:v-x;E=["M",x,k,x+e+E,k,"L",x+e+E,k,x+e+E,r,"L",x+e+E,r,v,r];break;case 3:E=0>y-w?0:y-w;E=["M",y,k,y-e-E,k,"L",y-e-E,k,y-e-E,r,"L",y-e-E,r,w,r];break;case 4:E=y>v?["M",y,k,y-(y-v)/2,k,"L",y-(y-v)/2,k,y-(y-v)/2,r,"L",y-(y-v)/2,r,v,r]:["M",y,k,y-e,k,"L",y-e,
k,y-e,k+(r-k)/2,"L",y-e,k+(r-k)/2,v+e,k+(r-k)/2,"L",v+e,k+(r-k)/2,v+e,r,"L",v+e,r,v,r]}q||(q=f.connector&&f.connector.length?p.connector=f.connector.shift():p.connector=b.path(n),t?(I=S.animation({"stroke-opacity":B.alpha},t,l),z=0,H=t):z=B.alpha);q.show().animateWith(m,s,{path:E},t,l).attr({stroke:B.color,"stroke-opacity":z,"stroke-width":B.thickness,"stroke-dasharray":B.dashedStyle});I&&q.animate(I.delay(H||0));q={fromTaskId:B.fromTaskId,toTaskId:B.toTaskId,fromTaskConnectStart:B.fromTaskConnectStart,
toTaskConnectStart:B.toTaskConnectStart,link:B.link,sourceType:"connector"};k=p.tracker;k||(k=f.tracker&&f.tracker.length?p.tracker=f.tracker.shift():p.tracker=b.path(n).click(this.connectorClick(c)).hover(this.rollOverHandler(c),this.rollOutHandler(c)));k.attr({path:E,stroke:da,"stroke-width":K(B.thickness,10),ishot:!0,cursor:B.link?"pointer":""}).data("dataObj",h).data("eventArgs",q)}}else q&&q.hide();for(J=0;J<u;J++)this._removeDataVisuals(A.shift())},connectorClick:function(c){return function(a){M.call(this,
c,a,"ConnectorClick")}},rollOverHandler:function(c){return function(a){var d=this.data("dataObj"),b=d.config,g=c.components.tasksMap,e=g[b.fromTaskId],g=g[b.toTaskId],h={stroke:b.hoverColor,"stroke-dasharray":b.dashedStyle,"stroke-width":b.hoverThickness},d=d.graphics.connector;M.call(this,c,a,"ConnectorRollOver");b.showHoverEffect&&(sa([e,g],function(a){var b={fill:a.config.hoverFillColor,stroke:a.config.hoverBorderColor},c=a.graphics.slackElem,d=a.graphics.element,e=a.graphics.taskFill;a.config.percentComplete&&
!a.config.showAsGroup&&(c&&c.attr({fill:a.config.slackHoverColor}),e&&e.attr({fill:a.config.hoverFillColor,stroke:a.config.hoverBorderColor}),delete b.fill);d&&d.attr(b)}),d&&d.attr(h))}},rollOutHandler:function(c){return function(a){var d=this.data("dataObj"),b=d.config,g=c.components.tasksMap,e=g[b.fromTaskId],g=g[b.toTaskId],h={stroke:b.color,"stroke-width":b.thickness,"stroke-dasharray":b.dashedStyle},d=d.graphics.connector;M.call(this,c,a,"ConnectorRollOut");b.showHoverEffect&&(sa([e,g],function(a){var b=
{fill:a.config.color,stroke:a.config.borderColor,"stroke-width":a.config.borderThickness,"stroke-dasharray":a.config.dashedStyle},c=a.graphics.slackElem,d=a.graphics.element,e=a.graphics.taskFill;a.config.percentComplete&&!a.config.showAsGroup&&(c&&c.attr({fill:a.config.slackColor}),e&&e.attr({fill:a.config.color}),delete b.fill);d&&d.attr(b)}),d&&d.attr(h))}}},"Task",{isdashed:1,thickness:1}]);FusionCharts.get("component",["axis","ganttCommon",{_drawPlotLine:function(){var c=this.config,a=this.chart,
d=c.canvas,b=a.config,g=c.axisData.ganttPlotLineContainer,e=d.canvasBottom||b.canvasBottom,h=d.canvasLeft||b.canvasLeft,n=d.canvasRight||b.canvasRight,f=d.canvasTop||b.canvasTop,p=a.components.paper,l=c.gridArr,d=this.graphics.line||[],b=c.animateAxis,t,m=0,s,r,u=[],k,q;t=a.get("config","animationObj");k=t.animObj;q=t.dummyObj;a=t.transposeAnimDuration;t=t.animType;c={"stroke-dasharray":c.plotLineDashStyle,"stroke-width":c.plotLineThickness,stroke:c.plotLineColor};s=0;for(r=l.length;s<r;s+=1)void 0!==
l[s].x?u.push("M",l[s].x,f,"L",l[s].x,e):u.push("M",h,l[s].y,"L",n,l[s].y);d[m]?(g=d[m].graphics,a&&b?g.animateWith(q,k,{path:u},a,t):g.attr({path:u}),g.attr(c)):(g=p.path(u,g),g.attr(c),d[m]={},d[m].graphics=g);s=m+1;for(r=d.length;s<r;s+=1)d[s].graphics.attr({path:"M0,0"});this.graphics.line=d},_drawPlotBand:function(){},translateAxis:function(c,a){var d=this.config,b=d.axisData,g=d.isVertical,e=b.lastTranslate||(b.lastTranslate={x:0,y:0}),h=b.ganttPlotHoverBandContainer,n,f;n=void 0!==c?c-e.x:
0;f=void 0!==a?a-e.y:0;e.x=void 0!==c?c:e.x;e.y=void 0!==a?a:e.y;b.labelContainer&&b.labelContainer.translate(n,f);b.hotContainer&&b.hotContainer.translate(n,f);b.headerContainer&&b.headerContainer.translate(n,0);g?(b.ganttPlotLineContainer&&b.ganttPlotLineContainer.translate(0,f),h&&h.translate(0,f)):(b.ganttPlotLineContainer&&b.ganttPlotLineContainer.translate(n,0),h&&h.translate(n,0),this.setAxisConfig({animateAxis:!1}),d.drawTrendLines&&this._drawTrendLine(),this.setAxisConfig({animateAxis:!0}))},
resetTransletAxis:function(){var c=this.config.axisData,a;a={transform:"t0,0"};c.lastTranslate={x:0,y:0};c.labelContainer&&c.labelContainer.attr(a);c.headerContainer&&c.headerContainer.attr(a);c.ganttPlotLineContainer&&c.ganttPlotLineContainer.attr(a);c.ganttPlotHoverBandContainer&&c.ganttPlotHoverBandContainer.attr(a);c.hotContainer&&c.hotContainer.attr(a)},_drawProcessAndDataTableStyleParser:function(c){var a=this.config.axisData,d=this.chart,b=d.linkedItems.smartLabel,g=d.components.colorManager,
e=a.labels.style,h=c.elem||{},n=c.dimension,f=h._attrib||{},p=n.left,l=n.right,t=n.top,m=n.bottom,s,A,u,k,R,F,D,y,x,w,v,E,G;switch(c.type){case "category":case "datatable":case "process":s=r(f.font,e.fontFamily);A=r(f.fontsize,e.fontSize).replace(/px/i,"")+"px";k=r(Number(f.isitalic)?"italic":void 0,e.fontStyle);R=N(r(f.bgcolor?T(f.bgcolor):void 0,g.getColor("categoryBgColor")),q(f.bgalpha,100));v=r(f.fontcolor?T(f.fontcolor):void 0,e.color);E=q(f.isunderline,0)&&"underline"||"none";x=r(f.valign,
"center").toLowerCase();w=r(f.align,"middle").toLowerCase();y=h.drawLabel||"";u=r(Number(f.isbold)?"bold":void 0,e.fontWeight);G=h.link;break;case "header":s=r(f.headerfont,e.fontFamily),A=r(f.headerfontsize,e.fontSize).replace(/px/i,"")+"px",u=r(1===Number(f.headerisbold)?"bold":void 0===f.headerisbold?"bold":void 0,e.fontWeight),v=r(f.headerfontcolor?T(f.headerfontcolor):void 0,e.color),E=q(f.headerisunderline,0)&&"underline"||"none",k=r(f.headerisitalic?"italic":void 0,e.fontStyle),R=N(r(f.headerbgcolor?
T(f.headerbgcolor):void 0,g.getColor("categoryBgColor")),q(f.headerbgalpha,100)),x=r(f.headervalign,"center").toLowerCase(),w=r(f.headeralign,"middle").toLowerCase(),y=h.drawLabel||"",G=h.headerlink}switch(c.type){case "category":a.gridLinePath+="M"+p+","+t+"L"+p+","+m+"L"+l+","+m;u=r(1===Number(f.isbold)?"bold":void 0===f.isbold?"bold":void 0,e.fontWeight);break;case "datatable":case "process":a.gridLinePath+="M"+p+","+m+"L"+l+","+m+"L"+l+","+t;break;case "header":a.gridLineHeaderPath+="M"+p+","+
m+"L"+l+","+m+"L"+l+","+t}g=r(h._attrib.hoverbandcolor,a.hoverColor);f=q(h._attrib.hoverbandalpha,a.hoverAlpha);"left"===w?(F=p+2,w="start"):"right"===w?(F=p+(l-p)-2,w="end"):(w="middle",F=p+(l-p)/2);"top"===x?D=t-2:"bottom"===x?D=t+(m-t)-2:(x="center",D=t+(m-t)/2);e={fontFamily:s,fontSize:A,fontWeight:u,fontStyle:k,color:v,textDecoration:E};s=V(e);s=Number(s.replace(/px/i,""));s=m-t>s?m-t:s;b.useEllipsesOnOverflow(d.config.useEllipsesWhenOverflow);b.setStyle(e);d=b.getSmartText(y,l-p,s);e={posAttr:{x:F,
y:D},textAttr:{text:d.text,"text-anchor":w,"vertical-align":x,cursor:G?"pointer":"default"},css:e,rectAttr:{x:p,y:t,width:p<l?l-p:0,height:t<m?m-t:0},rectFill:{fill:R,"stroke-width":0,cursor:G?"pointer":"default"},eventArgs:{isHeader:"header"===c.type,label:y,vAlign:x,align:w,link:G,id:h.id},tooltext:d.oriText};"datatable"===c.type||"process"===c.type||"category"===c.type?(l=N(g,f),p=q(h._attrib.showhoverband,a.useHover),a=q(h._attrib.showganttpanehoverband,a.usePlotHover,p),e.dataArgs={rollOverColor:l,
useHover:p,usePlotHover:a,dimension:n,hoverEle:h,type:c.type,pos:c.pos,axis:this,groupId:c.elemIndex}):e.dataArgs={rollOverColor:void 0,useHover:0,usePlotHover:0,dimension:n,hoverEle:h,type:c.type,pos:c.pos,axis:this,groupId:c.elemIndex};return e},_drawProcessAndDataTableElement:function(c){var a=this,d=a.config,b=d.axisData,g=a.chart,e=g.components,h=a.components.categoryElement||[],n=b.hoverElemsArr||(b.hoverElemsArr=[]),f=e.paper,e=c.elemIndex,p=b.labelHoverEventName,d=d.animateAxis,l,t,m,s,r,
u,k=g.config.showtooltip,q,F=function(a){M.call(this,g,a,p.click)},D=function(b){ea=clearTimeout(ea);if(!U||U.removed)U=null;U&&a._gridOutHandler.call(U);a._gridHoverHandler.call(this);M.call(this,g,b,p.rollOver)},y=function(b){U=this;ea=clearTimeout(ea);ea=setTimeout(function(){a._gridOutHandler.call(U)},500);M.call(U,g,b,p.rollOut)};l=g.get("config","animationObj");r=l.animObj;u=l.dummyObj;t=l.transposeAnimDuration;q=l.animType;"header"===c.type?(l=b.headerBackContainer,m=b.headerTextContainer):
(l=b.labelBackContainer,m=b.labelTextContainer);b=a._drawProcessAndDataTableStyleParser(c);h[e]?(f=h[e].graphics.label,s=h[e].graphics.rect,l.appendChild(s),m.appendChild(f),t&&d?(s.animateWith(u,r,b.rectAttr,t,q),f.animateWith(u,r,b.posAttr,t,q)):(s.attr(b.rectAttr),f.attr(b.posAttr)),s.attr(b.rectFill),f.attr(b.textAttr).css(b.css)):(s=f.rect(b.rectAttr,l),f=f.text(b.posAttr,m),f.attr(b.textAttr).css(b.css),s.attr(b.rectFill),h[e]={},h[e].graphics={},h[e].config={},h[e].graphics.label=f,h[e].graphics.rect=
s,s.hover(D,y).click(F),f.hover(D,y).click(F));"header"!==c.type&&(n[c.pos]||(n[c.pos]=[]),n[c.pos].push({bgElem:s,bgColor:b.rectFill.fill}));s.data("dataObj",c.elem).data("eventArgs",b.eventArgs).data("data",b.dataArgs);f.data("dataObj",c.elem).data("eventArgs",b.eventArgs).data("data",b.dataArgs).tooltip(b.tooltext).trackTooltip(k?!0:!1);a.components.categoryElement=h},_drawGridLine:function(){var c=this.config,a=c.axisData,d=this.chart,b=d.components.paper,g=this.graphics.gridLine||[],e=c.animateAxis,
h,n,f=0,p=0,l=2,t,m,s;h=d.get("config","animationObj");m=h.animObj;s=h.dummyObj;d=h.transposeAnimDuration;h=h.animType;for(c={"stroke-dasharray":c.lineDashStyle,"stroke-width":c.lineThickness,stroke:c.lineColor};p<l;p+=1){if(0===p)t=a.gridLinePath,n=a.labelLineContainer;else if(t=a.gridLineHeaderPath,n=a.headerLineContainer,!t)continue;g[f]?(n=g[f].graphics,d&&e?n.animateWith(s,m,{path:t},d,h):n.attr({path:t}),n.attr(c)):(n=b.path(t,n),n.attr(c),g[f]={},g[f].graphics=n);f+=1}p=f;for(l=g.length;p<
l;p+=1)g[p].graphics.attr({path:"M0,0"});this.graphics.gridLine=g},_gridHoverHandler:function(){var c=this.data("data"),a=c.type,d=c.dimension,b=c.axis,g=b.chart,e=g.config,h=g.components.paper,n=b.config.axisData,g=n.hoverElemsArr||[],n=n.ganttPlotHoverBandContainer,b=b.graphics.plotHoverElement||(b.graphics.plotHoverElement=[]),a="category"===a?{x:d.left,y:e.canvasTop,width:d.left<d.right?d.right-d.left:0,height:e.height,fill:c.rollOverColor,"stroke-width":0}:{y:d.top,x:e.canvasLeft,height:d.top<
d.bottom?d.bottom-d.top:0,width:e.width,fill:c.rollOverColor,"stroke-width":0};c.usePlotHover&&(b[0]?b[0].attr(a).show():b[0]=h.rect(a,n));if(c.useHover&&g[c.pos])for(a=0,d=g[c.pos].length;a<d;a+=1)g[c.pos][a].bgElem.attr({fill:c.rollOverColor})},_gridOutHandler:function(){var c=this.data("data"),a=c.axis,d=a.config.axisData.hoverElemsArr||[],a=a.graphics.plotHoverElement||[],b,g;c.usePlotHover&&a[0]&&a[0].hide();if(c.useHover&&d[c.pos])for(a=0,b=d[c.pos].length;a<b;a+=1)g=d[c.pos][a],g.bgElem.attr({fill:g.bgColor})},
_disposeExtraProcessAndDataTableElement:function(c){var a=this.components.categoryElement||[],d;for(d=a.length;c<d;c+=1)a[c].graphics.label.attr({text:""}),a[c].graphics.rect.attr({x:0,y:0,width:0,heigth:0})}},"cartesian"]);FusionCharts.get("component",["axis","time",{configure:function(){var c=this.config,a=c.axisData,d=c.rawAttr,b=this.chart,g=b.jsonData.chart,b=b.components.colorManager;FusionCharts.register("component",["axis","cartesian"]).prototype.configure.call(this);c.plotLineColor=c.lineColor=
N(r(g.ganttlinecolor,b.getColor("gridColor")),q(g.ganttlinealpha,100));c.plotLineThickness=c.lineThickness=q(g.ganttlinethickness,1);c.plotLineDashStyle=c.lineDashStyle=q(g.ganttlinedashed,0)?ha(q(g.ganttlinedashlen,1),g.ganttlinedashgap,c.lineThickness):"none";a.hoverColor=r(g.categoryhoverbandcolor,g.hoverbandcolor,b.getColor("gridColor"));a.hoverAlpha=q(g.categoryhoverbandalpha,g.hoverbandalpha,30);a.useHover=q(g.showcategoryhoverband,g.showhoverband,g.showhovereffect,1);a.usePlotHover=q(g.showganttpaneverticalhoverband);
a.trendlinesDashLen=q(d.trendlinesDashLen,3);a.trendlinesDashGap=q(d.trendlinesDashGap,3);a.gridLineHeaderPath="";a.gridLinePath=""},setCategory:function(c){var a;a=this.chart.get("components").numberFormatter;var d=this.config,b=d.axisData,g=d.axisRange,e=d.startPad||0,h=d.endPad||0,n,f,d=Infinity,p=-Infinity,l,t;b.categories={};if(c){b.hasCategory=1;b=b.categories.category=W({},c);this._extractAttribToEnd(b,{});for(l in b)if(b.hasOwnProperty(l)&&"_attrib"!==l)for(t=0,c=b[l].category.length;t<c;t+=
1)n=b[l].category[t],f=a.getDateValue(n.start).ms,n=a.getDateValue(n.end).ms,isNaN(f)&&(f=void 0),f>p&&(p=f),f<=d&&(d=f),isNaN(n)&&(n=void 0),n>p&&(p=n),n<=d&&(d=n);a=p+h;g.min=Number($(d-e,10));g.max=Number($(a,10));g.tickInterval=Number($(1,10))}else b.hasCategory=0},_drawComponents:function(){var c=this.config;this._drawCategories();c.drawPlotlines&&this._drawPlotLine();c.drawPlotBand&&this._drawPlotBand();c.drawTrendLines&&this._drawTrendLine()},_drawCategories:function(){var c=this.config,a=
c.axisData,d=(a.axisDimention||{}).y,b=a.totalHeight||0,g=this.chart,e=g.components,h=g.config,n=h.viewPortConfig,f=e.paper,e=e.numberFormatter,p=c.canvas,l=c.gridArr||(c.gridArr=[]),l=p.canvasLeft||h.canvasLeft,t=p.canvasTop||h.canvasTop,m=p.canvasHeight||h.canvasHeight,s=p.canvasWidth||h.canvasWidth,h=a.lastTranslate||(a.lastTranslate={x:0,y:0}),r=g.graphics,q=r.axisBottomGroup,k,p=0,z,F,D,y,x;F=g.get("config","animationObj");g=F.animObj;D=F.dummyObj;y=F.transposeAnimDuration;F=F.animType;x=ia(b,
t-(a.maxTopSpaceAvailable||0));x=0<x?x:0;r.ganttPlotHoverBandContainerParent=r.ganttPlotHoverBandContainerParent||f.group("guntt-plot-band-container-parent",q);a.ganttPlotHoverBandContainer?a.ganttPlotHoverBandContainer.animateWith(D,g,{"clip-rect":l+","+t+","+s+","+m},y,F):(a.ganttPlotHoverBandContainer=f.group("guntt-plot-band-container",r.ganttPlotHoverBandContainerParent),a.ganttPlotHoverBandContainer.attr({"clip-rect":l+","+t+","+s+","+m}));a.ganttPlotLineContainer?a.ganttPlotLineContainer.animateWith(D,
g,{"clip-rect":l+","+t+","+s+","+m},y,F):(a.ganttPlotLineContainer=f.group("guntt-plot-line-container",q),a.ganttPlotLineContainer.attr({"clip-rect":l+","+t+","+s+","+m}));a.labelContainer?a.labelContainer.animateWith(D,g,{"clip-rect":l+","+(t-x)+","+s+","+x},y,F):(a.labelContainer=f.group("guntt-label-container",q),a.labelContainer.attr({"clip-rect":l+","+(t-x)+","+s+","+x}));a.labelBackContainer||(a.labelBackContainer=f.group("guntt-label-back-container",a.labelContainer));a.labelLineContainer||
(a.labelLineContainer=f.group("guntt-label-line-container",a.labelContainer));a.labelTextContainer||(a.labelTextContainer=f.group("guntt-label-text-container",a.labelContainer));a.gridLinePath="";a.gridLineHeaderPath="";a.hoverElemsArr=[];a.labelHoverEventName={click:"CategoryClick",rollOver:"CategoryRollOver",rollOut:"CategoryRollOut"};if(a.hasCategory){f=a.categories.category;for(k in f)if(f.hasOwnProperty(k)&&"_attrib"!==k)for(z in t=f[k].category,m=void 0,l=c.gridArr=[],t)s=e.getDateValue(t[z].start).ms,
r=e.getDateValue(t[z].end).ms,!t.hasOwnProperty(z)||"_attrib"===z||isNaN(s)||isNaN(r)||(s={elem:t[z],elemIndex:p,pos:p,dimension:{left:m||this.getPixel(s),right:this.getPixel(r),top:d-b+f[k]._attrib.topPos,bottom:d-b+f[k]._attrib.bottomPos},type:"category",isHeader:!1},m=s.dimension.right,this._drawProcessAndDataTableElement(s),p+=1,l.push({x:s.dimension.left}));0<n.x?h.x=-(n.x*n.scaleX):a.lastTranslate={x:0,y:0}}this._drawGridLine();this._disposeExtraProcessAndDataTableElement(p)},placeAxis:function(c){var a=
this.config,d=this.chart,b=d.config,g=d.get("components").numberFormatter,e=d.linkedItems.smartLabel,h=a.axisData,n=h.labels.style,f=0,p={top:0,bottom:0},l=0,t,m,s,q,u,k,z,F=h.trend.trendStyle,D=a.vTrendLines,y=h.useEllipsesWhenOverflow,x=0,w=0;e.useEllipsesOnOverflow(b.useEllipsesWhenOverflow);e.setStyle({fontSize:n.fontSize,fontFamily:n.fontFamily,lineHeight:n.lineHeight,fontWeight:n.fontWeight});h.maxTopSpaceAvailable=b.canvasTop;if(h.hasCategory)for(s in t=h.categories.category,t)if(t.hasOwnProperty(s)&&
"_attrib"!==s){f=0;m=t[s].category;for(u in m)m.hasOwnProperty(u)&&"_attrib"!==u&&(q=m[u],q.drawLabel=Q(q.label||q.name),k=q._attrib,k={fontFamily:r(k.fontfamily,n.fontFamily).replace(/px/i,"")+"px",fontSize:r(k.fontsize,n.fontSize),fontWeight:r(1===Number(k.isbold)?"bold":void 0===k.isbold?"bold":void 0,n.fontWeight),fontStyle:r(k.isitalic?"italic":void 0,n.fontStyle)},V(k),e.setStyle(k),q=e.getOriSize(q.drawLabel),q.height>f&&(z=q,f=q.height));t[s]._attrib.topPos=l;l+=z.height+8;t[s]._attrib.bottomPos=
l}n=c-l;if(a.drawTrendLines&&a.drawTrendLabels&&D&&a.isActive)for(e.setStyle({fontSize:F.fontSize,fontFamily:F.fontFamily,lineHeight:F.lineHeight,fontWeight:F.fontWeight}),h.trendBottomPadding=-1,u=0,a=D.length;u<a;u+=1)for(s=0,f=D[u].line.length;s<f;s+=1)t=D[u].line[s],q=t.origText||t.displayvalue||t.endvalue||t.startvalue||"",q=Q(q),t.startvalue=t.start&&g.getDateValue(t.start).ms,t.endvalue=t.end&&g.getDateValue(t.end).ms,t.origText=q,q=e.getSmartText(q,d.canvasWidth,F.lineHeight,y),m=q.height+
2,0>n-m?t.displayvalue="":(t.displayvalue=q.text,x=x<q.height?q.height:x),q.tooltext?t.valueToolText=q.tooltext:delete t.valueToolText;h.totalHeight=l;0<x&&(w+=x+ua(h.trendBottomPadding||0));l=l>c?c:l;p.top+=l;p.bottom+=w;b.categorySpaceUsed=l;return p}},"ganttCommon"]);FusionCharts.get("component",["axis","process",{configure:function(){var c=this.config,a=c.axisData,d=this.chart,b=d.jsonData.chart,d=d.components.colorManager;FusionCharts.register("component",["axis","cartesian"]).prototype.configure.call(this);
c.lineColor=N(r(b.gridbordercolor,d.getColor("gridColor")),q(b.gridborderalpha,100));c.lineThickness=q(b.gridborderthickness,1);c.lineDashStyle=q(b.gridborderdashed,0)?ha(q(b.gridborderdashlen,1),b.gridborderdashgap,c.lineThickness):"none";c.plotLineColor=N(r(b.ganttlinecolor,d.getColor("gridColor")),q(b.ganttlinealpha,100));c.plotLineThickness=q(b.ganttlinethickness,1);c.plotLineDashStyle=q(b.ganttlinedashed,0)?ha(q(b.ganttlinedashlen,1),b.ganttlinedashgap,c.lineThickness):"none";c.gridResizeBarColor=
N(r(b.gridresizebarcolor,d.getColor("gridResizeBarColor")),q(b.gridresizebaralpha,100));c.gridResizeBarThickness=q(b.gridresizebarthickness,1);c.forceRowHeight=q(b.forcerowheight,0);c.rowHeight=q(b.rowheight,0);a.hoverColor=r(b.processhoverbandcolor,b.hoverbandcolor,d.getColor("gridColor"));a.hoverAlpha=q(b.processhoverbandalpha,b.hoverbandalpha,30);a.useHover=q(b.showprocesshoverband,b.showhoverband,b.showhovereffect,1);a.usePlotHover=q(b.showganttpanehorizontalhoverband);a.showFullDataTable=q(b.showfulldatatable,
1);a.useVerticalScrolling=q(b.useverticalscrolling,1);a.gridLineHeaderPath="";a.gridLinePath=""},setDataTable:function(c){var a=this.config.axisData;a.dataTables={};a.dataTables.dataTable={};c?(a.hasDataTables=1,W(a.dataTables.dataTable,c),c=a.dataTables.dataTable,this._extractAttribToEnd(c,{})):a.hasDataTables=0},setProcess:function(c){var a;a=this.config;var d=a.axisData,b=a.axisRange,g=a.startPad||0;a=a.endPad||0;var e,h,n;d.processes={};if(c){d.hasProcess=1;e=d.processes.process=W({},c);this._extractAttribToEnd(e,
{});c=e.process.length;n=d.processes.processMap={};d.processes.processHeightMap={};for(d=0;d<c;d+=1)h=e.process[d],h.id&&(n[h.id.toLowerCase()]={catObj:h,index:d});a=c-1+a;b.min=Number($(-g,10));b.max=Number($(a,10));b.tickInterval=Number($(1,10))}else d.hasProcess=0},getProcessPositionById:function(c){var a=this.config.axisData;c=a.processes&&a.processes.processMap[c];a=a.processes.processHeightMap;return c?a[c.index]:!1},getProcessPositionByIndex:function(c){var a=this.config.axisData.processes.processHeightMap;
return a[c]?a[c]:!1},setProcessHeight:function(){var c=this.config,a=c.axisData,d=this.chart.config.canvasHeight,b=a.processes.process.process,g=a.processes.processHeightMap,e=a.processMaxHeight,h=0,n=c.forceRowHeight,c=c.rowHeight;if(e*b.length<d||0===a.useVerticalScrolling)e=d/b.length;0===n?c&&c>e&&(e=c):e=c||e;n=0;for(d=b.length;n<d;n++)a=q(b[n].height,e),g[n]={top:h,bottom:h+a,height:a},h+=a;return h},_drawComponents:function(){var c=this.config;this._drawProcessAndDataTable();c.drawPlotlines&&
this._drawPlotLine();c.drawPlotBand&&this._drawPlotBand();this._drawVerticalLineAndTracker();this._drawGridLine()},_drawProcessAndDataTable:function(){var c=this.config,a=c.axisData,d=this.chart,b=(a.axisDimention||{}).x,g=a.totalWidth||0,e=c.gridArr||(c.gridArr=[]),h=c.canvas,n=d.config,e=d.components.paper,f=h.canvasTop||n.canvasTop,p=h.canvasLeft||n.canvasLeft,l=h.canvasHeight||n.canvasHeight,t=h.canvasWidth||n.canvasWidth,m=d.graphics,q=m.axisBottomGroup,h=a.totalVisiblelWidth,r,u=0,k,z,F,D;z=
d.get("config","animationObj");d=z.animObj;F=z.dummyObj;D=z.transposeAnimDuration;z=z.animType;m.ganttPlotHoverBandContainerParent=m.ganttPlotHoverBandContainerParent||e.group("guntt-plot-band-container-parent",q);a.ganttPlotHoverBandContainer?a.ganttPlotHoverBandContainer.animateWith(F,d,{"clip-rect":p+","+f+","+t+","+l},D,z):(a.ganttPlotHoverBandContainer=e.group("guntt-plot-band-container",m.ganttPlotHoverBandContainerParent),a.ganttPlotHoverBandContainer.attr({"clip-rect":p+","+f+","+t+","+l}));
a.ganttPlotLineContainer?a.ganttPlotLineContainer.animateWith(F,d,{"clip-rect":p+","+f+","+t+","+l},D,z):(a.ganttPlotLineContainer=e.group("guntt-plot-line-container",q),a.ganttPlotLineContainer.attr({"clip-rect":p+","+f+","+t+","+l}));a.headerContainer?a.headerContainer.animateWith(F,d,{"clip-rect":p-a.totalVisiblelWidth+","+(f-n.categorySpaceUsed)+","+a.totalVisiblelWidth+","+n.categorySpaceUsed},D,z):(a.headerContainer=e.group("guntt-header-container",q),a.headerContainer.attr({"clip-rect":p-a.totalVisiblelWidth+
","+(f-n.categorySpaceUsed)+","+a.totalVisiblelWidth+","+n.categorySpaceUsed}));a.headerBackContainer||(a.headerBackContainer=e.group("guntt-header-back-container",a.headerContainer));a.headerLineContainer||(a.headerLineContainer=e.group("guntt-header-line-container",a.headerContainer));a.headerTextContainer||(a.headerTextContainer=e.group("guntt-header-text-container",a.headerContainer));a.labelContainer?a.labelContainer.animateWith(F,d,{"clip-rect":p-a.totalVisiblelWidth+","+f+","+a.totalVisiblelWidth+
","+l},D,z):(a.labelContainer=e.group("guntt-label-container",q),a.labelContainer.attr({"clip-rect":p-a.totalVisiblelWidth+","+f+","+a.totalVisiblelWidth+","+l}));a.labelBackContainer||(a.labelBackContainer=e.group("guntt-label-back-container",a.labelContainer));a.labelLineContainer||(a.labelLineContainer=e.group("guntt-label-line-container",a.labelContainer));a.labelTextContainer||(a.labelTextContainer=e.group("guntt-label-text-container",a.labelContainer));a.hotContainer?a.hotContainer.animateWith(F,
d,{"clip-rect":p-a.totalVisiblelWidth+","+(f-n.categorySpaceUsed)+","+a.totalVisiblelWidth+","+(l+n.categorySpaceUsed)},D,z):(a.hotContainer=e.group("guntt-hot-container",a.axisLabelGroup),a.hotContainer.attr({"clip-rect":p-a.totalVisiblelWidth+","+(f-n.categorySpaceUsed)+","+a.totalVisiblelWidth+","+(l+n.categorySpaceUsed)}));a.gridLinePath="";a.gridLineHeaderPath="";a.hoverElemsArr=[];a.labelHoverEventName={click:"ProcessClick",rollOver:"ProcessRollOver",rollOut:"ProcessRollOut"};if(a.hasProcess)for(process=
a.processes.process.process,p={elem:a.processes.process,elemIndex:u,dimension:{left:b-g+process._attrib.leftPos,right:b-g+process._attrib.rightPos,top:f-n.categorySpaceUsed,bottom:f},type:"header"},this._drawProcessAndDataTableElement(p),u+=1,e=c.gridArr=[],r=0,l=process.length;r<l;r++)c=this.getProcessPositionByIndex(r),p={elem:process[r],elemIndex:u,pos:r,dimension:{left:b-g+process._attrib.leftPos,right:b-g+process._attrib.rightPos,top:f+c.top,bottom:f+c.bottom},type:"process"},this._drawProcessAndDataTableElement(p),
u+=1,e.push({y:p.dimension.bottom});if(a.hasDataTables){e=a.dataTables.dataTable.datacolumn;for(r in e)if(e.hasOwnProperty(r)&&"_attrib"!==r)for(k in p={elem:e[r],elemIndex:u,pos:r,dimension:{left:b-g+e[r]._attrib.leftPos,right:b-g+e[r]._attrib.rightPos,top:f-n.categorySpaceUsed,bottom:f},type:"header"},this._drawProcessAndDataTableElement(p),u+=1,l=e[r].text,l)l[k]._attrib&&process[k]&&process[k]._attrib&&(l[k]._attrib.hoverbandcolor=process[k]._attrib.hoverbandcolor,l[k]._attrib.hoverbandalpha=
process[k]._attrib.hoverbandalpha,l[k]._attrib.showhoverband=process[k]._attrib.showhoverband),l.hasOwnProperty(k)&&"_attrib"!==k&&(c=this.getProcessPositionByIndex(k),p={elem:l[k],elemIndex:u,pos:k,dimension:{left:b-g+e[r]._attrib.leftPos,right:b-g+e[r]._attrib.rightPos,top:f+c.top,bottom:f+c.bottom},type:"datatable"},this._drawProcessAndDataTableElement(p),u+=1);a.drawFromProcessVlineDrag?a.drawFromProcessVlineDrag=!1:g>h?this.translateAxis(g-h,void 0):(this.resetTransletAxis(),this.resetTransletAxis())}this._drawGridLine();
this._disposeExtraProcessAndDataTableElement(u)},_drawVerticalLineAndTracker:function(){var c=this,a=c.config,d=a.axisData,b=c.chart,g=b.config,e=(d.axisDimention||{}).x,h=d.totalWidth||0,n=a.canvas.canvasTop||g.canvasTop,f=b.components.paper,p=c.components.processVline||(c.components.processVline=[]),l=d.processVlineArr,r=d.hotContainer,m=0,q,A,u,k,z,F,D=function(){var a=this.data("drag-options"),c=a.vHoverLine;a.origX=a.lastX||(a.lastX=0);c.show();b.trackerClicked=!0;a.draged=!1},y=function(a){var b=
this.data("drag-options"),c=b.vHoverLine,d=b.vLineSetting,e=d.xPos+a,g=d.leftLimit,f=d.rightLimit;e<g&&(a=g-d.xPos);e>f&&(a=f-d.xPos);d={transform:"t"+(b.origX+a)+za+0};this.attr(d);c.attr(d);b.draged=!0;b.lastX=a},x=function(){var a=this.data("drag-options"),e=a.vLineSetting,g=a.vHoverLine,f=a.vLineIndex;b.trackerClicked=!1;g.hide();a.draged&&(e.left.rightPos+=a.lastX||0,e.right.leftPos+=a.lastX||0,e.xPos+=a.lastX||0,l[f-1]&&(l[f-1].rightLimit+=a.lastX||0),l[f+1]&&(l[f+1].leftLimit+=a.lastX||0),
d.drawFromProcessVlineDrag=!0,c._drawProcessAndDataTable(),c._drawVerticalLineAndTracker(),a={transform:"t0,0"},this.attr(a),g.attr(a))},a={stroke:a.gridResizeBarColor,"stroke-width":a.gridResizeBarThickness,visibility:"hidden"};z={stroke:da,ishot:!0,"stroke-width":30};k=n-g.categorySpaceUsed;g=0;for(q=l.length;g<q;g+=1)A="process"===l[g].type?d.processes.process.process:d.dataTables.dataTable.datacolumn[l[g].ind],A=e-h+A._attrib.rightPos,A=["M",A,k,"L",A,n+d.processTotalHeight],p[m]?(F=p[m].graphics.vHoverLine,
F.attr({path:A}).attr(a),u=p[m].graphics.hotElement,u.attr({path:A}).attr(z)):(F=f.path(A,r),F.attr(a),u=f.path(A,r),u.attr(z),p[m]={},p[m].graphics={},p[m].config={},p[m].graphics.vHoverLine=F,p[m].graphics.hotElement=u),u.css("cursor",S.svg&&"ew-resize"||"e-resize").drag(y,D,x).data("drag-options",{vHoverLine:p[m].graphics.vHoverLine,vLineSetting:l[g],vLineIndex:g}),m+=1;g=m;for(q=p.length;g<q;g+=1)p[g].graphics.vHoverLine.attr({path:["M",0,0]}),p[g].graphics.hotElement.attr({path:["M",0,0]})},
manageProcessScroll:function(c){var a=this.config.axisData,d=a.totalWidth||0,a=a.totalVisiblelWidth;d>a&&this.translateAxis((d-a)*(1-c),void 0)},placeAxis:function(c){var a=this.chart,d=a.linkedItems.smartLabel,b=this.config.axisData,g=b.labels.style,e=0,h=0,n={left:0,right:0},f=0,p=!1,l=0,q=0,m,s,A,u,k,z=0;d.useEllipsesOnOverflow(a.config.useEllipsesWhenOverflow);d.setStyle({fontSize:g.fontSize,fontFamily:g.fontFamily,lineHeight:g.lineHeight,fontWeight:g.fontWeight});0===b.showFullDataTable&&(z=
c/((b.hasDataTables&&b.dataTables&&b.dataTables.dataTable&&b.dataTables.dataTable.datacolumn?b.dataTables.dataTable.datacolumn.length:0)+1));if(b.hasProcess){process=b.processes.process.process;m=b.processes.process;"right"===m.positioningrid&&(p=!0);m.headertext&&(m.drawLabel=Q(m.headertext),a=m._attrib,a={fontFamily:r(a.headerfontfamily,g.fontFamily),fontSize:r(a.headerfontsize,g.fontSize).replace(/px/i,"")+"px",fontWeight:r(1===Number(a.headerisbold)?"bold":void 0===a.headerisbold?"bold":void 0,
g.fontWeight),fontStyle:r(a.headerisitalic?"italic":void 0,g.fontStyle)},a.lineHeight=V(a),d.setStyle(a),a=d.getOriSize(m.drawLabel),a.width>h&&(e=a,h=a.width));m=0;for(s=process.length;m<s;m++)A=process[m],a=A._attrib,A.drawLabel=Q(A.label||A.name),a={fontFamily:r(a.fontfamily,g.fontFamily),fontSize:r(a.fontsize,g.fontSize).replace(/px/i,"")+"px",fontWeight:r(a.isbold?"bold":void 0,g.fontWeight),fontStyle:r(a.isitalic?"italic":void 0,g.fontStyle)},a.lineHeight=V(a),d.setStyle(a),a=d.getOriSize(A.drawLabel),
a.width>h&&(e=a,h=a.width),a.height>q&&(q=a.height);b.processMaxHeight=q+8;process._attrib.leftPos=f;p?l=z||e.width+4:f+=z||e.width+4;process._attrib.rightPos=f}if(b.hasDataTables)for(m in e=b.dataTables.dataTable.datacolumn,e)if(e.hasOwnProperty(m)&&"_attrib"!==m){q=e[m];h=0;q.headertext&&(a=q._attrib,q.drawLabel=Q(q.headertext),s={fontFamily:r(a.headerfontfamily,g.fontFamily),fontSize:r(a.headerfontsize,g.fontSize).replace(/px/i,"")+"px",fontWeight:r(1===Number(a.headerisbold)?"bold":void 0===a.headerisbold?
"bold":void 0,g.fontWeight),fontStyle:r(a.headerisitalic?"italic":void 0,g.fontStyle)},s.lineHeight=V(s),d.setStyle(s),a=d.getOriSize(q.drawLabel),a.width>h&&(k=a,h=a.width));q=q.text;for(u in q)q.hasOwnProperty(u)&&"_attrib"!==u&&(a=q[u],a.drawLabel=Q(a.label||a.name),s=a._attrib,s={fontFamily:r(s.fontfamily,g.fontFamily),fontSize:r(s.fontsize,g.fontSize).replace(/px/i,"")+"px",fontWeight:r(s.isbold?"bold":void 0,g.fontWeight),fontStyle:r(s.isitalic?"italic":void 0,g.fontStyle)},s.lineHeight=V(s),
d.setStyle(s),a=d.getOriSize(a.drawLabel),a.width>h&&(k=a,h=a.width));e[m]._attrib.leftPos=f;f+=z||k.width+4;e[m]._attrib.rightPos=f}b.hasProcess&&p&&(process._attrib.leftPos+=f,process._attrib.rightPos+=f+l,f+=l);b.totalWidth=f;this.adjustWidth();f=b.totalWidth>c?c:b.totalWidth;b.totalVisiblelWidth=f;n.left+=f;return n},adjustWidth:function(){var c=this.config.axisData,a=c.totalWidth,d=a,b=0,g=!1,e,h,n,f,p,l;e=c.processVlineArr=[];d-=20*(c.hasDataTables&&c.dataTables&&c.dataTables.dataTable&&c.dataTables.dataTable.datacolumn?
c.dataTables.dataTable.datacolumn.length+1:1);n=function(b){d+=20;b=b.match(/%/g)?q(a*Number(b.replace(/%/g,"")/100),0):q(b,0);20>d?b=20:b>d&&(b=d);d-=b;return b};c.hasProcess&&(process=c.processes.process.process,f=c.processes.process,"right"===f.positioningrid&&(g=!0),h=process._attrib,p=b,b+=n(h.width||""+(h.rightPos-h.leftPos)),h.leftPos=p,h.rightPos=b,g?b=0:e.push({type:"process",ind:0,xPos:h.rightPos,left:h,leftLimit:h.leftPos+20}));if(c.hasDataTables)for(l in f=c.dataTables.dataTable.datacolumn,
f)if(f.hasOwnProperty(l)&&"_attrib"!==l){h=f[l];h=h._attrib;p=b;b+=n(h.width||""+(h.rightPos-h.leftPos));h.leftPos=p;h.rightPos=b;if(p=e[e.length-1])p.right=h,p.rightLimit=h.rightPos-20;e.push({type:"dataTable",ind:l,xPos:h.rightPos,left:h,leftLimit:h.leftPos+20})}if(c.hasProcess)if(g){if(h=process._attrib,h.rightPos=b+(h.rightPos-h.leftPos),h.leftPos=b,b+=h.rightPos-h.leftPos,p=e[e.length-1])p.right=h,p.rightLimit=h.rightPos-20}else e.pop();c.totalWidth=b}},"ganttCommon"])}]);
