Ext.define("EgCitrixDashCloud.view.Components.StackedArea",{extend:"Ext.container.Container",alias:"widget.stackedarea",ui:"boxwidget",chartStacking:"normal",chartProps:function(a,c){var b=this;var d="#e1e1e1";if(!Ext.isEmpty(c.series)){if(Ext.isEmpty(c.series[0].data)){d="transparent";}}return{chart:{type:c.chartType,renderTo:(this.chart&&this.chart.renderTo)||a,spacing:[0,10,10,10],backgroundColor:null,style:{fontFamily:"Roboto",overflow:"visible",fontWeight:"normal"},skipClone:true,plotBackgroundColor:null,styledMode:true,plotBorderWidth:0,plotShadow:false},title:{useHTML:true,text:"",verticalAlign:"top",align:"center",margin:0},credits:{enabled:false},noData:{attr:{fill:"#fff",padding:10,r:0,"stroke-width":1,stroke:"#dfdfdf",zIndex:6}},xAxis:{labels:{enabled:(!Ext.isEmpty(b.showXaxis))?b.showXaxis:true},lineColor:d,tickmarkPlacement:"on",type:"datetime",title:{enabled:false},dateTimeLabelFormats:{day:dayFormat,hour:"%H:%M"},tickWidth:0,startOnTick:false,},yAxis:{max:(c.series[0].hasOwnProperty("maxValue"))?c.series[0].maxValue:null,tickWidth:0,startOnTick:false,lineColor:d,title:{text:null},labels:{formatter:function(){return this.value;
}}},tooltip:{shared:true,xDateFormat:tooltipDateFormate,formatter:function(){var f="";f=Highcharts.dateFormat(tooltipDateFormate,new Date(this.x))+"<br/>";for(var h=0;h<this.points.length;h++){var g=this.points[h].series.name;var e=this.points[h].color;var i=this.points[h].y;if(g.match(".*\\d+.*")){g=g.replace(/[0-9]/g,"");
f+="<span style='color:"+e+"'>"+g+"</span> : "+i+"<br/>";}else{f+="<span style='color:"+e+"'>"+g+"</span> : "+i+"<br/>";}}return f;}},legend:{align:"center",verticalAlign:"top",symbolHeight:5,useHTML:true,symbolWidth:5,margin:0,itemStyle:{fontFamily:"Roboto",fontWeight:"normal",lineHeight:"20px",fontSize:"11px"}},plotOptions:{area:{stacking:b.chartStacking,lineColor:null,lineWidth:0,marker:{lineWidth:1,enabled:false,lineColor:"#666666"}},line:{lineColor:null,lineWidth:2,marker:{lineWidth:0,enabled:false,lineColor:null}}},series:c.series};
},config:{chartValue:{}},constructor:function(a){this.initConfig(a);this.callParent(arguments);},applyChartValue:function(c,b){var a=this;return c;},setChartValue:function(b){var a=this;if(!Ext.isEmpty(Ext.get(a.id))){new Highcharts.Chart(a.chartProps(a.id,b));}return b;},updateChartValue:function(c){var a=this;
if(!Ext.isEmpty(Ext.get(a.id))){var b=$("#"+a.id).highcharts();if(b){b.destroy();b=null;new Highcharts.Chart(a.chartProps(a.id,c));}}return c;},margin:"0 0 10 0",flex:1,initComponent:function(){var a=this;a.on("boxready",function(d){var b=a.chartProps(d.id,a.chartValue);new Highcharts.Chart(a.chartProps(d.id,a.chartValue));
},a);a.on("resize",function(d){if(!Ext.isEmpty(Ext.get(a.id))){if(!Ext.isEmpty($("#"+a.id).highcharts())){var b=$("#"+a.id).highcharts();chartWidth=Ext.get(a.id).getWidth();chartHeight=Ext.get(a.id).getHeight();b.setSize(chartWidth,chartHeight,false);b.reflow();}}},a);a.callParent();}});