if(void 0===MMONIT||!MMONIT)var MMONIT={};MMONIT.chart=function(){function a(a,t,e,d){if(t.data)for(var o=0;o<t.data.length;o++)if(t.data[o][e]==a.datapoint[e])return t.data[o][d];return 0}function t(a,t,e){var d=$(window).outerWidth(),o=a<(ISPHONE?d/2:d-200);$('<div id="tooltip" data-placement="'+(o?"right":"left")+'" data-animation="false" data-html="false" data-title="'+e+'"></div>').css({position:"absolute",left:a+(o?15:-15)+"px",top:t+"px"}).appendTo("body"),$("#tooltip").tooltip("show")}return{setTooltip:function(e,d,o){if($("#tooltip").tooltip("destroy"),$("#tooltip").remove(),o)if(o.series.pie&&1==o.series.pie.show){var r=e.data?MMONIT.math.round(o.series.percent,e.data.round):Math.round(o.series.percent);t(d.pageX,d.pageY,"No hosts"==o.series.label?o.series.label:o.series.label+"\r\n"+(e.data&&"%"==e.data.suffix?"":o.series.data[0][1]+"\r\n")+r+"%")}else{r=0;var s=0,i=e.data&&0==e.data.date?null:new Date(o.datapoint[0]),n=e.data&&1==e.data.horizontal?0:1,l=1-n;if(o.series.stack)for(var f=0;f<e.data.data.length;f++){var p=a(o,e.data.data[f],l,n);f==o.seriesIndex&&(r=p),s+=p}else r=o.series.data[o.dataIndex][n];var u="";i&&(u+=i.toDateString()+" "+(i.getHours()<10?"0":"")+i.getHours()+":"+(i.getMinutes()<10?"0":"")+i.getMinutes()+":"+(i.getSeconds()<10?"0":"")+i.getSeconds()+"\r\n"),u+=o.series.label+"\r\n",e.data?e.data.formatter?u+=e.data.formatter(r)+(o.series.stack&&e.data.data.length>1?" of total "+e.data.formatter(s):""):u+=MMONIT.math.round(r,e.data.round)+(o.series.stack&&e.data.data.length>1?" of total "+MMONIT.math.round(s,e.data.round):""):u+=r+(o.series.stack&&e.data.data.length>1?" of total "+s:""),e.data&&e.data.suffix&&(u+=e.data.suffix),t(d.pageX,d.pageY,u)}}}}();