var flotHelper={};flotHelper.tooltipOffsetX=5;flotHelper.tooltipOffsetY=-60;flotHelper.getTickFormatter=function(g,f,b){var d="-webkit-transform: rotate("+g+"deg); ";var c="-moz-transform: rotate("+g+"deg); ";var e="-ms-transform: rotate("+g+"deg); ";var a="-o-transform: rotate("+g+"deg);";return'<div style="'+d+c+e+a+'">'+f+"</div>"};flotHelper.showTooltip=function(a,d,c,b){$('<div id="tooltip">'+c+"</div>").css({position:"absolute",display:"none",top:d+flotHelper.tooltipOffsetX,left:a+flotHelper.tooltipOffsetY,border:"1px solid "+b,padding:"2px","background-color":"#fee",opacity:0.8}).appendTo("body").show()};flotHelper.doToolTip=function(a,f,k){$("#x").text(f.x);$("#y").text(f.y);if(k){if(previousPoint==k.dataIndex&&previousSeries==k.seriesIndex){$("#tooltip").css({top:f.pageY+flotHelper.tooltipOffsetX,left:f.pageX+flotHelper.tooltipOffsetY})}if(previousPoint!=k.dataIndex||previousSeries!=k.seriesIndex){previousPoint=k.dataIndex;previousSeries=k.seriesIndex;$("#tooltip").remove();var i=k.datapoint[0],g=k.datapoint[1],c=k.series.color,e=k.series.label,d="";if(e&&e.length>1){d="<u>"+e+"</u><br/>"}var j=k.series.xaxis.ticks;var b=j[previousPoint].label;var h=b.match(/^<div.+>(.*?)<\/div>/)[1];if(isNaN(h)){i=h;d+=i+" = "+g}else{d+="x = "+i+"<br/>y = "+g}flotHelper.showTooltip(f.pageX,f.pageY,d,c)}}else{$("#tooltip").remove();previousPoint=null;previousSeries=null}};flotHelper.showPieToolTip=function(d,e,c){if(c){if(previousSeries!=c.seriesIndex){$("#tooltip").remove();previousSeries=c.seriesIndex;var b=parseFloat(c.series.percent);var a='<span style=""><u>'+c.series.label+"</u><br/>"+b.toFixed(2)+"%</span>";flotHelper.showTooltip(e.pageX,e.pageY,a,c.series.color)}else{$("#tooltip").css({top:e.pageY+flotHelper.tooltipOffsetX,left:e.pageX+flotHelper.tooltipOffsetY})}}else{$("#tooltip").remove();previousSeries=null}};flotHelper.getTickArray=function(f,d,c,a){var e=c.length;var b=null;c=$.map(c,function(h,g){return[[g,h]]});if(a!=null){if(a>0){b=Math.ceil(e/a)}else{if(a<=0){b=0}}}$.each(c,function(h,i){var g=null;if(b!=null){if(b>0){g=h%b}else{if(b==0){g=0}}}if(!g==0||!g==null){i[0]=d.min-1}if(i[1]){i[1]=flotHelper.getTickFormatter(f,i[1],d)}});return c};