UNPKG

ngx-beautiful-charts

Version:
2 lines 83.8 kB
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@angular/core"),require("@angular/platform-browser"),require("@angular/common")):"function"==typeof define&&define.amd?define("ngx-beautiful-charts",["exports","@angular/core","@angular/platform-browser","@angular/common"],e):e((t=t||self)["ngx-beautiful-charts"]={},t.ng.core,t.ng.platformBrowser,t.ng.common)}(this,function(t,e,i,n){"use strict";function r(t){var e="function"==typeof Symbol&&t[Symbol.iterator],i=0;return e?e.call(t):{next:function(){return t&&i>=t.length&&(t=void 0),{value:t&&t[i++],done:!t}}}}function a(t,e){var i="function"==typeof Symbol&&t[Symbol.iterator];if(!i)return t;var n,r,a=i.call(t),s=[];try{for(;(void 0===e||e-- >0)&&!(n=a.next()).done;)s.push(n.value)}catch(h){r={error:h}}finally{try{n&&!n.done&&(i=a["return"])&&i.call(a)}finally{if(r)throw r.error}}return s}function s(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(a(arguments[e]));return t}var h={colorful:["#EAC435","#345995","#03CEA4","#FF6B6B","#CA1551","#3A3335","#FFE19C","#C1FFF2","#511730","#8789C0"],cool:["#5680E9","#84CEEB","#5AB9EA","#C1C8E4","#8860D0","#7555E8","#69C6EA","#5971EA","#AAACE2","#C060D1"],warm:["#BA9434","#FFE899","#FFAC47","#FF813D","#E55730","#BA9948","#A38B3C","#A36E2E","#A35327","#92381F"]},o=function(){function t(){this.componentCounter=0,this.componentCounter=0}return t.prototype.addNewComponent=function(){return++this.componentCounter},t.prototype.getCurrentComponentCounter=function(){return this.componentCounter},t.decorators=[{type:e.Injectable,args:[{providedIn:"root"}]}],t.ctorParameters=function(){return[]},t.ngInjectableDef=e.ɵɵdefineInjectable({factory:function(){return new t},token:t,providedIn:"root"}),t}(),l=function(){function t(){this.width=0,this.height=0,this.minX=0,this.minY=0,this.maxX=0,this.maxY=0,this.xPadding=0,this.yPadding=0,this.componentID=0,this.rectWidth=0,this.rectHeight=0}return t.prototype.computeRectDimensions=function(){this.rectHeight=this.height-4*this.yPadding,this.rectWidth=this.width-2*this.xPadding},t.prototype.transformX=function(t){return this.rectWidth*t/(this.maxX-this.minX)},t.prototype.transformY=function(t){return this.rectHeight*t/(this.maxY-this.minY)},t.prototype.setValues=function(t){var e=t.componentID,i=t.width,n=t.height,r=t.minX,a=t.minY,s=t.maxX,h=t.maxY,o=t.xPadding,l=t.yPadding;this.componentID=e,this.width=i,this.height=n,this.minX=r,this.minY=a,this.maxX=s,this.maxY=h,this.xPadding=o,this.yPadding=l,this.computeRectDimensions()},t.prototype.printAll=function(){console.log("line-graph-service"),console.log("component ID: "+this.componentID),console.log("width: "+this.width),console.log("height: "+this.height),console.log("minX: "+this.minX),console.log("minY: "+this.minY),console.log("maxX: "+this.maxX),console.log("maxY: "+this.maxY),console.log("xPadding: "+this.xPadding),console.log("yPadding: "+this.yPadding),console.log("rectWidth: "+this.rectWidth),console.log("rectHeight: "+this.rectHeight)},t}(),d=function(){function t(t,e,i){this.lineGraphService=t,this.globalParametersService=e,this.currentElement=i,this.data=null,this.chartBase=!0,this.colorScheme="colorful",this.minX=null,this.minY=null,this.maxX=null,this.maxY=null,this.customColorScheme=[],this.xPadding=60,this.yPadding=this.xPadding/2}return t.prototype.setDimensions=function(){if(this.width&&!this.height)this.height=this.width/3;else if(!this.width&&this.height)this.width=3*this.height;else if(!this.width&&!this.height){var t=this.currentElement.nativeElement;if(null!=t.parentNode){var e=t.parentNode.getBoundingClientRect();this.width=e.width,this.height=e.width/3}}},t.prototype.setMinandMax=function(){null==this.minX&&(this.minX=Math.min.apply(Math,s(this.data.map(function(t){return t.x})))),null==this.maxX&&(this.maxX=Math.max.apply(Math,s(this.data.map(function(t){return t.x})))),null==this.minY&&(this.minY=Math.min.apply(Math,s(this.data.map(function(t){return t.y})))),null==this.maxY&&(this.maxY=Math.max.apply(Math,s(this.data.map(function(t){return t.y}))))},t.prototype.transformData=function(){var t,e;this.transformedData=[];try{for(var i=r(this.data),n=i.next();!n.done;n=i.next()){var a=n.value,s=this.lineGraphService.transformX(a.x)+this.xPadding,h=this.lineGraphService.transformY(this.lineGraphService.maxY-a.y)+this.yPadding,o=s,l=h-30,d=a.info&&""!==a.info?"block":"none";this.transformedData.push({x:s,y:h,info:a.info,originalX:a.x,originalY:a.y,toolTipTranslate:"translate("+o+"px, "+l+"px)",toolTip:d})}}catch(c){t={error:c}}finally{try{n&&!n.done&&(e=i["return"])&&e.call(i)}finally{if(t)throw t.error}}},t.prototype.printAllInput=function(){console.log("width: "+this.width),console.log("height: "+this.height),console.log("minX: "+this.minX),console.log("maxX: "+this.maxX),console.log("minY: "+this.minY),console.log("maxY: "+this.maxY),console.log("x: "+this.xPadding),console.log("y: "+this.yPadding),console.log("data: "+this.data)},t.prototype.setLinePath=function(){var t,e;this.graphLinePath="M",this.data.sort(function(t,e){return t.x<e.x?-1:t.x>e.x?1:0});try{for(var i=r(this.transformedData),n=i.next();!n.done;n=i.next()){var a=n.value,s=a.x,h=a.y;this.graphLinePath+=" "+s+" "+h}}catch(o){t={error:o}}finally{try{n&&!n.done&&(e=i["return"])&&e.call(i)}finally{if(t)throw t.error}}},t.prototype.setColor=function(){this.color||(this.customColorScheme.length>0?this.color=this.customColorScheme[0]:this.color=h[this.colorScheme][0])},t.prototype.ngOnInit=function(){this.componentID=this.globalParametersService.addNewComponent(),this.setDimensions(),this.setMinandMax(),this.dataCopy=JSON.parse(JSON.stringify(this.data)),this.lineGraphService.setValues({componentID:this.componentID,width:this.width,height:this.height,minX:this.minX,maxX:this.maxX,minY:this.minY,maxY:this.maxY,xPadding:this.xPadding,yPadding:this.yPadding}),this.setColor(),this.transformData(),this.setLinePath()},t.prototype.ngOnChanges=function(){this.setMinandMax(),this.dataCopy=JSON.parse(JSON.stringify(this.data)),this.lineGraphService.setValues({componentID:this.componentID,width:this.width,height:this.height,minX:this.minX,maxX:this.maxX,minY:this.minY,maxY:this.maxY,xPadding:this.xPadding,yPadding:this.yPadding}),this.setColor(),this.transformData(),this.setLinePath()},t.decorators=[{type:e.Component,args:[{selector:"ngx-line-graph",template:'<svg [attr.width]="lineGraphService.width" [attr.height]="lineGraphService.height" version="1.1" xmlns="http://www.w3.org/2000/svg">\n\n  <g ngx-lg-chart-base *ngIf="chartBase"\n  [gridPrecisionX]="gridPrecisionX" [gridPrecisionY]="gridPrecisionY"\n  [xAxisTitle]="xAxisTitle" [yAxisTitle]="yAxisTitle"\n   />\n   \n  <path class="line-path"\n  [attr.d]="graphLinePath" fill="none" [attr.stroke]="color"\n    />\n\n  <g id="component" *ngFor="let point of transformedData;">\n    <circle class="point" [attr.cx]="point.x" [attr.cy]="point.y" r="4" [attr.fill]="color">\n    </circle>\n    \n    <g class="tooltip" [ngStyle]="{\'transform\': point.toolTipTranslate, \'display\': point.toolTip}" \n    opacity="0.9">\n      <rect rx="5" width="100" height="25"></rect>\n      <text x="15" y="16">{{ point.info }}</text>\n    </g>\n  </g>\n\n</svg>',providers:[l],styles:[".line-path{opacity:.6;stroke-width:3;z-index:999999}.line-path:hover{opacity:1}.point{stroke:#fff;stroke-width:2px}.point:hover{stroke-width:.5}#component .tooltip{visibility:hidden}#component:hover .tooltip{visibility:visible;position:absolute}#component:hover:after .tooltip{position:relative;left:0;top:100%;white-space:nowrap}.tooltip text{fill:#eee;font-size:12px;font-family:sans-serif}.tooltip rect{fill:#222;stroke:#111}"]}]}],t.ctorParameters=function(){return[{type:l},{type:o},{type:e.ElementRef}]},t.propDecorators={data:[{type:e.Input}],chartBase:[{type:e.Input}],width:[{type:e.Input}],height:[{type:e.Input}],color:[{type:e.Input}],colorScheme:[{type:e.Input}],minX:[{type:e.Input}],minY:[{type:e.Input}],maxX:[{type:e.Input}],maxY:[{type:e.Input}],gridPrecisionX:[{type:e.Input}],gridPrecisionY:[{type:e.Input}],xAxisTitle:[{type:e.Input}],yAxisTitle:[{type:e.Input}],customColorScheme:[{type:e.Input}]},t}(),c=function(){function t(t){this.lineGraphService=t}return t.prototype.computeGrid=function(){this.gridWidthX=this.lineGraphService.transformX(this.gridPrecisionX),this.gridWidthY=this.lineGraphService.transformY(this.gridPrecisionY),this.gridPath="M "+this.gridWidthX+" 0 L 0 0 0 "+this.gridWidthY,this.xAxis=[],this.yAxis=[];for(var t=this.lineGraphService.minX;t<=this.lineGraphService.maxX;t+=this.gridPrecisionX){var e=this.lineGraphService.transformX(t)+this.lineGraphService.xPadding;this.xAxis.push({xPos:e,value:t})}for(var i=this.lineGraphService.minY;i<=this.lineGraphService.maxY;i+=this.gridPrecisionY){var n=this.lineGraphService.transformY(i)+this.lineGraphService.yPadding+7;this.yAxis.push({yPos:n,value:this.lineGraphService.maxY-i})}},t.prototype.ngOnInit=function(){this.computeGrid(),this.gridID="grid"+this.lineGraphService.componentID},t.prototype.ngOnChanges=function(){this.computeGrid()},t.decorators=[{type:e.Component,args:[{selector:"g[ngx-lg-chart-base]",template:'<svg:pattern [attr.id]="gridID" \n[attr.x]="lineGraphService.xPadding" [attr.y]="lineGraphService.yPadding" \n[attr.width]="gridWidthX" [attr.height]="gridWidthY" \npatternUnits="userSpaceOnUse">\n    <svg:path [attr.d]="gridPath" fill="none" stroke="#444444" stroke-width="0.5" />\n</svg:pattern>\n\n<svg:rect [attr.x]="lineGraphService.xPadding" \n[attr.y]="lineGraphService.yPadding" \n[attr.width]="lineGraphService.rectWidth" \n[attr.height]="lineGraphService.rectHeight" \nstroke="#444444" [attr.fill]="\'url(#\' + gridID + \')\'" stroke-width="1"/>\n\n<svg:text\n*ngFor="let x of xAxis" class="axis-text" \n[attr.x]="x.xPos" [attr.y]="lineGraphService.rectHeight+lineGraphService.yPadding+30" class="small" text-anchor="middle"> {{ x.value }} </svg:text>\n\n<svg:text\n*ngFor="let y of yAxis" class="axis-text" \n[attr.y]="y.yPos" [attr.x]="lineGraphService.xPadding-30" class="small">{{ y.value }}</svg:text>\n\n\x3c!-- x Axis Title --\x3e\n<svg:text class="axis-text" \n  [attr.x]="lineGraphService.rectWidth/2+lineGraphService.xPadding" [attr.y]="lineGraphService.rectHeight+lineGraphService.yPadding+60" dominant-baseline="middle" text-anchor="middle"> \n  {{ xAxisTitle }} \n</svg:text>\n\n\x3c!-- y Axis Title --\x3e\n<svg:text class="axis-text" \n  [attr.x]="-lineGraphService.rectHeight/2-lineGraphService.yPadding" [attr.y]="lineGraphService.xPadding-50" dominant-baseline="middle" text-anchor="middle" transform="rotate(270)"> \n  {{ yAxisTitle }} \n</svg:text>\n\n\n',styles:[""]}]}],t.ctorParameters=function(){return[{type:l}]},t.propDecorators={xAxisTitle:[{type:e.Input}],yAxisTitle:[{type:e.Input}],gridPrecisionX:[{type:e.Input}],gridPrecisionY:[{type:e.Input}]},t}(),g=function(){function t(){}return t.prototype.computeRectDimensions=function(){this.rectHeight=this.height-4*this.yPadding,this.rectWidth=.6*this.width-2*this.xPadding},t.prototype.computeLegionDimensions=function(){var t=this.dataLength;this.legionWidth=.4*this.width-2*this.xPadding,this.legionHeight=60+30*t-19},t.prototype.transformX=function(t){return this.rectWidth*t/(this.maxX-this.minX)},t.prototype.transformY=function(t){return this.rectHeight*t/(this.maxY-this.minY)},t.prototype.setValues=function(t){var e=t.componentID,i=t.width,n=t.height,r=t.minX,a=t.minY,s=t.maxX,h=t.maxY,o=t.dataLength,l=t.xPadding,d=t.yPadding;this.componentID=e,this.width=i,this.height=n,this.minX=r,this.minY=a,this.maxX=s,this.maxY=h,this.dataLength=o,this.xPadding=l,this.yPadding=d,this.computeRectDimensions(),this.computeLegionDimensions()},t.prototype.printAll=function(){console.log("multi-line-graph-service"),console.log("component ID: "+this.componentID),console.log("width: "+this.width),console.log("height: "+this.height),console.log("minX: "+this.minX),console.log("minY: "+this.minY),console.log("maxX: "+this.maxX),console.log("maxY: "+this.maxY),console.log("xPadding: "+this.xPadding),console.log("yPadding: "+this.yPadding),console.log("rectWidth: "+this.rectWidth),console.log("rectHeight: "+this.rectHeight),console.log("legionWidth: "+this.legionWidth),console.log("legionHeight: "+this.legionHeight)},t}(),u=function(){function t(t,e,i){this.multiLineGraphService=t,this.globalParametersService=e,this.currentElement=i,this.colorScheme="colorful",this.minX=null,this.minY=null,this.maxX=null,this.maxY=null,this.customColorScheme=[],this.xPadding=60,this.yPadding=this.xPadding/2,this.transformedData=[]}return t.prototype.setDimensions=function(){if(this.width&&!this.height)this.height=this.width/3;else if(!this.width&&this.height)this.width=3*this.height;else if(!this.width&&!this.height){var t=this.currentElement.nativeElement;if(null!=t.parentNode){var e=t.parentNode.getBoundingClientRect();this.width=e.width,this.height=e.width/3}}},t.prototype.setMinandMax=function(){null==this.minX&&(this.minX=Math.min.apply(Math,s(this.data.map(function(t){return Math.min.apply(Math,s(t.data.map(function(t){return t.x})))})))),null==this.maxX&&(this.maxX=Math.max.apply(Math,s(this.data.map(function(t){return Math.max.apply(Math,s(t.data.map(function(t){return t.x})))})))),null==this.minY&&(this.minY=Math.min.apply(Math,s(this.data.map(function(t){return Math.min.apply(Math,s(t.data.map(function(t){return t.y})))})))),null==this.maxY&&(this.maxY=Math.max.apply(Math,s(this.data.map(function(t){return Math.max.apply(Math,s(t.data.map(function(t){return t.y})))}))))},t.prototype.transformData=function(){var t,e,i,n;this.transformedData=[];try{for(var a=r(this.data),s=a.next();!s.done;s=a.next()){var h=s.value,o=void 0;o=[];try{for(var l=r(h.data),d=l.next();!d.done;d=l.next()){var c=d.value,g=this.multiLineGraphService.transformX(c.x)+this.xPadding,u=this.multiLineGraphService.transformY(this.multiLineGraphService.maxY-c.y)+this.yPadding,p=g,m=u-30,x=c.info&&""!==c.info?"block":"none";o.push({x:g,y:u,info:c.info,originalX:c.x,originalY:c.y,toolTipTranslate:"translate("+p+"px, "+m+"px)",toolTip:x})}}catch(v){i={error:v}}finally{try{d&&!d.done&&(n=l["return"])&&n.call(l)}finally{if(i)throw i.error}}this.transformedData.push({name:h.name,color:h.color,data:o})}}catch(y){t={error:y}}finally{try{s&&!s.done&&(e=a["return"])&&e.call(a)}finally{if(t)throw t.error}}},t.prototype.setLinePath=function(){var t,e,i,n;this.graphLinePaths=[];try{for(var a=r(this.transformedData),s=a.next();!s.done;s=a.next()){var h=s.value,o="M",l=void 0;(l=h.data).sort(function(t,e){return t.x<e.x?-1:t.x>e.x?1:0});try{for(var d=r(l),c=d.next();!c.done;c=d.next()){var g=c.value;o+=" "+g.x+" "+g.y}}catch(u){i={error:u}}finally{try{c&&!c.done&&(n=d["return"])&&n.call(d)}finally{if(i)throw i.error}}this.graphLinePaths.push({color:h.color,path:o})}}catch(p){t={error:p}}finally{try{s&&!s.done&&(e=a["return"])&&e.call(a)}finally{if(t)throw t.error}}},t.prototype.setColors=function(){var t,e,i=0;try{for(var n=r(this.data),a=n.next();!a.done;a=n.next()){var s=a.value;s.color||(this.customColorScheme.length>0?s.color=this.customColorScheme[i%this.customColorScheme.length]:s.color=h[this.colorScheme][i%10]),i++}}catch(o){t={error:o}}finally{try{a&&!a.done&&(e=n["return"])&&e.call(n)}finally{if(t)throw t.error}}},t.prototype.ngOnInit=function(){this.componentID=this.globalParametersService.addNewComponent(),console.log("init.."),this.setDimensions(),this.setMinandMax(),this.setColors(),this.dataCopy=JSON.parse(JSON.stringify(this.data)),this.multiLineGraphService.setValues({componentID:this.componentID,width:this.width,height:this.height,minX:this.minX,maxX:this.maxX,minY:this.minY,maxY:this.maxY,dataLength:this.data.length,xPadding:this.xPadding,yPadding:this.yPadding}),this.transformData(),this.setLinePath()},t.prototype.ngOnChanges=function(){console.log("changes.."),this.setMinandMax(),this.setColors(),this.dataCopy=JSON.parse(JSON.stringify(this.data)),this.multiLineGraphService.setValues({componentID:this.componentID,width:this.width,height:this.height,minX:this.minX,maxX:this.maxX,minY:this.minY,maxY:this.maxY,dataLength:this.data.length,xPadding:this.xPadding,yPadding:this.yPadding}),this.transformData(),this.setLinePath()},t.decorators=[{type:e.Component,args:[{selector:"ngx-multi-line-graph",template:'<svg [attr.width]="width" [attr.height]="height" version="1.1" xmlns="http://www.w3.org/2000/svg">\n  <g ngx-mlg-chart-base [data]="data"\n  [gridPrecisionX]="gridPrecisionX" [gridPrecisionY]="gridPrecisionY"\n  [xAxisTitle]="xAxisTitle" [yAxisTitle]="yAxisTitle"\n  />\n \n\n  \x3c!-- <g *ngFor="let line of data">\n    <g ngx-line-graph chartBase="false" [data]="line.data" [minX]="0" [maxX]="100" \n    [minY]="0" [maxY]="50" \n    [gridPrecisionX]="10" \n    [gridPrecisionY]="10"\n    xAxisTitle="Time"\n    yAxisTitle="Distance"\n    [data]="data"\n    color="#ff4444"\n\n    [width]="beautifulChartsService.rectWidth" [height]="beautifulChartsService.rectHeight" [color]="line.color" />\n  </g> --\x3e\n\n\n  <path *ngFor="let singleLine of graphLinePaths" class="line-path"\n  [attr.d]="singleLine.path" fill="none" [attr.stroke]="singleLine.color"\n    />\n  \n  \n  <g *ngFor="let line of transformedData;">\n    <g id="component" *ngFor="let point of line.data">\n        <circle class="point" [attr.cx]="point.x" [attr.cy]="point.y" r="4" [attr.fill]="line.color">\n        </circle>\n        \n        <g class="tooltip" [ngStyle]="{\'transform\': point.toolTipTranslate, \'display\': point.toolTip}" \n        opacity="0.9">\n          <rect rx="5" width="100" height="25"></rect>\n          <text x="15" y="16">{{ point.info }}</text>\n        </g>\n    </g>\n    \n  </g>\n\n</svg>',providers:[g],styles:[".line-path{opacity:.6;stroke-width:3;z-index:999999}.line-path:hover{opacity:1}.point{stroke:#fff;stroke-width:2px}.point:hover{stroke-width:.5}#component .tooltip{visibility:hidden}#component:hover .tooltip{visibility:visible;position:absolute}#component:hover:after .tooltip{position:relative;left:0;top:100%;white-space:nowrap}.tooltip text{fill:#eee;font-size:12px;font-family:sans-serif}.tooltip rect{fill:#222;stroke:#111}"]}]}],t.ctorParameters=function(){return[{type:g},{type:o},{type:e.ElementRef}]},t.propDecorators={data:[{type:e.Input}],width:[{type:e.Input}],height:[{type:e.Input}],colorScheme:[{type:e.Input}],minX:[{type:e.Input}],minY:[{type:e.Input}],maxX:[{type:e.Input}],maxY:[{type:e.Input}],gridPrecisionX:[{type:e.Input}],gridPrecisionY:[{type:e.Input}],xAxisTitle:[{type:e.Input}],yAxisTitle:[{type:e.Input}],customColorScheme:[{type:e.Input}]},t}(),p=function(){function t(t){this.multiLineGraphService=t}return t.prototype.computeLegionXs=function(){this.x1=this.multiLineGraphService.rectWidth+2*this.multiLineGraphService.xPadding+this.multiLineGraphService.legionWidth/4*.2,this.x2=this.multiLineGraphService.rectWidth+2*this.multiLineGraphService.xPadding+this.multiLineGraphService.legionWidth/4*.8},t.prototype.computeGrid=function(){this.gridWidthX=this.multiLineGraphService.transformX(this.gridPrecisionX),this.gridWidthY=this.multiLineGraphService.transformY(this.gridPrecisionY),this.gridPath="M "+this.gridWidthX+" 0 L 0 0 0 "+this.gridWidthY,this.xAxis=[],this.yAxis=[];for(var t=this.multiLineGraphService.minX;t<=this.multiLineGraphService.maxX;t+=this.gridPrecisionX){var e=this.multiLineGraphService.transformX(t)+this.multiLineGraphService.xPadding;this.xAxis.push({xPos:e,value:t})}for(var i=this.multiLineGraphService.minY;i<=this.multiLineGraphService.maxY;i+=this.gridPrecisionY){var n=this.multiLineGraphService.transformY(i)+this.multiLineGraphService.yPadding+7;this.yAxis.push({yPos:n,value:this.multiLineGraphService.maxY-i})}},t.prototype.computeLegionPath=function(t){var e="M ",i=this.multiLineGraphService.yPadding+35+30*t;return e=e+this.x1+" "+i+" "+this.x2+" "+i},t.prototype.ngOnInit=function(){this.computeGrid(),this.gridID="grid"+this.multiLineGraphService.componentID,this.computeLegionXs()},t.prototype.ngOnChanges=function(){this.computeGrid(),this.computeLegionXs()},t.decorators=[{type:e.Component,args:[{selector:"g[ngx-mlg-chart-base]",template:'<svg:pattern [attr.id]="gridID" \n[attr.x]="multiLineGraphService.xPadding" [attr.y]="multiLineGraphService.yPadding" \n[attr.width]="gridWidthX" [attr.height]="gridWidthY" \npatternUnits="userSpaceOnUse">\n    <svg:path [attr.d]="gridPath" fill="none" stroke="#444444" stroke-width="0.5" />\n</svg:pattern>\n\n<svg:rect [attr.x]="multiLineGraphService.xPadding" \n[attr.y]="multiLineGraphService.yPadding" \n[attr.width]="multiLineGraphService.rectWidth" \n[attr.height]="multiLineGraphService.rectHeight" \nstroke="#444444" [attr.fill]="\'url(#\' + gridID + \')\'" stroke-width="1"/>\n\n<svg:text\n*ngFor="let x of xAxis" class="axis-text" \n[attr.x]="x.xPos" [attr.y]="multiLineGraphService.rectHeight+multiLineGraphService.yPadding+30" class="small" text-anchor="middle"> {{ x.value }} </svg:text>\n\n<svg:text\n*ngFor="let y of yAxis" class="axis-text" \n[attr.y]="y.yPos" [attr.x]="multiLineGraphService.xPadding-30" class="small">{{ y.value }}</svg:text>\n\n\x3c!-- x Axis Title --\x3e\n<svg:text class="axis-text" \n  [attr.x]="multiLineGraphService.rectWidth/2+multiLineGraphService.xPadding" [attr.y]="multiLineGraphService.rectHeight+multiLineGraphService.yPadding+60" dominant-baseline="middle" text-anchor="middle"> \n  {{ xAxisTitle }} \n</svg:text>\n\n\x3c!-- y Axis Title --\x3e\n<svg:text class="axis-text" \n  [attr.x]="-multiLineGraphService.rectHeight/2-multiLineGraphService.yPadding" [attr.y]="multiLineGraphService.xPadding-50" dominant-baseline="middle" text-anchor="middle" transform="rotate(270)"> \n  {{ yAxisTitle }} \n</svg:text>\n\n\n\x3c!-- Legion --\x3e\n<svg:rect [attr.x]="2*multiLineGraphService.xPadding + multiLineGraphService.rectWidth" \n[attr.y]="multiLineGraphService.yPadding" \n[attr.width]="multiLineGraphService.legionWidth" \n[attr.height]="multiLineGraphService.legionHeight" \nfill="#f1f1f1" />\n\n\n<svg:g *ngFor="let x of data; index as i">\n    <svg:path class="legion-line" [attr.d]="computeLegionPath(i)" fill="none" [attr.stroke]="x.color" />\n    <svg:text class="axis-text" \n    [attr.x]="multiLineGraphService.rectWidth + 2*multiLineGraphService.xPadding + multiLineGraphService.legionWidth / 4" \n    [attr.y]="multiLineGraphService.yPadding+40+30*i" class="small"> {{ x.name }} </svg:text>\n</svg:g>\n\n\n',styles:[".legion-line{stroke-width:3px}"]}]}],t.ctorParameters=function(){return[{type:g}]},t.propDecorators={xAxisTitle:[{type:e.Input}],yAxisTitle:[{type:e.Input}],gridPrecisionX:[{type:e.Input}],gridPrecisionY:[{type:e.Input}],data:[{type:e.Input}]},t}(),m=function(){function t(){}return t.prototype.computeRectDimensions=function(){this.rectHeight=this.height-4*this.yPadding,this.rectWidth=this.width-2*this.xPadding},t.prototype.transformY=function(t){return this.rectHeight*t/(this.maxY-this.minY)},t.prototype.closestMultipleLessThanEqualTo=function(t,e){return e%t==0?e:this.closestMultipleLessThanEqualTo(t,e-1)},t.prototype.closestMultipleMoreThanEqualTo=function(t,e){return e%t==0?e:this.closestMultipleMoreThanEqualTo(t,e+1)},t.prototype.setValues=function(t){var e=t.componentID,i=t.width,n=t.height,r=t.xPadding,a=t.yPadding,h=t.data;this.componentID=e,this.width=i,this.height=n,this.xPadding=r,this.yPadding=a,this.data=h;var o=Math.min.apply(Math,s(this.data.map(function(t){return t.value}))),l=Math.max.apply(Math,s(this.data.map(function(t){return t.value}))),d=l-o,c=10;for(this.diff=1;d>c;)this.diff++,c+=10;this.minY=this.closestMultipleLessThanEqualTo(this.diff,o),this.minY=this.minY-2*this.diff,this.maxY=this.closestMultipleMoreThanEqualTo(this.diff,l),this.maxY=this.maxY+2*this.diff,this.computeRectDimensions()},t.prototype.printAll=function(){console.log("line-graph-service"),console.log("component ID: "+this.componentID),console.log("width: "+this.width),console.log("height: "+this.height),console.log("minY: "+this.minY),console.log("maxY: "+this.maxY),console.log("xPadding: "+this.xPadding),console.log("yPadding: "+this.yPadding),console.log("rectWidth: "+this.rectWidth),console.log("rectHeight: "+this.rectHeight)},t}(),x=function(){function t(t,e,i){this.barChartService=t,this.globalParametersService=e,this.currentElement=i,this.showGridLines=!1,this.colorScheme="colorful",this.customColorScheme=[],this.xPadding=60,this.yPadding=this.xPadding/2}return t.prototype.computeBarPaths=function(){var t,e;this.barPaths=[];var i=this.data.length,n=this.barChartService.rectWidth/i,a=.25*n,s=-1,h="";try{for(var o=r(this.data),l=o.next();!l.done;l=o.next()){var d=l.value,c=++s*n+n/2+this.xPadding,g=this.barChartService.transformY(this.barChartService.maxY-d.value)+this.yPadding,u=c-a/2,p=c+a/2,m=this.barChartService.rectHeight+this.yPadding;h=(h="M ")+" "+u+" "+m+" L "+u+" "+g+" "+p+" "+g+" "+p+" "+m+" Z",this.barPaths.push(h)}}catch(x){t={error:x}}finally{try{l&&!l.done&&(e=o["return"])&&e.call(o)}finally{if(t)throw t.error}}},t.prototype.setColor=function(){this.color||(this.customColorScheme.length>0?this.color=this.customColorScheme[0]:this.color=h[this.colorScheme][0])},t.prototype.setDimensions=function(){if(this.width&&!this.height)this.height=this.width/3;else if(!this.width&&this.height)this.width=3*this.height;else if(!this.width&&!this.height){var t=this.currentElement.nativeElement;if(null!=t.parentNode){var e=t.parentNode.getBoundingClientRect();this.width=e.width,this.height=e.width/3}}},t.prototype.ngOnInit=function(){this.componentID=this.globalParametersService.addNewComponent(),this.setDimensions(),this.dataCopy=JSON.parse(JSON.stringify(this.data)),this.barChartService.setValues({componentID:this.componentID,width:this.width,height:this.height,xPadding:this.xPadding,yPadding:this.yPadding,data:this.data}),this.setColor(),this.computeBarPaths()},t.prototype.ngOnChanges=function(){this.dataCopy=JSON.parse(JSON.stringify(this.data)),this.barChartService.setValues({componentID:this.componentID,width:this.width,height:this.height,xPadding:this.xPadding,yPadding:this.yPadding,data:this.data}),this.setColor(),this.computeBarPaths()},t.decorators=[{type:e.Component,args:[{selector:"ngx-bar-chart",template:'<svg [attr.width]="width" [attr.height]="height" version="1.1" xmlns="http://www.w3.org/2000/svg">\n\n  <g ngx-bc-chart-base\n  [showGridLines]="showGridLines"\n  [xAxisTitle]="xAxisTitle" [yAxisTitle]="yAxisTitle"\n  />\n\n  <g *ngFor="let barPath of barPaths">\n    <path class="chart-bar"\n    [attr.d]="barPath" [attr.fill]="color" />\n  </g>\n\n</svg>',providers:[m],styles:[".chart-bar:hover{stroke-width:1;stroke:#444}"]}]}],t.ctorParameters=function(){return[{type:m},{type:o},{type:e.ElementRef}]},t.propDecorators={data:[{type:e.Input}],width:[{type:e.Input}],height:[{type:e.Input}],xAxisTitle:[{type:e.Input}],yAxisTitle:[{type:e.Input}],showGridLines:[{type:e.Input}],color:[{type:e.Input}],colorScheme:[{type:e.Input}],customColorScheme:[{type:e.Input}]},t}(),v=function(){function t(t){this.barChartService=t}return t.prototype.computeGrid=function(){var t,e,i;this.yLevelPaths=[],this.xAxis=[],this.yAxis=[];for(var n=this.barChartService.minY;n<=this.barChartService.maxY;n+=this.barChartService.diff){var a=this.barChartService.xPadding+this.barChartService.rectWidth,s=this.barChartService.transformY(this.barChartService.maxY-n)+this.barChartService.yPadding,h="M "+this.barChartService.xPadding+" "+s+" L "+a+" "+s;this.yLevelPaths.push(h),this.yAxis.push({yPos:s,value:n})}i=this.barChartService.data.length;var o=this.barChartService.rectWidth/i,l=-1;try{for(var d=r(this.barChartService.data),c=d.next();!c.done;c=d.next()){var g=c.value,u=++l*o+o/2+this.barChartService.xPadding;this.xAxis.push({xPos:u,value:g.name})}}catch(p){t={error:p}}finally{try{c&&!c.done&&(e=d["return"])&&e.call(d)}finally{if(t)throw t.error}}},t.prototype.ngOnInit=function(){this.computeGrid()},t.prototype.ngOnChanges=function(){this.computeGrid()},t.decorators=[{type:e.Component,args:[{selector:"g[ngx-bc-chart-base]",template:'\x3c!-- <svg:pattern [attr.id]="gridID" \n[attr.x]="barChartService.xPadding" [attr.y]="barChartService.yPadding" \n[attr.width]="gridWidthX" [attr.height]="gridWidthY" \npatternUnits="userSpaceOnUse">\n    <svg:path [attr.d]="gridPath" fill="none" stroke="#444444" stroke-width="0.5" />\n</svg:pattern> --\x3e\n\n<svg:rect [attr.x]="barChartService.xPadding" \n[attr.y]="barChartService.yPadding" \n[attr.width]="barChartService.rectWidth" \n[attr.height]="barChartService.rectHeight" \nstroke="#444444" fill="none" stroke-width="1"/>\n\n<svg:g *ngIf="showGridLines">\n  <svg:path *ngFor="let yLevelPath of yLevelPaths"\n  class="bar-chart-level"\n  [attr.d]="yLevelPath" fill="none" stroke="#444444" />\n</svg:g>\n\n<svg:text\n*ngFor="let x of xAxis" class="axis-text" \n[attr.x]="x.xPos" [attr.y]="barChartService.rectHeight+barChartService.yPadding+30" class="small"\ntext-anchor="middle" dominant-baseline="middle"> {{ x.value }} </svg:text>\n\n<svg:text\n*ngFor="let y of yAxis" class="axis-text" \n[attr.y]="y.yPos" [attr.x]="barChartService.xPadding-30" class="small">{{ y.value }}</svg:text>\n\n\x3c!-- x Axis Title --\x3e\n<svg:text class="axis-text" \n  [attr.x]="barChartService.rectWidth/2+barChartService.xPadding" \n  [attr.y]="barChartService.rectHeight+barChartService.yPadding+60" dominant-baseline="middle" text-anchor="middle"> \n  {{ xAxisTitle }} \n</svg:text>\n\n\x3c!-- y Axis Title --\x3e\n<svg:text class="axis-text" \n  [attr.x]="-barChartService.rectHeight/2-barChartService.yPadding" \n  [attr.y]="barChartService.xPadding-50" dominant-baseline="middle" text-anchor="middle" transform="rotate(270)"> \n  {{ yAxisTitle }} \n</svg:text>\n\n\n\x3c!-- Legion --\x3e\n\x3c!-- <svg:rect [attr.x]="2*barChartService.xPadding + barChartService.rectWidth" \n[attr.y]="barChartService.yPadding" \n[attr.width]="beautifulChartsService.legionWidth" \n[attr.height]="beautifulChartsService.legionHeight" \nfill="#f1f1f1" />\n\n\n<svg:g *ngFor="let x of beautifulChartsService.data; index as i">\n    <svg:rect *ngIf="beautifulChartsService.legionWidth" \n    [attr.x]="barChartService.rectWidth + 2*barChartService.xPadding + beautifulChartsService.legionWidth / 4 * .3" \n    [attr.y]="barChartService.yPadding+25+30*i" \n    [attr.width]="beautifulChartsService.legionWidth / 4 * .4" \n    [attr.height]="beautifulChartsService.legionWidth / 4 * .4" \n    [attr.fill]="x.color" />\n    <svg:text class="axis-text" *ngIf="beautifulChartsService.legionWidth" \n    [attr.x]="barChartService.rectWidth + 2*barChartService.xPadding + beautifulChartsService.legionWidth / 4" \n    [attr.y]="barChartService.yPadding+40+30*i" class="small"> {{ x.series }} </svg:text>\n</svg:g> --\x3e\n\n',styles:[".bar-chart-level{stroke-width:.3;stroke-dasharray:5}"]}]}],t.ctorParameters=function(){return[{type:m}]},t.propDecorators={xAxisTitle:[{type:e.Input}],yAxisTitle:[{type:e.Input}],showGridLines:[{type:e.Input}]},t}(),y=function(){function t(){}return t.prototype.computeRectDimensions=function(){this.rectHeight=this.height-4*this.yPadding,this.rectWidth=.7*this.width-2*this.xPadding},t.prototype.computeLegionDimensions=function(){var t=this.data.length;this.legionWidth=.3*this.width-2*this.xPadding,this.legionHeight=60+30*t-19},t.prototype.transformY=function(t){return this.rectHeight*t/(this.maxY-this.minY)},t.prototype.closestMultipleLessThanEqualTo=function(t,e){return e%t==0?e:this.closestMultipleLessThanEqualTo(t,e-1)},t.prototype.closestMultipleMoreThanEqualTo=function(t,e){return e%t==0?e:this.closestMultipleMoreThanEqualTo(t,e+1)},t.prototype.setValues=function(t){var e,i,n=t.componentID,a=t.width,h=t.height,o=t.xPadding,l=t.yPadding,d=t.data;this.componentID=n,this.width=a,this.height=h,this.xPadding=o,this.yPadding=l,this.data=d;var c=[],g=[];c=[],g=[];try{for(var u=r(this.data),p=u.next();!p.done;p=u.next()){var m=p.value,x=Math.min.apply(Math,s(m.data.map(function(t){return t.value}))),v=Math.max.apply(Math,s(m.data.map(function(t){return t.value})));c.push(x),g.push(v)}}catch(C){e={error:C}}finally{try{p&&!p.done&&(i=u["return"])&&i.call(u)}finally{if(e)throw e.error}}var y=Math.min.apply(Math,s(c)),f=Math.max.apply(Math,s(g)),S=f-y,P=10;for(this.diff=1;S>P;)this.diff++,P+=10;this.minY=this.closestMultipleLessThanEqualTo(this.diff,y),this.minY=this.minY-2*this.diff,this.maxY=this.closestMultipleMoreThanEqualTo(this.diff,f),this.maxY=this.maxY+2*this.diff,this.computeRectDimensions(),this.computeLegionDimensions()},t.prototype.printAll=function(){console.log("line-graph-service"),console.log("component ID: "+this.componentID),console.log("width: "+this.width),console.log("height: "+this.height),console.log("minY: "+this.minY),console.log("maxY: "+this.maxY),console.log("xPadding: "+this.xPadding),console.log("yPadding: "+this.yPadding),console.log("rectWidth: "+this.rectWidth),console.log("rectHeight: "+this.rectHeight)},t}(),f=function(){function t(t,e,i){this.clusteredBarChartService=t,this.globalParametersService=e,this.currentElement=i,this.showGridLines=!1,this.colorScheme="colorful",this.customColorScheme=[],this.xPadding=60,this.yPadding=this.xPadding/2}return t.prototype.setDimensions=function(){if(this.width&&!this.height)this.height=this.width/3;else if(!this.width&&this.height)this.width=3*this.height;else if(!this.width&&!this.height){var t=this.currentElement.nativeElement;if(null!=t.parentNode){var e=t.parentNode.getBoundingClientRect();this.width=e.width,this.height=e.width/3}}},t.prototype.computeBarPaths=function(){var t,e,i,n,a,s,h,o,l,d;this.barPaths=[],l=new Set;try{for(var c=r(this.data),g=c.next();!g.done;g=c.next()){var u=g.value.data;try{for(var p=r(u),m=p.next();!m.done;m=p.next()){var x=m.value;l.add(x.name)}}catch(G){i={error:G}}finally{try{m&&!m.done&&(n=p["return"])&&n.call(p)}finally{if(i)throw i.error}}}}catch(B){t={error:B}}finally{try{g&&!g.done&&(e=c["return"])&&e.call(c)}finally{if(t)throw t.error}}d=l.size;var v=this.data.length,y=this.clusteredBarChartService.rectWidth/d,f=.5*y/v,S=-1,P="",C=-1;try{for(var w=r(this.data),D=w.next();!D.done;D=w.next()){var I=D.value;C++,S=-1;var b=void 0;b=[];try{for(var M=r(I.data),Y=M.next();!Y.done;Y=M.next()){var W=Y.value,R=++S*y+.25*y+C*f+.5*f+this.xPadding,L=this.clusteredBarChartService.transformY(this.clusteredBarChartService.maxY-W.value)+this.yPadding,T=R-f/2,A=R+f/2,X=this.clusteredBarChartService.rectHeight+this.yPadding;P=(P="M ")+" "+T+" "+X+" L "+T+" "+L+" "+A+" "+L+" "+A+" "+X+" Z",b.push(P)}}catch(E){h={error:E}}finally{try{Y&&!Y.done&&(o=M["return"])&&o.call(M)}finally{if(h)throw h.error}}this.barPaths.push({color:I.color,paths:b})}}catch(H){a={error:H}}finally{try{D&&!D.done&&(s=w["return"])&&s.call(w)}finally{if(a)throw a.error}}},t.prototype.setColors=function(){var t,e,i=0;try{for(var n=r(this.data),a=n.next();!a.done;a=n.next()){var s=a.value;s.color||(this.customColorScheme.length>0?s.color=this.customColorScheme[i%this.customColorScheme.length]:s.color=h[this.colorScheme][i%10],i++)}}catch(o){t={error:o}}finally{try{a&&!a.done&&(e=n["return"])&&e.call(n)}finally{if(t)throw t.error}}},t.prototype.ngOnInit=function(){this.componentID=this.globalParametersService.addNewComponent(),console.log("init.."),this.setDimensions(),this.dataCopy=JSON.parse(JSON.stringify(this.data)),this.setColors(),this.clusteredBarChartService.setValues({componentID:this.componentID,width:this.width,height:this.height,xPadding:this.xPadding,yPadding:this.yPadding,data:this.data}),this.computeBarPaths()},t.prototype.ngOnChanges=function(){this.setColors(),this.clusteredBarChartService.setValues({componentID:this.componentID,width:this.width,height:this.height,xPadding:this.xPadding,yPadding:this.yPadding,data:this.data}),this.computeBarPaths()},t.decorators=[{type:e.Component,args:[{selector:"ngx-clustered-bar-chart",template:'<svg [attr.width]="width" [attr.height]="height" version="1.1" xmlns="http://www.w3.org/2000/svg">\n\n  <g ngx-cbc-chart-base\n  [showGridLines]="showGridLines"\n  [xAxisTitle]="xAxisTitle" [yAxisTitle]="yAxisTitle"\n  />\n\n  <g *ngFor="let series of barPaths">\n    <g *ngFor="let barPath of series.paths">\n      <path class="chart-bar"\n      [attr.d]="barPath" [attr.fill]="series.color" />\n    </g>\n  </g>\n\n</svg>',providers:[y],styles:[".chart-bar:hover{stroke-width:1;stroke:#444}"]}]}],t.ctorParameters=function(){return[{type:y},{type:o},{type:e.ElementRef}]},t.propDecorators={data:[{type:e.Input}],width:[{type:e.Input}],height:[{type:e.Input}],xAxisTitle:[{type:e.Input}],yAxisTitle:[{type:e.Input}],showGridLines:[{type:e.Input}],colorScheme:[{type:e.Input}],customColorScheme:[{type:e.Input}]},t}(),S=function(){function t(t){this.clusteredBarChartService=t}return t.prototype.computeGrid=function(){var t,e,i,n,a,s,h,o;this.yLevelPaths=[],this.xAxis=[],this.yAxis=[];for(var l=this.clusteredBarChartService.minY;l<=this.clusteredBarChartService.maxY;l+=this.clusteredBarChartService.diff){var d=this.clusteredBarChartService.xPadding+this.clusteredBarChartService.rectWidth,c=this.clusteredBarChartService.transformY(this.clusteredBarChartService.maxY-l)+this.clusteredBarChartService.yPadding,g="M "+this.clusteredBarChartService.xPadding+" "+c+" L "+d+" "+c;this.yLevelPaths.push(g),this.yAxis.push({yPos:c,value:l})}o=new Set;try{for(var u=r(this.clusteredBarChartService.data),p=u.next();!p.done;p=u.next()){var m=p.value.data;try{for(var x=r(m),v=x.next();!v.done;v=x.next()){var y=v.value;o.add(y.name)}}catch(I){i={error:I}}finally{try{v&&!v.done&&(n=x["return"])&&n.call(x)}finally{if(i)throw i.error}}}}catch(b){t={error:b}}finally{try{p&&!p.done&&(e=u["return"])&&e.call(u)}finally{if(t)throw t.error}}h=o.size;var f=this.clusteredBarChartService.rectWidth/h,S=-1;try{for(var P=r(o),C=P.next();!C.done;C=P.next()){var w=C.value,D=++S*f+f/2+this.clusteredBarChartService.xPadding;this.xAxis.push({xPos:D,value:w})}}catch(M){a={error:M}}finally{try{C&&!C.done&&(s=P["return"])&&s.call(P)}finally{if(a)throw a.error}}},t.prototype.ngOnInit=function(){this.computeGrid()},t.prototype.ngOnChanges=function(){this.computeGrid()},t.decorators=[{type:e.Component,args:[{selector:"g[ngx-cbc-chart-base]",template:'\x3c!-- <svg:pattern [attr.id]="gridID" \n[attr.x]="clusteredBarChartService.xPadding" [attr.y]="clusteredBarChartService.yPadding" \n[attr.width]="gridWidthX" [attr.height]="gridWidthY" \npatternUnits="userSpaceOnUse">\n    <svg:path [attr.d]="gridPath" fill="none" stroke="#444444" stroke-width="0.5" />\n</svg:pattern> --\x3e\n\n<svg:rect [attr.x]="clusteredBarChartService.xPadding" \n[attr.y]="clusteredBarChartService.yPadding" \n[attr.width]="clusteredBarChartService.rectWidth" \n[attr.height]="clusteredBarChartService.rectHeight" \nstroke="#444444" fill="none" stroke-width="1"/>\n\n<svg:g *ngIf="showGridLines">\n  <svg:path *ngFor="let yLevelPath of yLevelPaths"\n  class="bar-chart-level"\n  [attr.d]="yLevelPath" fill="none" stroke="#444444" />\n</svg:g>\n\n<svg:text\n*ngFor="let x of xAxis" class="axis-text" \n[attr.x]="x.xPos" [attr.y]="clusteredBarChartService.rectHeight+clusteredBarChartService.yPadding+30" class="small"\ntext-anchor="middle" dominant-baseline="middle"> {{ x.value }} </svg:text>\n\n<svg:text\n*ngFor="let y of yAxis" class="axis-text" \n[attr.y]="y.yPos" [attr.x]="clusteredBarChartService.xPadding-30" class="small">{{ y.value }}</svg:text>\n\n\x3c!-- x Axis Title --\x3e\n<svg:text class="axis-text" \n  [attr.x]="clusteredBarChartService.rectWidth/2+clusteredBarChartService.xPadding" \n  [attr.y]="clusteredBarChartService.rectHeight+clusteredBarChartService.yPadding+60" dominant-baseline="middle" text-anchor="middle"> \n  {{ xAxisTitle }} \n</svg:text>\n\n\x3c!-- y Axis Title --\x3e\n<svg:text class="axis-text" \n  [attr.x]="-clusteredBarChartService.rectHeight/2-clusteredBarChartService.yPadding" \n  [attr.y]="clusteredBarChartService.xPadding-50" dominant-baseline="middle" text-anchor="middle" transform="rotate(270)"> \n  {{ yAxisTitle }} \n</svg:text>\n\n\n\x3c!-- Legion --\x3e\n<svg:rect [attr.x]="2*clusteredBarChartService.xPadding + clusteredBarChartService.rectWidth" \n[attr.y]="clusteredBarChartService.yPadding" \n[attr.width]="clusteredBarChartService.legionWidth" \n[attr.height]="clusteredBarChartService.legionHeight" \nfill="#f1f1f1" />\n\n\n<svg:g *ngFor="let x of clusteredBarChartService.data; index as i">\n    <svg:rect *ngIf="clusteredBarChartService.legionWidth" \n    [attr.x]="clusteredBarChartService.rectWidth + 2*clusteredBarChartService.xPadding + clusteredBarChartService.legionWidth / 4 * .3" \n    [attr.y]="clusteredBarChartService.yPadding+25+30*i" \n    [attr.width]="clusteredBarChartService.legionWidth / 4 * .4" \n    [attr.height]="clusteredBarChartService.legionWidth / 4 * .4" \n    [attr.fill]="x.color" />\n    <svg:text class="axis-text" *ngIf="clusteredBarChartService.legionWidth" \n    [attr.x]="clusteredBarChartService.rectWidth + 2*clusteredBarChartService.xPadding + clusteredBarChartService.legionWidth / 4" \n    [attr.y]="clusteredBarChartService.yPadding+40+30*i" class="small"> {{ x.series }} </svg:text>\n</svg:g>\n\n',styles:[".bar-chart-level{stroke-width:.3;stroke-dasharray:5}"]}]}],t.ctorParameters=function(){return[{type:y}]},t.propDecorators={xAxisTitle:[{type:e.Input}],yAxisTitle:[{type:e.Input}],showGridLines:[{type:e.Input}]},t}(),P=function(){function t(){}return t.prototype.computeRectDimensions=function(){this.rectWidth=.6*this.width-2*this.xPadding,this.rectHeight=this.rectWidth},t.prototype.computeLegionDimensions=function(){var t=this.data.length;this.legionWidth=.4*this.width-2*this.xPadding,this.legionHeight=60+30*t-19},t.prototype.setValues=function(t){var e=t.componentID,i=t.width,n=t.height,r=t.xPadding,a=t.yPadding,s=t.data;this.componentID=e,this.width=i,this.height=n,this.xPadding=r,this.yPadding=a,this.data=s,this.pieRadius=(.6*this.width-2*this.xPadding)/2,this.computeRectDimensions(),this.computeLegionDimensions()},t.prototype.printAll=function(){console.log("line-graph-service"),console.log("component ID: "+this.componentID),console.log("width: "+this.width),console.log("height: "+this.height),console.log("xPadding: "+this.xPadding),console.log("yPadding: "+this.yPadding),console.log("rectWidth: "+this.rectWidth),console.log("rectHeight: "+this.rectHeight)},t}(),C=function(){function t(t,e,i){this.pieChartService=t,this.globalParametersService=e,this.currentElement=i,this.colorScheme="colorful",this.customColorScheme=[],this.xPadding=60,this.yPadding=this.xPadding/2,this.pieSlicesInit=0}return t.prototype.generatePieSlices=function(t){var e,i,n,a;0===this.pieSlicesInit&&(this.pieSlices=[]);var s=0;try{for(var h=r(this.data),o=h.next();!o.done;o=h.next()){s+=(p=o.value).value}}catch(I){e={error:I}}finally{try{o&&!o.done&&(i=h["return"])&&i.call(h)}finally{if(e)throw e.error}}var l=0,d=0,c=0;try{for(var g=r(this.data),u=g.next();!u.done;u=g.next()){var p,m=(p=u.value).value/s*t,x=360*m,v=x*Math.PI/180,y=x>180?1:0,f="M 0 0 0 "+-this.pieRadius+" A "+this.pieRadius+" "+this.pieRadius+" 0 "+y+" 1"+this.pieRadius*Math.sin(v)+" "+-this.pieRadius*Math.cos(v)+" z",S="M 0 0 0 "+-this.hoverPieRadius+" A "+this.hoverPieRadius+" "+this.hoverPieRadius+" 0 "+y+" 1"+this.hoverPieRadius*Math.sin(v)+" "+-this.hoverPieRadius*Math.cos(v)+" z",P=2*this.pieRadius/3*Math.sin(d+v/2),C=2*-this.pieRadius/3*Math.cos(d+v/2),w=(Math.round(1e4*m)/100).toString()+"%",D={perc:m,name:p.name,color:p.color,hoverD:S,rotation:"rotate("+l+"deg)",d:f,hover:!1,toolTipTranslate:"translate("+P+"px, "+C+"px)",toolTipText:w};0===this.pieSlicesInit?this.pieSlices.push(D):this.pieSlices[c]=D,d=(l+=x)*Math.PI/180,c++}}catch(b){n={error:b}}finally{try{u&&!u.done&&(a=g["return"])&&a.call(g)}finally{if(n)throw n.error}}},t.prototype.setDimensions=function(){if(this.width)this.height=.6*this.width-this.xPadding;else{var t=this.currentElement.nativeElement;if(null!=t.parentNode){var e=t.parentNode.getBoundingClientRect();this.width=e.width,this.height=.6*this.width-this.xPadding}}},t.prototype.setColors=function(){var t,e,i=0;try{for(var n=r(this.data),a=n.next();!a.done;a=n.next()){var s=a.value;s.color||(this.customColorScheme.length>0?s.color=this.customColorScheme[i%this.customColorScheme.length]:s.color=h[this.colorScheme][i%10]),i++}}catch(o){t={error:o}}finally{try{a&&!a.done&&(e=n["return"])&&e.call(n)}finally{if(t)throw t.error}}},t.prototype.ngOnInit=function(){var t=this;this.data=JSON.parse(JSON.stringify(this.data)),this.componentID=this.globalParametersService.addNewComponent(),this.setDimensions(),this.data.sort(function(t,e){return t.value>e.value?-1:t.value<e.value?1:0}),this.setColors(),this.pieSlicesInit=0,this.pieChartService.setValues({componentID:this.componentID,width:this.width,height:this.height,xPadding:this.xPadding,yPadding:this.yPadding,data:this.data}),this.pieRadius=this.pieChartService.pieRadius,this.hoverPieRadius=1.05*this.pieChartService.pieRadius;var e=0,i=setInterval(function(){t.generatePieSlices(e),t.pieSlicesInit=1,e+=.01,(e=Math.round(100*e)/100)>1&&clearInterval(i)},5);this.cX=this.xPadding+this.pieRadius,this.cY=this.yPadding+this.pieRadius;var n=this.xPadding+this.pieRadius,r=this.yPadding+this.pieRadius;this.gTranslate="translate("+n+"px, "+r+"px)";var a=.08*this.pieRadius;this.hoverTranslate="translate("+a+"px, "+-a+"px)"},t.prototype.ngOnChanges=function(){var t=this;this.data=JSON.parse(JSON.stringify(this.data)),this.setDimensions(),this.data.sort(function(t,e){return t.value>e.value?-1:t.value<e.value?1:0}),this.setColors(),this.pieSlicesInit=0,this.pieChartService.setValues({componentID:this.componentID,width:this.width,height:this.height,xPadding:this.xPadding,yPadding:this.yPadding,data:this.data}),this.pieRadius=this.pieChartService.pieRadius,this.hoverPieRadius=1.05*this.pieChartService.pieRadius;var e=0,i=setInterval(function(){t.generatePieSlices(e),t.pieSlicesInit=1,e+=.01,(e=Math.round(100*e)/100)>1&&clearInterval(i)},5);this.cX=this.xPadding+this.pieRadius,this.cY=this.yPadding+this.pieRadius;var n=this.xPadding+this.pieRadius,r=this.yPadding+this.pieRadius;this.gTranslate="translate("+n+"px, "+r+"px)";var a=.08*this.pieRadius;this.hoverTranslate="translate("+a+"px, "+-a+"px)"},t.decorators=[{type:e.Component,args:[{selector:"ngx-pie-chart",template:'<svg [attr.width]="width" [attr.height]="height" version="1.1" xmlns="http://www.w3.org/2000/svg">\n\n  <g ngx-pie-chart-base />\n  <g *ngFor="let pieSlice of pieSlices">\n    <g id="component" [ngStyle]="{\'transform\': gTranslate}">\n      <g class="pie-g" [ngStyle]="{\'transform\': pieSlice.rotation, \'position\': \'relative\'}">\n        <path class="pie-slice" (mouseover)="pieSlice.hover=true" (mouseout)="pieSlice.hover=false"\n        [ngStyle]="{\'opacity\': pieSlice.hover ? 0.7 : 1.0}"\n        [attr.d]="pieSlice.hover ? pieSlice.hoverD : pieSlice.d" [attr.fill]="pieSlice.color" />\n      </g>\n      <g class="tooltip" [ngStyle]="{\'transform\': pieSlice.toolTipTranslate}" \n      opacity="0.9">\n        <rect rx="5" width="70" height="25"></rect>\n        <text x="15" y="16">{{ pieSlice.toolTipText }}</text>\n      </g>\n    </g>\n  </g>\n  \n</svg>\n\n\x3c!-- \'transform\': pieSlice.hover ? hoverTranslate + \' \' + pieSlice.rotation : pieSlice.rotation, --\x3e',providers:[P],styles:[".pie-slice{transition:.3s ease-in}#component .tooltip{visibility:hidden;position:relative!important}#component:hover .tooltip{visibility:visible;position:absolute;z-index:9999999!important}#component:hover:after .tooltip{position:relative;left:0;top:100%;white-space:nowrap;z-index:9999999!important}.tooltip text{fill:#eee;font-size:12px;font-family:sans-serif;z-index:9999999!important}.tooltip rect{fill:#222;stroke:#111;z-index:9999998!important}"]}]}],t.ctorParameters=function(){return[{type:P},{type:o},{type:e.ElementRef}]},t.propDecorators={data:[{type:e.Input}],width:[{type:e.Input}],colorScheme:[{type:e.Input}],customColorScheme:[{type:e.Input}]},t}(),w=function(){function t(t){this.pieChartService=t}return t.prototype.computeLegionXs=function(){this.x1=this.pieChartService.rectWidth+2*this.pieChartService.xPadding+this.pieChartService.legionWidth/4*.2,this.x2=this.pieChartService.rectHeight+2*this.pieChartService.xPadding+this.pieChartService.legionWidth/4*.8},t.prototype.computeLegionPath=function(t){var e="M ",i=this.pieChartService.yPadding+25+30*t;return e=e+this.x1+" "+i+" "+this.x2+" "+i},t.prototype.ngOnInit=function(){this.computeLegionXs()},t.prototype.ngOnChanges=function(){this.computeLegionXs()},t.decorators=[{type:e.Component,args:[{selector:"g[ngx-pie-chart-base]",template:'\x3c!-- Legion --\x3e\n<svg:rect [attr.x]="2*pieChartService.xPadding + pieChartService.rectWidth" \n[attr.y]="pieChartService.yPadding" \n[attr.width]="pieChartService.legionWidth" \n[attr.height]="pieChartService.legionHeight" \nfill="#f1f1f1" />\n\n\n<svg:g *ngFor="let x of pieChartService.data; index as i">\n    <svg:path class="legion-line" [attr.d]="computeLegionPath(i)" fill="none" [attr.stroke]="x.color" />\n    <svg:text class="axis-text" \n    [attr.x]="pieChartService.rectWidth + 2*pieChartService.xPadding + pieChartService.legionWidth / 4" \n    [attr.y]="pieChartService.yPadding+30+30*i" class="small"> {{ x.name }} </svg:text>\n</svg:g>\n',styles:[".legion-line{stroke-width:5}"]}]}],t.ctorParameters=function(){return[{type:P}]},t}(),D=function(){function t(){}return t.prototype.computeRectDimensions=function(){this.rectWidth=.6*this.width-2*this.xPadding,this.rectHeight=this.rectWidth},t.prototype.computeLegionDimensions=function(){var t=this.data.length;this.legionWidth=.4*this.width-2*this.xPadding,this.legionHeight=60+30*t-19},t.prototype.setValues=function(t){var e=t.componentID,i=t.width,n=t.height,r=t.xPadding,a=t.yPadding,s=t.data;this.componentID=e,this.width=i,this.height=n,this.xPadding=r,this.yPadding=a,this.data=s,this.donutRadius=(.6*this.width-2*this.xPadding)/2,this.computeRectDimensions(),this.computeLegionDimensions()},t.prototype.printAll=function(){console.log("line-graph-service"),console.log("component ID: "+this.componentID),console.log("width: "+this.width),console.log("height: "+this.height),console.log("xPadding: "+this.xPadding),console.log("yPadding: "+this.yPadding),console.log("rectWidth: "+this.rectWidth),console.log("rectHeight: "+this.rectHeight)},t}(),I=function(){function t(t,e,i){this.donutChartService=t,this.globalParametersService=e,this.currentElement=i,this.colorScheme="colorful",this.customColorScheme=[],this.xPadding=60,this.yPadding=this.xPadding/2,this.donutWidthPerc=.4,this.donutSlicesInit=0}return t.prototype.generateDonutSlices=function(t){var e,i,n,a;0===this.donutSlicesInit&&(this.donutSlices=[]);var s=0;try{for(var h=r(this.data),o=h.next();!o.done;o=h.next()){s+=(u=o.value).value}}catch(P){e={error:P}}finally{try{o&&!o.done&&(i=h["return"])&&i.call(h)}finally{if(e)throw e.error}}var l=0,d=0;try{for(var c=r(this.data),g=c.next();!g.done;g=c.next()){var u,p=(u=g.value).value/s*t,m=360*p,x=m*Math.PI/180,v=m>180?1:0,y="M 0 "+-this.donutInnerRadius+" 0 "+-this.donutRadius+" A "+this.donutRadius+" "+this.donutRadius+" 0 "+v+" 1"+this.donutRadius*Math.sin(x)+" "+-this.donutRadius*Math.cos(x)+" L "+this.donutInnerRadius*Math.sin(x)+" "+-this.donutInnerRadius*Math.cos(x)+" A "+this.donutInnerRadius+" "+this.donutInnerRadius+" 0 "+v+" 0 0 "+-this.donutInnerRadius+" z",f="M 0 "+-this.hoverDonutInnerRadius+" 0 "+-this.hoverDonutRadius+" A "+this.hoverDonutRadius+" "+this.hoverDonutRadius+" 0 "+v+" 1"+this.hoverDonutRadius*Math.sin(x)+" "+-this.hoverDonutRadius*Math.cos(x)+" L "+this.hoverDonutInnerRadius*Math.sin(x)+" "+-this.hoverDonutInnerRadius*Math.cos(x)+" A "+this.hoverDonutInnerRadius+" "+this.hoverDonutInnerRadius+" 0 "+v+" 0 0 "+-this.hoverDonutInnerRadius+" z",S={perc:p,name:u.name,color:u.color,hoverD:f,rotation:"rotate("+l+"deg)",d:y,hover:!1};0===this.donutSlicesInit?this.donutSlices.push(S):this.donutSlices[d]=S,l+=m,d++}}catch(C){n={error:C}}finally{try{g&&!g.done&&(a=c["return"])&&a.call(c)}finally{if(n)throw n.error}}},t.prototype.setDimensions=function(){if(this.width)this.height=.6*this.width-this.xPadding;else{var t=this.currentElement.nativeElement;if(null!=t.parentNode){var e=t.parentNode.getBoundingClientRect();this.width=e.width,this.height=.6*this.width-this.xPadding}}},t.prototype.setColors=function(){var t,e,i=0;try{for(var n=r(this.data),a=n.next();!a.done;a=n.next()){var s=a.value;s.color||(this.customColorScheme.length>0?s.color=this.customColorScheme[i%this.customColorScheme.length]:s.color=h[this.colorScheme][i%10],i++)}}catch(o){t={error:o}}finally{try{a&&!a.done&&(e=n["return"])&&e.call(n)}finally{if(t)throw t.error}}},t.prototype.ngOnInit=function(){var t=this;this.data=JSON.parse(JSON.stringify(this.data)),this.componentID=this.globalParametersService.addNewComponent(),this.setDimensions(),this.data.sort(function(t,e){return t.value>e.value?-1:t.value<e.value?1:0}),this.setColors(),this.donutChartService.setValues({componentID:this.componentID,width:this.width,height:this.height,xPadding:this.xPadding,yPadding:this.yPadding,data:this.data}),this.donutRadius=this.donutChartService.donutRadius,this.donutInnerRadius=(1-this.donutWidthPerc)*this.donutChartService.donutRadius,this.hoverDonutRadius=1.05*this.donutChartService.donutRadius,this.hoverDonutInnerRadius=this.donutInnerRadius;var e=0,i=setInterval(function(){t.generateDonutSlices(e),t.donutSlicesInit=1,e+=.01,(e=Math.round(100*e)/100)>1&&clearInterval(i)},5);this.cX=this.xPadding+this.donutRadius,this.cY=this.yPadding+this.donutRadius;var n=this.xPadding+this.donutRadius,r=this.yPadding+this.donutRadius;this.gTranslate="translate("+n+"px, "+r+"px)";var a=.08*this.donutRadius;this.hoverTranslate="translate("+a+"px, "+-a+"px)"},t.prototype.ngOnChanges=function(){var t=this;this.data=JSON.parse(JSON.stringify(this.data)),this.setDimensions(),this.data.sort(function(t,e){return t.value>e.value?-1:t.value<e.value?1:0}),this.setColors(),this.donutChartService.setValues({componentID:this.componentID,width:this.width,height:this.height,xPadding:this.xPadding,yPadding:this.yPadding,data:this.data}),this.donutRadius=this.donutChartService.donutRadius,this.donutInnerRadius=(1-this.donutWidthPerc)*this.donutChartService.donutRadius,this.hoverDonutRadius=1.05*this.donutChartService.donutRadius,this.hoverDonutInnerRadius=this.donutInnerRadius;var e=0,i=setInterval(function(){t.generateDonutSlices(e),t.donutSlicesInit=1,e+=.01,(e=Math.round(100*e)/100)>1&&clearInterval(i)},5);this.cX=this.xPadding+this.donutRadius,this.cY=this.yPadding+this.donutRadius;var n=this.xPadding+this.donutRadius,r=this.yPadding+this.donutRadius;this.gTranslate="translate("+n+"px, "+r+"px)";var a=.08*this.donutRadius;this.hoverTranslate="translate("+a+"px, "+-a+"px)"},t.decorators=[{type:e.Component,args:[{selector:"ngx-donut-chart",template:'<svg [attr.width]="width" [attr.height]="height" version="1.1" xmlns="http://www.w3.org/2000/svg">\n\n  <g ngx-donut-chart-base />\n  <g *ngFor="let donutSlice of donutSlices">\n    <g [ngStyle]="{\'transform\': gTranslate}">\n      <path class="donut-slice" (mouseover)="donutSlice.hover=true" (mouseout)="donutSlice.hover=false"\n      [ngStyle]="{\'opacity\': donutSlice.hover ? 0.7 : 1.0, \'transform\': donutSlice.rotation}"\n        [attr.d]="donutSlice.hover ? donutSlice.hoverD : donutSlice.d" [attr.fill]="donutSlice.color" />\n      <text class="donut-text" [ngStyle]="{\'display\': donutSlice.hover ? \'block\' : \'none\'}" \n      x="0" y="0" class="small"\n      text-anchor="middle" dominant-baseline="middle">\n        <tspan x="0" dy="0em">{{ donutSlice.name }}</tspan>\n        <tspan x="0" dy="1.2em">{{ donutSlice.perc * 100 | number: \'1.0-2\'  }}%</tspan>\n      </text>\n    </g>\n  </g>\n\n</svg>',providers:[D],styles:[".donut-slice{transition:.3s ease-in}"]}]}],t.ctorParameters=function(){return[{type:D},{type:o},{type:e.ElementRef}]},t.propDecorators={data:[{type:e.Input}],width:[{type:e.Input}],colorScheme:[{type:e.Input}],customColorScheme:[{type:e.Input}]},t}(),b=function(){function t(t){this.donutChartService=t}return t.prototype.computeLegionXs=function(){this.x1=this.donutChartService.rectWidth+2*this.donutChartService.xPadding+this.donutChartService.legionWidth/4*.2,this.x2=this.donutChartService.rectHeight+2*this.donutChartService.xPadding+this.donutChartService.legionWidth/4*.8},t.prototype.computeLegionPath=function(t){var e="M ",i=this.donutChartService.yPadding+25+30*t;return e=e+this.x1+" "+i+" "+this.x2+" "+i},t.prototype.ngOnInit=function(){this.computeLegionXs()},t.prototype.ngOnChanges=function(){this.computeLegionXs()},t.decorators=[{type:e.Component,args:[{selector:"g[ngx-donut-chart-base]",template:'\x3c!-- Legion --\x3e\n<svg:rect [attr.x]="2*donutChartService.xPadding + donutChartService.rectWidth" \n[attr.y]="donutChartService.yPadding" \n[attr.width]="donutChartService.legionWidth" \n[attr.height]="donutChartService.legionHeight" \nfill="#f1f1f1" />\n\n\n<svg:g *ngFor="let x of donutChartService.data; index as i">\n    <svg:path class="legion-line" [attr.d]="computeLegionPath(i)" fill="none" [attr.stroke]="x.color" />\n    <svg:text class="axis-text" \n    [attr.x]="donutChartService.rectWidth + 2*donutChartService.xPadding + donutChartService.legionWidth / 4" \n    [attr.y]="donutChartService.yPadding+30+30*i" class="small"> {{ x.name }} </svg:text>\n</svg:g>\n',styles:[".legion-line{stroke-width:5}"]}]}],t.ctorParameters=function(){return[{type:D}]},t}(),M=function(){function t(){}return t.prototype.computeRectDimensions=function(){this.rectWidth=this.width-2*this.xPadding,this.rectHeight=this.rectWidth},t.prototype.setValues=function(t){var e=t.componentID,i=t.width,n=t.height,r=t.xPadding,a=t.yPadding,s=t.data;this.componentID=e,this.width=i,this.height=n,this.xPadding=r,this.yPadding=a,this.data=s,this.sunRadius=(this.width-2*this.xPadding)/2,this.computeRectDimensions()},t.prototype.printAll=function(){console.log("line-graph-service"),console.log("component ID: "+this.componentID),console.log("width: "+this.width),console.log("height: "+this.height),console.log("xPadding: "+this.xPadding),console.log("yPadding: "+this.yPadding),console.log("rectWidth: "+this.rectWidth),console.log("rectHeight: "+this.rectHeight)},t}(),Y=function(){function t(t,e,i){this.sunburstChartService=t,this.globalParametersService=e,this.currentElement=i,this.colorScheme="colorful",this.customColorScheme=[],this.xPadding=60,this.yPadding=this.xPadding/2,this.sunDepth=0}return t.prototype.getRefinedData=function(t,e,i){var n,a;void 0===i&&(i=null);try{for(var s=r(t),h=s.next();!h.done;h=s.next()){var o=h.value;o.level=e,i&&!o.color&&(o.color=i),o.level>this.sunDepth&&(this.sunDepth=o.level),o.children&&o.children.length>0?(o.children=this.getRefinedData(o.children,e+1,o.color),o.value=o.children.map(function(t){return t.value}).reduce(function(t,e){return t+e})):o.value||(o.value=0)}}catch(l){n={error:l}}finally{try{h&&!h.done&&(a=s["return"])&&a.call(s)}finally{if(n)throw n.error}}return t},t.prototype.setDimensions=function(){if(this.width)this.height=this.width-this.xPadding;else{var t=this.currentElement.nativeElement;if(null!=t.parentNode){var e=t.parentNode.getBoundingClientRect();this.width=e.width,this.height=this.width-this.xPadding}}},t.prototype.generateSlice=function(t,e,i,n){var r,a,s=t.value/e,h=i*s,o=h*Math.PI/180,l=h>180?1:0,d=(270+h/2)%360,c=(t.level-1)*this.sunSliceWidth+this.sunSliceWidth/2,g="rotate("+d+"deg)";n>180&&(g=g+" scale(-1,-1) translateX("+-(2*c)+"px)");if(1===t.level){r="M 0 0 0 "+-this.sunSliceWidth+" A "+this.sunSliceWidth+" "+this.sunSliceWidth+" 0 "+l+" 1 "+this.sunSliceWidth*Math.sin(o)+" "+-this.sunSliceWidth*Math.cos(o)+" z";var u=1.1*this.sunSliceWidth;a="M 0 0 0 "+-u+" A "+u+" "+u+" 0 "+l+" 1 "+u*Math.sin(o)+" "+-u*Math.cos(o)+" z"}else if(t.level>1){var p=this.sunRadius/this.sunDepth*(t.level-1),m=this.sunRadius/this.sunDepth*t.level;r="M 0 "+-p+" 0 "+-m+" A "+m+" "+m+" 0 "+l+" 1 "+m*Math.sin(o)+" "+-m*Math.cos(o)+" L "+p*Math.sin(o)+" "+-p*Math.cos(o)+" A "+p+" "+p+" 0 "+l+" 0 0 "+-p+" z";var x=m+.1*this.sunSliceWidth;a="M 0 "+-p+" 0 "+-x+" A "+x+" "+x+" 0 "+l+" 1 "+x*Math.sin(o)+" "+-x*Math.cos(o)+" L "+p*Math.sin(o)+" "+-p*Math.cos(o)+" A "+p+" "+p+" 0 "+l+" 0 0 "+-p+" z"}var v={perc:s,name:t.name,color:t.color,hoverD:a,rotation:"rotate("+n+"deg)",textRotation:g,textX:c,d:r,angle:h,hover:!1,children:null};return this.levelSunSlices[t.level-1].push(v),v},t.prototype.generateSunSlicesForAngle=function(t,e,i){var n,a,s,h,o=[],l=0;try{for(var d=r(t),c=d.next();!c.done;c=d.next()){l+=(p=c.value).value}}catch(x){n={error:x}}finally{try{c&&!c.done&&(a=d["return"])&&a.call(d)}finally{if(n)throw n.error}}try{for(var g=r(t),u=g.next();!u.done;u=g.next()){var p=u.value,m=this.generateSlice(p,l,e,i);p.children&&p.children.length>0&&(m.children=this.generateSunSlicesForAngle(p.children,m.angle,i)),o.push(m),i+=m.angle}}catch(v){s={error:v}}finally{try{u&&!u.done&&(h=g["return"])&&h.call(g)}finally{if(s)throw s.error}}return o},t.prototype.generateSunSlices=function(t){return this.generateSunSlicesForAngle(t,360,0)},t.prototype.initiateLevelSunSlices=function(){this.levelSunSlices=[];for(var t=1;t<=this.sunDepth;t++)this.levelSunSlices.push([])},t.prototype.setColors=function(){var t,e,i=0;try{for(var n=r(this.data),a=n.next();!a.done;a=n.next()){var s=a.value;s.color||(this.customColorScheme.length>0?s.color=this.customColorScheme[i%this.customColorScheme.length]:s.color=h[this.colorScheme][i%10],i++)}}catch(o){t={error:o}}finally{try{a&&!a.done&&(e=n["return"])&&e.call(n)}finally{if(t)throw t.error}}},t.prototype.ngOnInit=function(){this.componentID=this.globalParametersService.addNewComponent(),this.setColors(),this.setDimensions(),this.sunburstChartService.setValues({componentID:this.componentID,width:this.width,height:this.height,xPadding:this.xPadding,yPadding:this.yPadding,data:this.data}),this.sunRadius=this.sunburstChartService.sunRadius,this.dataRefined=this.getRefinedData(this.data,1),this.initiateLevelSunSlices(),this.sunSliceWidth=this.sunRadius/this.sunDepth,this.sunSlices=this.generateSunSlices(this.dataRefined),this.cX=this.xPadding+this.sunRadius,this.cY=this.yPadding+this.sunRadius;var t=this.xPadding+this.sunRadius,e=this.yPadding+this.sunRadius;this.gTranslate="translate("+t+"px, "+e+"px)";var i=.08*this.sunRadius;this.hoverTranslate="translate("+i+"px, "+-i+"px)"},t.prototype.ngOnChanges=function(){this.setColors(),this.setDimensions(),this.sunburstChartService.setValues({componentID:this.componentID,width:this.width,height:this.height,xPadding:this.xPadding,yPadding:this.yPadding,data:this.data}),this.sunRadius=this.sunburstChartService.sunRadius,this.dataRefined=this.getRefinedData(this.data,1),this.initiateLevelSunSlices(),this.sunSliceWidth=this.sunRadius/this.sunDepth,this.sunSlices=this.generateSunSlices(this.dataRefined),this.cX=this.xPadding+this.sunRadius,this.cY=this.yPadding+this.sunRadius;var t=this.xPadding+this.sunRadius,e=this.yPadding+this.sunRadius;this.gTranslate="translate("+t+"px, "+e+"px)";var i=.08*this.sunRadius;this.hoverTranslate="translate("+i+"px, "+-i+"px)"},t.decorators=[{type:e.Component,args:[{selector:"ngx-sunburst-chart",template:'<svg [attr.width]="width" [attr.height]="height" version="1.1" xmlns="http://www.w3.org/2000/svg">\n\n  <g *ngFor="let level of levelSunSlices">\n    <g *ngFor="let slice of level">\n      <g [ngStyle]="{\'transform\': gTranslate + \' \' + slice.rotation}">\n        <path class="sun-slice" (mouseover)="slice.hover=true" (mouseout)="slice.hover=false"\n        [ngStyle]="{\'opacity\': slice.hover ? 0.7 : 1.0}"\n          [attr.d]="slice.hover ? slice.hoverD : slice.d" [attr.fill]="slice.color" />\n      <text class="slice-text" [attr.x]="slice.textX" \n      [attr.y]="0" dominant-baseline="middle" text-anchor="middle" [ngStyle]="{\'transform\': slice.textRotation}"> \n        {{ slice.name }} \n      </text>\n      </g>\n    </g>\n  </g>\n</svg>\n',providers:[M],styles:[".sun-slice{transition:.3s ease-in;stroke:#fff;stroke-width:.5}.slice-text{color:#fff}"]}]}],t.ctorParameters=function(){return[{type:M},{type:o},{type:e.ElementRef}]},t.propDecorators={data:[{type:e.Input}],width:[{type:e.Input}],colorScheme:[{type:e.Input}],customColorScheme:[{type:e.Input}]},t}(),W=function(){function t(){this.monthNames=["January","February","March","April","May","June","July","August","September","October","November","December"]}return t.prototype.computeRectDimensions=function(){this.rectWidth=this.width-2*this.xPadding-150,this.rectHeight=60*this.ganttPhases.length},t.prototype.computeLegionDimensions=function(){var t=Math.ceil(this.data.length/3);this.legionWidth=this.width-2*this.xPadding-150,this.legionHeight=40+40*t},t.prototype.transformX=function(t){return this.rectWidth*t/(this.maxX-this.minX)},t.prototype.computeLegion=function(){var t=Math.ceil(this.data.length/3);this.legion=[];for(var e=0,i=0;i<t;i++){for(var n=[],r=0;r<3;r++)this.ganttTeams[e]&&n.push(this.ganttTeams[e]),e++;this.legion.push(n)}},t.prototype.transformGanttDate=function(t){var e=Math.round(Math.abs((new Date(t).getTime()-new Date(this.ganttMinDate).getTime())/864e5));return this.rectWidth*e/(this.maxX-this.minX)},t.prototype.closestMultipleLessThanEqualTo=function(t,e){return e%t==0?e:this.closestMultipleLessThanEqualTo(t,e-1)},t.prototype.closestMultipleMoreThanEqualTo=function(t,e){return e%t==0?e:this.closestMultipleMoreThanEqualTo(t,e+1)},t.prototype.setValues=function(t){var e,i,n,a,s,h,o=t.componentID,l=t.width,d=t.xPadding,c=t.yPadding,g=t.data;this.componentID=o,this.width=l,this.xPadding=d,this.yPadding=c,this.data=g;var u=[],p=[],m=new Set;this.ganttTeams=[];try{for(var x=r(this.data),v=x.next();!v.done;v=x.next()){var y=v.value;this.ganttTeams.push({name:y.name,color:y.color});try{for(var f=r(Object.keys(y.timelines)),S=f.next();!S.done;S=f.next()){var P=S.value;m.add(P);try{for(var C=r(y.timelines[P]),w=C.next();!w.done;w=C.next()){var D=w.value;u.push(D.from),p.push(D.to)}}catch(R){s={error:R}}finally{try{w&&!w.done&&(h=C["return"])&&h.call(C)}finally{if(s)throw s.error}}}}catch(L){n={error:L}}finally{try{S&&!S.done&&(a=f["return"])&&a.call(f)}finally{if(n)throw n.error}}}}catch(T){e={error:T}}finally{try{v&&!v.done&&(i=x["return"])&&i.call(x)}finally{if(e)throw e.error}}this.ganttPhases=Array.from(m);var I=u.reduce(function(t,e){return new Date(t)<new Date(e)?t:e}),b=p.reduce(function(t,e){return new Date(t)>new Date(e)?t:e});this.ganttMinDate=I,this.ganttMaxDate=b;var M=Math.ceil(this.data.length/3);this.height=60*this.ganttPhases.length+3*this.yPadding+100+40+30*M;this.ganttDateRange=Math.round(Math.abs((new Date(this.ganttMaxDate).getTime()-new Date(this.ganttMinDate).getTime())/864e5)),this.minX=0;for(var Y=0,W=1;0===Y;){if(this.ganttDateRange<=90*W){Y=1;break}W+=1}this.maxX=this.closestMultipleMoreThanEqualTo(7*W,this.ganttDateRange),this.ganttMaxDate=this.addDays(this.ganttMinDate,this.maxX),this.computeRectDimensions(),this.computeLegionDimensions(),this.computeLegion()},t.prototype.addDays=function(t,e){var i=new Date(t);i.setDate(new Date(t).getDate()+e);var n=i.getDate(),r=i.getMonth(),a=i.getFullYear();return this.monthNames[r]+" "+n+", "+a},t.prototype.printAll=function(){console.log("line-graph-service"),console.log("component ID: "+this.componentID),console.log("width: "+this.width),console.log("height: "+this.height),console.log("xPadding: "+this.xPadding),console.log("yPadding: "+this.yPadding),console.log("rectWidth: "+this.rectWidth),console.log("rectHeight: "+this.rectHeight)},t}(),R=function(){function t(t,e,i){this.ganttChartService=t,this.globalParametersService=e,this.currentElement=i,this.colorScheme="colorful",this.customColorScheme=[],this.xPadding=60,this.yPadding=this.xPadding/2}return t.prototype.setDimensions=function(){if(this.width)this.height=this.width-this.xPadding;else{var t=this.currentElement.nativeElement;if(null!=t.parentNode){var e=t.parentNode.getBoundingClientRect();this.width=e.width,this.height=this.width-this.xPadding}}},t.prototype.setColors=function(){var t,e,i=0;try{for(var n=r(this.data),a=n.next();!a.done;a=n.next()){var s=a.value;s.color||(this.customColorScheme.length>0?s.color=this.customColorScheme[i%this.customColorScheme.length]:s.color=h[this.colorScheme][i%10],i++)}}catch(o){t={error:o}}finally{try{a&&!a.done&&(e=n["return"])&&e.call(n)}finally{if(t)throw t.error}}},t.prototype.definePhaseTimelines=function(){var t,e,i,n,a,s,h,o;this.phaseTimelines={};try{for(var l=r(this.ganttChartService.ganttPhases),d=l.next();!d.done;d=l.next()){var c=d.value;this.phaseTimelines[c]=[]}}catch(S){t={error:S}}finally{try{d&&!d.done&&(e=l["return"])&&e.call(l)}finally{if(t)throw t.error}}try{for(var g=r(this.ganttChartService.data),u=g.next();!u.done;u=g.next()){var p=u.value;try{for(var m=r(Object.keys(p.timelines)),x=m.next();!x.done;x=m.next()){c=x.value;try{for(var v=r(p.timelines[c]),y=v.next();!y.done;y=v.next()){var f=y.value;this.phaseTimelines[c].push({from:f.from,to:f.to,color:p.color,info:f.info,toolTip:f.info?"block":"none"})}}catch(P){h={error:P}}finally{try{y&&!y.done&&(o=v["return"])&&o.call(v)}finally{if(h)throw h.error}}}}catch(C){a={error:C}}finally{try{x&&!x.done&&(s=m["return"])&&s.call(m)}finally{if(a)throw a.error}}}}catch(w){i={error:w}}finally{try{u&&!u.done&&(n=g["return"])&&n.call(g)}finally{if(i)throw i.error}}},t.prototype.ngOnInit=function(){this.componentID=this.globalParametersService.addNewComponent(),this.setDimensions(),this.setColors(),this.ganttChartService.setValues({componentID:this.componentID,width:this.width,xPadding:this.xPadding,yPadding:this.yPadding,data:this.data}),this.height=this.ganttChartService.height,this.definePhaseTimelines()},t.prototype.ngOnChanges=function(){this.setDimensions(),this.setColors(),this.ganttChartService.setValues({componentID:this.componentID,width:this.width,xPadding:this.xPadding,yPadding:this.yPadding,data:this.data}),this.height=this.ganttChartService.height,this.definePhaseTimelines()},t.decorators=[{type:e.Component,args:[{selector:"ngx-gantt-chart",template:'<svg [attr.width]="width" [attr.height]="height" version="1.1" xmlns="http://www.w3.org/2000/svg">\n  <g ngx-gc-chart-base />\n  <g *ngFor="let phase of ganttChartService.ganttPhases; index as i">\n    <g id="component" *ngFor="let ganttEntry of phaseTimelines[phase]; index as j">\n        <rect class="gantt-entry"\n        [attr.x]="xPadding + 150 + ganttChartService.transformGanttDate(ganttEntry.from)" \n        [attr.y]="i * 60 + yPadding + 20" \n        [attr.width]="ganttChartService.transformGanttDate(ganttEntry.to) - ganttChartService.transformGanttDate(ganttEntry.from)" \n        [attr.height]="20" \n        rx="6" ry="6"\n        [attr.fill]="ganttEntry.color" />\n\n        \x3c!-- [attr.x]="x + 150 + ganttChartService.transformGanttDate(ganttEntry.from)" \n        [attr.y]="i * 60 + y + 20"  --\x3e\n        <g class="tooltip" [ngStyle]="{\n          \'transform\': \'translate(\' + (xPadding + 150 + ganttChartService.transformGanttDate(ganttEntry.to) - ((ganttChartService.transformGanttDate(ganttEntry.to) - ganttChartService.transformGanttDate(ganttEntry.from)) / 2)) + \'px, \' + (i * 60 + yPadding - 5) + \'px)\',\n          \'display\': ganttEntry.toolTip}" \n        opacity="0.9">\n          <rect rx="5" width="200" height="25"></rect>\n          <text x="15" y="16">{{ ganttEntry.info }}</text>\n          </g>\n    </g>\n  </g>\n</svg>',providers:[W],styles:[".gantt-entry{opacity:.8}.gantt-entry:hover{opacity:1}#component .tooltip{visibility:hidden}#component:hover .tooltip{visibility:visible;position:absolute}#component:hover:after .tooltip{position:relative;left:0;top:100%;white-space:nowrap}.tooltip text{fill:#eee;font-size:12px;font-family:sans-serif}.tooltip rect{fill:#222;stroke:#111}"]}]}],t.ctorParameters=function(){return[{type:W},{type:o},{type:e.ElementRef}]},t.propDecorators={data:[{type:e.Input}],width:[{type:e.Input}],colorScheme:[{type:e.Input}],customColorScheme:[{type:e.Input}]},t}(),L=function(){function t(t){this.ganttChartService=t,this.monthNames=["January","February","March","April","May","June","July","August","September","October","November","December"]}return t.prototype.addDays=function(t,e){var i=new Date(t);i.setDate(new Date(t).getDate()+e);var n=i.getDate(),r=i.getMonth(),a=i.getFullYear();return this.monthNames[r]+" "+n+", "+a},t.prototype.shortenDate=function(t){return t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=t.replace("January","Jan")).replace("February","Feb")).replace("March","Mar")).replace("April","Apr")).replace("May","May")).replace("June","Jun")).replace("July","Jul")).replace("August","Aug")).replace("September","Sep")).replace("October","Oct")).replace("November","Nov")).replace("December","Dec")},t.prototype.computeGrid=function(){for(var t,e,i=0,n=1;0===i;)this.ganttChartService.ganttDateRange<=90*n?(this.gridPrecisionX=7*n,i=1):n+=1;this.gridWidthX=this.ganttChartService.transformX(this.gridPrecisionX),this.gridWidthY=this.ganttChartService.rectHeight/this.ganttChartService.ganttPhases.length,this.gridPath="M "+this.gridWidthX+" 0 L 0 0 0 "+this.gridWidthY,this.xAxis=[],this.yAxis=[];for(var a=this.ganttChartService.ganttMinDate,s=this.ganttChartService.rectHeight+this.ganttChartService.yPadding+10;new Date(a)<=new Date(this.ganttChartService.ganttMaxDate);){var h=this.ganttChartService.transformGanttDate(a)+this.ganttChartService.xPadding+150,o="translate("+h+"px, "+s+"px)";this.xAxis.push({xPos:h,value:this.shortenDate(a),transform:o}),a=this.addDays(a,this.gridPrecisionX)}var l=0;try{for(var d=r(this.ganttChartService.ganttPhases),c=d.next();!c.done;c=d.next()){var g=c.value,u=this.gridWidthY*l+.5*this.gridWidthY+this.ganttChartService.yPadding;this.yAxis.push({yPos:u,value:g}),l++}}catch(p){t={error:p}}finally{try{c&&!c.done&&(e=d["return"])&&e.call(d)}finally{if(t)throw t.error}}},t.prototype.ngOnInit=function(){this.computeGrid(),this.gridID="grid"+this.ganttChartService.componentID},t.prototype.ngOnChanges=function(){this.computeGrid()},t.decorators=[{type:e.Component,args:[{selector:"g[ngx-gc-chart-base]",template:'<svg:pattern [attr.id]="gridID" \n[attr.x]="ganttChartService.xPadding + 150" [attr.y]="ganttChartService.yPadding" \n[attr.width]="gridWidthX" [attr.height]="gridWidthY" \npatternUnits="userSpaceOnUse">\n    <svg:path [attr.d]="gridPath" fill="none" stroke="#444444" stroke-width="0.5" />\n</svg:pattern>\n\n<svg:rect [attr.x]="ganttChartService.xPadding + 150" \n[attr.y]="ganttChartService.yPadding" \n[attr.width]="ganttChartService.rectWidth" \n[attr.height]="ganttChartService.rectHeight" \nstroke="#444444" [attr.fill]="\'url(#\' + gridID + \')\'" stroke-width="1"/>\n\n<svg:g *ngFor="let x of xAxis" [ngStyle]="{\'transform\': x.transform}">\n<svg:text class="x-axis-text small" text-anchor="end" dominant-baseline="middle"> {{ x.value }} </svg:text>\n</svg:g>\n\n<svg:text\n*ngFor="let y of yAxis" class="y-axis-text small" text-anchor="end"\n[attr.y]="y.yPos" [attr.x]="150+ganttChartService.xPadding-30">{{ y.value }}</svg:text>\n\n\n\x3c!-- Legion --\x3e\n<svg:rect [attr.x]="ganttChartService.xPadding + 150" \n[attr.y]="ganttChartService.yPadding * 2 + 100 + ganttChartService.rectHeight" \n[attr.width]="ganttChartService.legionWidth" \n[attr.height]="ganttChartService.legionHeight" \nfill="#f1f1f1" />\n\n\n<svg:g *ngFor="let legionLine of ganttChartService.legion; index as i">\n  <svg:g *ngFor="let legionEntry of legionLine; index as j">\n      <svg:rect *ngIf="ganttChartService.legionWidth" \n      [attr.x]="ganttChartService.xPadding + 150 + ganttChartService.legionWidth / 3 * 0.1 + ganttChartService.legionWidth / 3 * j" \n      [attr.y]="ganttChartService.yPadding * 2 + 100 + ganttChartService.rectHeight + 20 + 40*i + 10" \n      [attr.width]="ganttChartService.legionWidth / 3 * 0.2" \n      [attr.height]="20" \n      rx="6" ry="6"\n      [attr.fill]="legionEntry.color" />\n\n      \x3c!-- <svg:path class="legion-line" [attr.d]="computeLegionPath(i)" fill="none" [attr.stroke]="x.color" /> --\x3e\n      <svg:text class="axis-text" dominant-baseline="middle"\n      [attr.x]="ganttChartService.xPadding + 150 + ganttChartService.legionWidth / 3 * j + ganttChartService.legionWidth / 3 * 0.4" \n      [attr.y]="ganttChartService.yPadding * 2 + 100 + ganttChartService.rectHeight + 20 + 40*i + 20" class="small"> {{ legionEntry.name }} </svg:text>\n  </svg:g>\n</svg:g>\n',styles:[".x-axis-text{-webkit-transform:rotate(320deg);transform:rotate(320deg)}"]}]}],t.ctorParameters=function(){return[{type:W}]},t}(),T=function(){function t(){}return t.prototype.computeRectDimensions=function(){this.rectHeight=this.height-4*this.yPadding,this.rectWidth=this.width-2*this.xPadding},t.prototype.setValues=function(t){var e=t.componentID,i=t.width,n=t.height,r=t.xPadding,a=t.yPadding;this.componentID=e,this.width=i,this.height=n,this.xPadding=r,this.yPadding=a,this.computeRectDimensions()},t.prototype.printAll=function(){console.log("line-graph-service"),console.log("component ID: "+this.componentID),console.log("width: "+this.width),console.log("height: "+this.height),console.log("xPadding: "+this.xPadding),console.log("yPadding: "+this.yPadding),console.log("rectWidth: "+this.rectWidth),console.log("rectHeight: "+this.rectHeight)},t}(),A=function(){function t(t,e,i){this.timelineChartService=t,this.globalParametersService=e,this.currentElement=i,this.colorScheme="colorful",this.customColorScheme=[],this.xPadding=60,this.yPadding=this.xPadding/2,this.timeData=[]}return t.prototype.computeBarDimensions=function(){this.barWidth=.05*this.timelineChartService.rectHeight,this.barStartY=this.yPadding+this.timelineChartService.rectHeight/2-this.barWidth/2,this.barEndY=this.yPadding+this.timelineChartService.rectHeight/2+this.barWidth/2},t.prototype.setColors=function(){var t,e,i=0;try{for(var n=r(this.data),a=n.next();!a.done;a=n.next()){var s=a.value;s.color||(this.customColorScheme.length>0?s.color=this.customColorScheme[i%this.customColorScheme.length]:s.color=h[this.colorScheme][i%10],i++)}}catch(o){t={error:o}}finally{try{a&&!a.done&&(e=n["return"])&&e.call(n)}finally{if(t)throw t.error}}},t.prototype.setDimensions=function(){if(this.width&&!this.height)this.height=this.width/2;else if(!this.width&&this.height)this.width=2*this.height;else if(!this.width&&!this.height){var t=this.currentElement.nativeElement;if(null!=t.parentNode){var e=t.parentNode.getBoundingClientRect();this.width=e.width,this.height=e.width/2}}},t.prototype.textWrap=function(t,e){var i=e/10,n="\n",r=!1,a=[];do{for(var s=!1,h=i-1;h>=0;h--)if(" "===t.charAt(h)){a.push([t.slice(0,h),n].join("")),t=t.slice(h+1),s=!0;break}s||(a.push([t.slice(0,i),n].join("")),t=t.slice(i)),t.length<i&&(r=!0)}while(!r);return a.push(t),a},t.prototype.computeTimeData=function(){var t,e,i=Math.min.apply(Math,s(this.data.map(function(t){return t.time}))),n=Math.max.apply(Math,s(this.data.map(function(t){return t.time}))),a=.8*this.timelineChartService.rectWidth/(n-i);this.data.sort(function(t,e){return t.time<e.time?-1:t.time>e.time?1:0});for(var h=[],o=1;o<this.data.length;o++)h.push(this.data[o].time-this.data[o-1].time);var l=Math.min.apply(Math,s(h));this.timeBubbleRadius=Math.min(l*a*.4);var d=.8*this.timelineChartService.rectWidth/(this.data.length-1)*.25,c=.8*this.timelineChartService.rectWidth*.04;this.timeBubbleRadius>d&&(this.timeBubbleRadius=d),this.timeBubbleRadius<c&&(this.timeBubbleRadius=c),this.textBlockHeight=2*this.timelineChartService.rectHeight/16,this.timeData=[];var g=1;try{for(var u=r(this.data),p=u.next();!p.done;p=u.next()){var m=p.value,x=m.color,v=(m.time-i)*a,y={centre:{x:v,y:this.barStartY+this.barWidth/2},text:m.displayTime?m.displayTime:m.time},f={x:v,y:1===g?this.barStartY:this.barEndY},S={x:v,y:1===g?this.barStartY-this.timelineChartService.rectHeight/4:this.barEndY+this.timelineChartService.rectHeight/4},P="M "+f.x+" "+f.y+" "+S.x+" "+S.y,C={position:{x:v,y:1===g?this.barStartY-7*this.timelineChartService.rectHeight/16:this.barEndY+4*this.timelineChartService.rectHeight/16},text:this.textWrap(m.text,4*this.timeBubbleRadius)};this.timeData.push({timeBubble:y,line:P,textBlock:C,color:x}),g*=-1,0}}catch(w){t={error:w}}finally{try{p&&!p.done&&(e=u["return"])&&e.call(u)}finally{if(t)throw t.error}}},t.prototype.ngOnInit=function(){this.componentID=this.globalParametersService.addNewComponent(),this.computeBarDimensions(),this.setColors(),this.timelineChartService.setValues({componentID:this.componentID,width:this.width,height:this.height,xPadding:this.xPadding,yPadding:this.yPadding});var t=this.xPadding+.1*this.timelineChartService.rectWidth;this.gTranslate="translate("+t+"px, "+this.yPadding+"px)",this.computeBarDimensions(),this.computeTimeData()},t.prototype.ngOnChanges=function(){this.computeBarDimensions(),this.setColors(),this.timelineChartService.setValues({componentID:this.componentID,width:this.width,height:this.height,xPadding:this.xPadding,yPadding:this.yPadding});var t=this.xPadding+.1*this.timelineChartService.rectWidth;this.gTranslate="translate("+t+"px, "+this.yPadding+"px)",this.computeBarDimensions(),this.computeTimeData()},t.decorators=[{type:e.Component,args:[{selector:"ngx-timeline-chart",template:'<svg [attr.width]="width" [attr.height]="height" version="1.1" xmlns="http://www.w3.org/2000/svg">\n  <g [ngStyle]="{\'transform\': gTranslate}">\n    <rect x="0" \n    [attr.y]="barStartY" \n    [attr.width]="timelineChartService.rectWidth * .8" \n    [attr.height]="barWidth" \n    fill="grey" />\n\n    <g *ngFor="let timeDataInst of timeData">\n        <circle class="time-bubble" [attr.cx]="timeDataInst.timeBubble.centre.x" \n        [attr.cy]="timeDataInst.timeBubble.centre.y" \n        [attr.r]="timeBubbleRadius" [attr.fill]="timeDataInst.color">\n        </circle>\n\n        <text class="time-bubble-text" [attr.x]="timeDataInst.timeBubble.centre.x"\n        [attr.y]="timeDataInst.timeBubble.centre.y"\n        text-anchor="middle" dominant-baseline="middle">\n          {{ timeDataInst.timeBubble.text }}\n          \x3c!-- <tspan *ngFor="let line of timeDataInst.timeBubble.text" \n          [attr.x]="timeDataInst.timeBubble.centre.x"\n          [attr.dx]="0"\n          [attr.dy]="14">\n          {{ line }}\n        </tspan> --\x3e\n      </text>\n        \n        <path class="line-path"\n        [attr.d]="timeDataInst.line" fill="none" [attr.stroke]="timeDataInst.color" />\n\n        <text class="time-block-text" [attr.x]="timeDataInst.textBlock.position.x"\n        [attr.y]="timeDataInst.textBlock.position.y"\n        [attr.height]="textBlockHeight"\n        text-anchor="middle" dominant-baseline="middle">\n        <tspan *ngFor="let line of timeDataInst.textBlock.text" \n          [attr.x]="timeDataInst.textBlock.position.x"\n          [attr.dx]="0"\n          [attr.dy]="14">\n          {{ line }}\n        </tspan>\n        </text>\n\n      </g>\n  </g>\n</svg>\n\n',providers:[T],styles:[".time-bubble-text{font-size:12px}"]}]}],t.ctorParameters=function(){return[{type:T},{type:o},{type:e.ElementRef}]},t.propDecorators={data:[{type:e.Input}],width:[{type:e.Input}],height:[{type:e.Input}],colorScheme:[{type:e.Input}],customColorScheme:[{type:e.Input}]},t}(),X=function(){function t(){}return t.decorators=[{type:e.NgModule,args:[{declarations:[d,u,c,p,v,S,b,x,f,C,w,I,Y,L,R,A],imports:[i.BrowserModule,n.CommonModule],exports:[d,u,x,f,C,I,Y,R,A]}]}],t}();t.BeautifulChartsModule=X,t.ɵa=d,t.ɵb=l,t.ɵc=o,t.ɵd=u,t.ɵe=g,t.ɵf=c,t.ɵg=p,t.ɵh=v,t.ɵi=m,t.ɵj=S,t.ɵk=y,t.ɵl=b,t.ɵm=D,t.ɵn=x,t.ɵo=f,t.ɵp=C,t.ɵq=P,t.ɵr=w,t.ɵs=I,t.ɵt=Y,t.ɵu=M,t.ɵv=L,t.ɵw=W,t.ɵx=R,t.ɵy=A,t.ɵz=T,Object.defineProperty(t,"__esModule",{value:!0})});
//# sourceMappingURL=ngx-beautiful-charts.umd.min.js.map