wahs-the-weather/lib/steelseries/scripts/RGraph.common.core.min.js
2024-12-11 21:20:28 +00:00

1 line
36 KiB
JavaScript

function pd(n){RGraph.pr(n)}function p(n){RGraph.pr(n)}function a(n){alert(n)}function cl(n){return console.log(n)}typeof RGraph=="undefined"&&(RGraph={isRGraph:!0,type:"common"}),RGraph.Registry={},RGraph.Registry.store=[],RGraph.Registry.store["chart.event.handlers"]=[],RGraph.Registry.store.__rgraph_event_listeners__=[],RGraph.background={},RGraph.objects=[],RGraph.Resizing={},RGraph.events=[],RGraph.cursor=[],RGraph.DOM2Events={},RGraph.ObjectRegistry={},RGraph.ObjectRegistry.objects={},RGraph.ObjectRegistry.objects.byUID=[],RGraph.ObjectRegistry.objects.byCanvasID=[],HALFPI=Math.PI/2,PI=Math.PI,TWOPI=PI*2,ISOPERA=navigator.userAgent.indexOf("Opera")!=-1,RGraph.getScale=function(n,t){var f,e,i,o,u,r;if(n==0)return["0.2","0.4","0.6","0.8","1.0"];if(f=n,n<=1){if(n>.5)return[.2,.4,.6,.8,Number(1).toFixed(1)];if(n>=.1)return t.Get("chart.scale.round")?[.2,.4,.6,.8,1]:[.1,.2,.3,.4,.5];for(e=n,i=0;e<1.01;)i+=1,e*=10;return o=["2e-"+i,"4e-"+i,"6e-"+i,"8e-"+i,"10e-"+i],n<="5e-"+i&&(o=["1e-"+i,"2e-"+i,"3e-"+i,"4e-"+i,"5e-"+i]),o}for(String(n).indexOf(".")>0&&(n=String(n).replace(/\.\d+$/,"")),u=Math.pow(10,Number(String(Number(n)).length-1)),r=u;r<n;)r+=u/2;return Number(f)>Number(r)&&(r+=u/2),n<10&&(r=Number(f)<=5?5:10),t&&typeof t.Get("chart.scale.round")=="boolean"&&t.Get("chart.scale.round")&&(r=10*u),[r*.2,r*.4,r*.6,r*.8,r]},RGraph.array_max=function(n){var i=null,t,r;if(typeof n=="number")return n;for(t=0;t<n.length;++t)typeof n[t]=="number"&&(r=arguments[1]?Math.abs(n[t]):n[t],i=typeof i=="number"?Math.max(i,r):r);return i},RGraph.array_pad=function(n,t){var r,i;if(n.length<t)for(r=arguments[2]?arguments[2]:null,i=n.length;i<t;++i)n[i]=r;return n},RGraph.array_sum=function(n){if(typeof n=="number")return n;for(var r=n.length,t=0,i=0;t<r;i+=n[t++]);return i},RGraph.array_linearize=function(){for(var r=[],t,u,i,n=0;n<arguments.length;++n)if(typeof arguments[n]=="object"&&arguments[n])for(t=0;t<arguments[n].length;++t)for(u=RGraph.array_linearize(arguments[n][t]),i=0;i<u.length;++i)r.push(u[i]);else r.push(arguments[n]);return r},RGraph.Text=function(n,t,i,r,u,f){var e=arguments,v,c,l,a,o,s;if((typeof f=="string"||typeof f=="number")&&f!="undefined"){if(typeof f=="string"&&f.match(/\r\n/)){for(v=RGraph.MeasureText("M",e[11],t,i),c=f.split("\r\n"),e[6]&&e[6]=="center"&&(u=u-v[1]*((c.length-1)/2)),l=1;l<c.length;++l)RGraph.Text(n,t,i,e[9]==-90?r+i*1.5:r,u+v[1]*l,c[l],e[6]?e[6]:null,e[7],e[8],e[9],e[10],e[11],e[12]);f=c[0]}document.all&&ISOLD&&(u+=2),n.font=(e[11]?"Bold ":"")+i+"pt "+t;var l,d=r,g=u,y=n.fillStyle,k=n.lineWidth;if(typeof e[6]=="undefined"&&(e[6]="bottom"),typeof e[7]=="undefined"&&(e[7]="left"),typeof e[8]=="undefined"&&(e[8]=null),typeof e[9]=="undefined"&&(e[9]=0),navigator.userAgent.indexOf("Opera")!=-1&&(n.canvas.__rgraph_valign__=e[6],n.canvas.__rgraph_halign__=e[7]),n.save(),n.canvas.__rgraph_originalx__=r,n.canvas.__rgraph_originaly__=u,n.translate(r,u),r=0,u=0,e[9]&&n.rotate(e[9]/(180/PI)),e[6]&&(a=e[6],a=="center"?n.textBaseline="middle":a=="top"&&(n.textBaseline="top")),e[7]&&(o=e[7],s=n.measureText(f).width,o&&(o=="center"?n.textAlign="center":o=="right"&&(n.textAlign="right"))),n.fillStyle=y,n.save(),n.fillText(f,0,0),n.lineWidth=1,e[8]){var s=n.measureText(f).width,p=o=="center"?s/2:o=="right"?s:0,h=i*1.4,w=a=="center"?h/2:a=="top"?h:0,b=ISOLD?2:0;n.strokeRect(-3-p,-3-h-b+w,s+6,h+6),e[10]&&(n.fillStyle=e[10],n.fillRect(-3-p,-3-h-b+w,s+6,h+6)),n.fillStyle=y,n.fillText(f,0,0)}n.restore(),n.lineWidth=k,n.restore()}},RGraph.Clear=function(n){var t,i,r;n&&(RGraph.FireCustomEvent(n.__object__,"onbeforeclear"),t=n.getContext("2d"),i=arguments[1],ISIE8&&!i&&(i="white"),!i||i&&i=="rgba(0,0,0,0)"||i=="transparent"?(t.clearRect(0,0,n.width,n.height),t.globalCompositeOperation="source-over"):(t.fillStyle=i,t=n.getContext("2d"),t.beginPath(),ISIE8?t.fillRect(0,0,n.width,n.height):t.fillRect(-10,-10,n.width+20,n.height+20),t.fill()),RGraph.ClearAnnotations,RGraph.Registry.Get("chart.background.image."+n.id)&&(r=RGraph.Registry.Get("chart.background.image."+n.id),r.style.position="absolute",r.style.left="-10000px",r.style.top="-10000px"),RGraph.Registry.Get("chart.tooltip")&&RGraph.HideTooltip(),n.style.cursor="default",RGraph.FireCustomEvent(n.__object__,"onclear"))},RGraph.DrawTitle=function(n,t,i){var d=n.canvas,r=n.context,a=n.Get("chart.gutter.left"),g=n.Get("chart.gutter.right"),i=n.Get("chart.gutter.top"),o=n.Get("chart.gutter.bottom"),s=arguments[4]?arguments[4]:12,nt=n.Get("chart.title.bold"),h=arguments[3]?arguments[3]:(n.canvas.width-a-g)/2+a,e=n.Get("chart.key.position"),u=n.Get("chart.title.vpos"),v=n.Get("chart.title.hpos"),y=n.Get("chart.title.background"),p=n.Get("chart.title.x"),w=n.Get("chart.title.y"),b="center",f="center",k,c,l;n.type=="bar"&&n.Get("chart.variant")=="3d"&&(e="gutter"),r.beginPath(),r.fillStyle=n.Get("chart.text.color")?n.Get("chart.text.color"):"black",f=e&&e!="gutter"?"center":e?"bottom":"center",typeof n.Get("chart.title.vpos")=="number"?(u=n.Get("chart.title.vpos")*i,n.Get("chart.xaxispos")=="top"&&(u=n.Get("chart.title.vpos")*o+i+(n.canvas.height-i-o))):(u=i-s-5,n.Get("chart.xaxispos")=="top"&&(u=n.canvas.height-o+s+5)),typeof v=="number"&&(h=v*d.width),typeof p=="number"&&(h=p),typeof w=="number"&&(u=w),typeof n.properties["chart.title.halign"]=="string"&&(b=n.properties["chart.title.halign"]),typeof n.properties["chart.title.valign"]=="string"&&(f=n.properties["chart.title.valign"]),typeof(n.Get("chart.title.color")!=null)&&(k=r.fillStyle,c=n.Get("chart.title.color"),r.fillStyle=c?c:"black"),l=n.Get("chart.text.font"),typeof n.Get("chart.title.font")=="string"&&(l=n.Get("chart.title.font")),RGraph.Text(r,l,s,h,u,t,f,b,y!=null,null,y,nt),r.fillStyle=k},RGraph.getMouseXY=function(n){var t=n.target,i=t,f=0,e=0,r,u,o=(parseInt(i.style.borderLeftWidth)||0)+(parseInt(i.style.paddingLeft)||0),s=(parseInt(i.style.borderTopWidth)||0)+(parseInt(i.style.paddingTop)||0);if(typeof n.offsetX=="number"&&typeof n.offsetY=="number")r=n.offsetX-o,u=n.offsetY-s;else{if(typeof t.offsetParent!="undefined")do f+=t.offsetLeft,e+=t.offsetTop;while(t=t.offsetParent);r=n.pageX-f-o,u=n.pageY-e-s}return[r,u]},RGraph.getCanvasXY=function(n){var i=0,r=0,t=n;do i+=t.offsetLeft,r+=t.offsetTop,t=t.offsetParent;while(t&&t.tagName.toLowerCase()!="body");var u=n.style.paddingLeft?parseInt(n.style.paddingLeft):0,f=n.style.paddingTop?parseInt(n.style.paddingTop):0,e=n.style.borderLeftWidth?parseInt(n.style.borderLeftWidth):0,o=n.style.borderTopWidth?parseInt(n.style.borderTopWidth):0;return[i+u+e,r+f+o]},RGraph.Register=function(n){n.Get("chart.noregister")||(RGraph.ObjectRegistry.Add(n),n.Set("chart.noregister",!0))},RGraph.Redraw=function(){for(var i=RGraph.ObjectRegistry.objects.byCanvasID,t=document.getElementsByTagName("canvas"),r,n=0;n<t.length;++n)t[n].__object__&&t[n].__object__.isRGraph&&(t[n].noclear||RGraph.Clear(t[n],arguments[0]?arguments[0]:null));for(n=0;n<i.length;++n)i[n]&&(r=i[n][0],i[n][1].Draw())},RGraph.RedrawCanvas=function(n){var i=RGraph.ObjectRegistry.getObjectsByCanvasID(n.id),t;for(arguments[1]&&(typeof arguments[1]!="boolean"||!arguments[1]!=!1)||RGraph.Clear(n),t=0;t<i.length;++t)i[t]&&i[t]&&i[t].isRGraph&&i[t].Draw()},RGraph.background.Draw=function(n){var nt=n.canvas,t=n.context,e=0,u=n.Get("chart.gutter.left"),o=n.Get("chart.gutter.right"),f=n.Get("chart.gutter.top"),r=n.Get("chart.gutter.bottom"),v=n.Get("chart.variant"),p,a,s,i,b,k,d;if(t.fillStyle=n.Get("chart.text.color"),v=="3d"&&(t.save(),t.translate(10,-5)),typeof n.Get("chart.title.xaxis")=="string"&&n.Get("chart.title.xaxis").length){var h=n.Get("chart.text.size")+2,c=n.Get("chart.text.font"),l=n.Get("chart.title.xaxis.bold");typeof n.Get("chart.title.xaxis.size")=="number"&&(h=n.Get("chart.title.xaxis.size")),typeof n.Get("chart.title.xaxis.font")=="string"&&(c=n.Get("chart.title.xaxis.font")),p=(n.canvas.width-n.gutterLeft-n.gutterRight)/2+n.gutterLeft,a=n.canvas.height-n.Get("chart.gutter.bottom")+25,typeof n.Get("chart.title.xaxis.pos")=="number"&&(a=n.canvas.height-r*n.Get("chart.title.xaxis.pos")),t.beginPath(),RGraph.Text(t,c,h,p,a,n.Get("chart.title.xaxis"),"center","center",!1,!1,!1,l),t.fill()}if(typeof n.Get("chart.title.yaxis")=="string"&&n.Get("chart.title.yaxis").length){var h=n.Get("chart.text.size")+2,c=n.Get("chart.text.font"),w=270,l=n.Get("chart.title.yaxis.bold"),g=n.Get("chart.title.yaxis.color");s=typeof n.Get("chart.title.yaxis.pos")=="number"?n.Get("chart.title.yaxis.pos")*n.Get("chart.gutter.left"):(n.Get("chart.gutter.left")-25)/n.Get("chart.gutter.left")*n.Get("chart.gutter.left"),typeof n.Get("chart.title.yaxis.size")=="number"&&(h=n.Get("chart.title.yaxis.size")),typeof n.Get("chart.title.yaxis.font")=="string"&&(c=n.Get("chart.title.yaxis.font")),n.Get("chart.title.yaxis.align")=="right"||n.Get("chart.title.yaxis.position")=="right"?(w=90,s=n.Get("chart.title.yaxis.pos")?n.canvas.width-n.Get("chart.gutter.right")+n.Get("chart.title.yaxis.pos")*n.Get("chart.gutter.right"):n.canvas.width-n.Get("chart.gutter.right")+n.Get("chart.text.size")+5):s=s,t.beginPath(),t.fillStyle=g,RGraph.Text(t,c,h,s,(n.canvas.height-n.gutterTop-n.gutterBottom)/2+n.gutterTop,n.Get("chart.title.yaxis"),"center","center",!1,w,!1,l),t.fill()}for(n.context.beginPath(),t.fillStyle=n.Get("chart.background.barcolor1"),e=n.canvas.height-r,i=f;i<e;i+=80)n.context.fillRect(u,i,n.canvas.width-u-o,Math.min(40,n.canvas.height-r-i));for(t.fillStyle=n.Get("chart.background.barcolor2"),e=RGraph.GetHeight(n)-r,i=40+f;i<e;i+=80)n.context.fillRect(u,i,n.canvas.width-u-o,i+40>n.canvas.height-r?n.canvas.height-(r+i):40);if(t.stroke(),n.Get("chart.background.grid")){if(n.Get("chart.background.grid.autofit")&&(n.Get("chart.background.grid.autofit.align")&&(n.Set("chart.background.grid.autofit.numhlines",n.Get("chart.ylabels.count")),n.type=="line"?n.Get("chart.labels")&&n.Get("chart.labels").length?n.Set("chart.background.grid.autofit.numvlines",n.Get("chart.labels").length-1):n.Set("chart.background.grid.autofit.numvlines",n.data[0].length-1):n.type=="bar"&&n.Get("chart.labels")&&n.Get("chart.labels").length&&n.Set("chart.background.grid.autofit.numvlines",n.Get("chart.labels").length)),b=(n.canvas.width-u-o)/n.properties["chart.background.grid.autofit.numvlines"],k=(n.canvas.height-f-r)/n.properties["chart.background.grid.autofit.numhlines"],n.Set("chart.background.grid.vsize",b),n.Set("chart.background.grid.hsize",k)),t.beginPath(),t.lineWidth=n.Get("chart.background.grid.width")?n.Get("chart.background.grid.width"):1,t.strokeStyle=n.Get("chart.background.grid.color"),n.Get("chart.background.grid.hlines"))for(e=RGraph.GetHeight(n)-r,y=f;y<e;y+=n.Get("chart.background.grid.hsize"))t.moveTo(u,Math.round(y)),t.lineTo(n.canvas.width-o,Math.round(y));if(n.Get("chart.background.grid.vlines"))for(d=n.canvas.width-o,x=u;x<=d;x+=n.Get("chart.background.grid.vsize"))t.moveTo(Math.round(x),f),t.lineTo(Math.round(x),n.canvas.height-r);n.Get("chart.background.grid.border")&&(t.strokeStyle=n.Get("chart.background.grid.color"),t.strokeRect(Math.round(u),Math.round(f),n.canvas.width-u-o,n.canvas.height-f-r))}t.stroke(),v=="3d"&&t.restore(),typeof n.Get("chart.title")=="string"&&(n.type=="gantt"&&(f-=10),RGraph.DrawTitle(n,n.Get("chart.title"),f,null,n.Get("chart.title.size")?n.Get("chart.title.size"):n.Get("chart.text.size")+2)),t.stroke()},RGraph.GetDays=function(n){var r=n.getFullYear(),t=n.getDate(),i=n.getMonth();return i==0?t:(i>=1&&(t+=31),i>=2&&(t+=28),r>=2008&&r%4==0&&(t+=1),i>=3&&(t+=31),i>=4&&(t+=30),i>=5&&(t+=31),i>=6&&(t+=30),i>=7&&(t+=31),i>=8&&(t+=31),i>=9&&(t+=30),i>=10&&(t+=31),i>=11&&(t+=30),t)},RGraph.array_clone=function(n){var i,t;if(n==null||typeof n!="object")return n;for(i=[],t=0;t<n.length;++t)i[t]=typeof n[t]=="number"?function(n){return Number(n)}(n[t]):typeof n[t]=="string"?function(n){return String(n)}(n[t]):typeof n[t]=="function"?n[t]:RGraph.array_clone(n[t]);return i},RGraph.number_format=function(n,t){var u=arguments[2]?String(arguments[2]):"",s=arguments[3]?String(arguments[3]):"",i="",f="",a=n.Get("chart.scale.point")?n.Get("chart.scale.point"):".",v=n.Get("chart.scale.thousand")?n.Get("chart.scale.thousand"):",",r,e,h,c,l,o;if(RegExp.$1="",typeof n.Get("chart.scale.formatter")=="function")return n.Get("chart.scale.formatter")(n,t);if(String(t).indexOf("e")>0)return String(u+String(t)+s);for(t=String(t),t.indexOf(".")>0&&(h=t,t=t.replace(/\.(.*)/,""),f=h.replace(/(.*)\.(.*)/,"$2")),c=v,r=t.length-1,e=0;r>=0;e++,r--)l=t.charAt(r),e%3==0&&e!=0&&(i+=c),i+=l;for(o=i,i="",r=o.length-1;r>=0;r--)i+=o.charAt(r);return i.indexOf("-"+n.Get("chart.scale.thousand"))==0&&(i="-"+i.substr(("-"+n.Get("chart.scale.thousand")).length)),f.length&&(i=i+a+f,f="",RegExp.$1=""),i.charAt(0)=="-"&&(i=i.replace(/-/,""),u="-"+u),u+i+s},RGraph.DrawBars=function(n){var t=n.Get("chart.background.hbars"),f,e;for(n.context.beginPath(),i=0;i<t.length;++i){t[i][1]==null?t[i][1]=n.max:t[i][0]+t[i][1]>n.max&&(t[i][1]=n.max-t[i][0]),Math.abs(t[i][1])>n.max&&(t[i][1]=-1*n.max),Math.abs(t[i][0])>n.max&&(t[i][0]=n.max),t[i][0]+t[i][1]<-1*n.max&&(t[i][1]=-1*(n.max+t[i][0])),n.Get("chart.xaxispos")=="bottom"&&(t[i][0]<0||t[i][1]+t[i][1]<0)&&alert("["+n.type.toUpperCase()+" (ID: "+n.id+") BACKGROUND HBARS] You have a negative value in one of your background hbars values, whilst the X axis is in the center"),f=n.grapharea-(t[i][0]-n.min)/(n.max-n.min)*n.grapharea,e=Math.min(t[i][1],n.max-t[i][0])/(n.max-n.min)*n.grapharea,n.Get("chart.xaxispos")=="center"&&(f/=2,e/=2),f+=n.Get("chart.gutter.top");var o=n.Get("chart.gutter.left"),r=f-e,s=n.canvas.width-n.Get("chart.gutter.left")-n.Get("chart.gutter.right"),u=e;navigator.userAgent.indexOf("Opera")!=-1&&n.Get("chart.xaxispos")=="center"&&u<0&&(u*=-1,r=r-u),n.Get("chart.xaxispos")=="top"&&(r=n.canvas.height-r,u*=-1),n.context.fillStyle=t[i][2],n.context.fillRect(o,r,s,u)}n.context.fill()},RGraph.DrawInGraphLabels=function(n){var a=n.canvas,i=n.context,c=n.Get("chart.labels.ingraph"),r=[],l,t,h,o,s;if(c){for(t=0;t<c.length;++t)if(typeof c[t]=="number")for(l=0;l<c[t];++l)r.push(null);else typeof c[t]=="string"||typeof c[t]=="object"?r.push(c[t]):r.push("");if(RGraph.NoShadow(n),r&&r.length>0)for(t=0;t<r.length;++t)if(r[t]&&(h=n.coords[t],h&&h.length>0)){var u=n.type=="bar"?h[0]+h[2]/2:h[0],f=n.type=="bar"?h[1]+h[3]/2:h[1],e=typeof r[t][4]=="number"?r[t][4]:25;i.beginPath(),i.fillStyle="black",i.strokeStyle="black",n.type=="bar"?(n.Get("chart.xaxispos")=="top"&&(e*=-1),n.Get("chart.variant")=="dot"?(i.moveTo(Math.round(u),n.coords[t][1]-5),i.lineTo(Math.round(u),n.coords[t][1]-5-e),o=Math.round(u),s=n.coords[t][1]-5-e):n.Get("chart.variant")=="arrow"?(i.moveTo(Math.round(u),n.coords[t][1]-5),i.lineTo(Math.round(u),n.coords[t][1]-5-e),o=Math.round(u),s=n.coords[t][1]-5-e):(i.arc(Math.round(u),f,2.5,0,6.28,0),i.moveTo(Math.round(u),f),i.lineTo(Math.round(u),f-e),o=Math.round(u),s=f-e),i.stroke(),i.fill()):n.type=="line"&&(typeof r[t]=="object"&&typeof r[t][3]=="number"&&r[t][3]==-1?(i.moveTo(Math.round(u),f+5),i.lineTo(Math.round(u),f+5+e),i.stroke(),i.beginPath(),i.moveTo(Math.round(u),f+5),i.lineTo(Math.round(u)-3,f+10),i.lineTo(Math.round(u)+3,f+10),i.closePath(),o=u,s=f+5+e):(o=u,s=f-5-e,i.moveTo(Math.round(u),f-5),i.lineTo(Math.round(u),f-5-e),i.stroke(),i.beginPath(),i.moveTo(Math.round(u),f-5),i.lineTo(Math.round(u)-3,f-10),i.lineTo(Math.round(u)+3,f-10),i.closePath()),i.fill()),i.beginPath(),i.fillStyle=typeof r[t]=="object"&&typeof r[t][1]=="string"?r[t][1]:"black",RGraph.Text(i,n.Get("chart.text.font"),n.Get("chart.text.size"),o,s,typeof r[t]=="object"&&typeof r[t][0]=="string"?r[t][0]:r[t],"bottom","center",!0,null,typeof r[t]=="object"&&typeof r[t][2]=="string"?r[t][2]:"white"),i.fill()}}},RGraph.FixEventObject=function(n){var n,t;return ISOLD&&(n=event,n.pageX=event.clientX+document.body.scrollLeft,n.pageY=event.clientY+document.body.scrollTop,n.target=event.srcElement,!document.body.scrollTop&&document.documentElement.scrollTop&&(n.pageX+=parseInt(document.documentElement.scrollLeft),n.pageY+=parseInt(document.documentElement.scrollTop))),typeof n.offsetX=="undefined"&&typeof n.offsetY=="undefined"&&(t=RGraph.getMouseXY(n),n.offsetX=t[0],n.offsetY=t[1]),n.stopPropagation||(n.stopPropagation=function(){window.event.cancelBubble=!0}),n},RGraph.HideCrosshairCoords=function(){var n=RGraph.Registry.Get("chart.coordinates.coords.div");n&&n.style.opacity==1&&n.__object__.Get("chart.crosshairs.coords.fadeout")&&(setTimeout(function(){RGraph.Registry.Get("chart.coordinates.coords.div").style.opacity=.9},50),setTimeout(function(){RGraph.Registry.Get("chart.coordinates.coords.div").style.opacity=.8},100),setTimeout(function(){RGraph.Registry.Get("chart.coordinates.coords.div").style.opacity=.7},150),setTimeout(function(){RGraph.Registry.Get("chart.coordinates.coords.div").style.opacity=.6},200),setTimeout(function(){RGraph.Registry.Get("chart.coordinates.coords.div").style.opacity=.5},250),setTimeout(function(){RGraph.Registry.Get("chart.coordinates.coords.div").style.opacity=.4},300),setTimeout(function(){RGraph.Registry.Get("chart.coordinates.coords.div").style.opacity=.3},350),setTimeout(function(){RGraph.Registry.Get("chart.coordinates.coords.div").style.opacity=.2},400),setTimeout(function(){RGraph.Registry.Get("chart.coordinates.coords.div").style.opacity=.1},450),setTimeout(function(){RGraph.Registry.Get("chart.coordinates.coords.div").style.opacity=0},500),setTimeout(function(){RGraph.Registry.Get("chart.coordinates.coords.div").style.display="none"},550))},RGraph.Draw3DAxes=function(n){var r=n.Get("chart.gutter.left"),f=n.Get("chart.gutter.right"),e=n.Get("chart.gutter.top"),u=n.Get("chart.gutter.bottom"),t=n.context,i=n.canvas;t.strokeStyle="#aaa",t.fillStyle="#ddd",t.beginPath(),t.moveTo(r,e),t.lineTo(r+10,e-5),t.lineTo(r+10,i.height-u-5),t.lineTo(r,i.height-u),t.closePath(),t.stroke(),t.fill(),t.beginPath(),t.moveTo(r,i.height-u),t.lineTo(r+10,i.height-u-5),t.lineTo(i.width-f+10,i.height-u-5),t.lineTo(i.width-f,i.height-u),t.closePath(),t.stroke(),t.fill()},RGraph.OldBrowserCompat=function(n){n&&(n.measureText||(n.measureText=function(n){var t=document.createElement("DIV"),i;return t.innerHTML=n,t.style.position="absolute",t.style.top="-100px",t.style.left=0,document.body.appendChild(t),i={width:t.offsetWidth},t.style.display="none",i}),n.fillText||(n.fillText=function(){return!1}),n.canvas.addEventListener||(window.addEventListener=function(n,t){return this.attachEvent("on"+n,t)},n.canvas.addEventListener=function(n,t){return this.attachEvent("on"+n,t)}))},RGraph.strokedCurvyRect=function(n,t,i,r,u){var f=arguments[5]?arguments[5]:3,e=arguments[6]||arguments[6]==null?!0:!1,o=arguments[7]||arguments[7]==null?!0:!1,s=arguments[8]||arguments[8]==null?!0:!1,h=arguments[9]||arguments[9]==null?!0:!1;n.beginPath(),n.moveTo(t+(e?f:0),i),n.lineTo(t+r-(o?f:0),i),o&&n.arc(t+r-f,i+f,f,PI+HALFPI,TWOPI,!1),n.lineTo(t+r,i+u-(s?f:0)),s&&n.arc(t+r-f,i-f+u,f,TWOPI,HALFPI,!1),n.lineTo(t+(h?f:0),i+u),h&&n.arc(t+f,i-f+u,f,HALFPI,PI,!1),n.lineTo(t,i+(e?f:0)),e&&n.arc(t+f,i+f,f,PI,PI+HALFPI,!1),n.stroke()},RGraph.filledCurvyRect=function(n,t,i,r,u){var f=arguments[5]?arguments[5]:3,e=arguments[6]||arguments[6]==null?!0:!1,o=arguments[7]||arguments[7]==null?!0:!1,s=arguments[8]||arguments[8]==null?!0:!1,h=arguments[9]||arguments[9]==null?!0:!1;n.beginPath(),e?(n.moveTo(t+f,i+f),n.arc(t+f,i+f,f,PI,PI+HALFPI,!1)):n.fillRect(t,i,f,f),o?(n.moveTo(t+r-f,i+f),n.arc(t+r-f,i+f,f,PI+HALFPI,0,!1)):(n.moveTo(t+r-f,i),n.fillRect(t+r-f,i,f,f)),s?(n.moveTo(t+r-f,i+u-f),n.arc(t+r-f,i-f+u,f,0,HALFPI,!1)):(n.moveTo(t+r-f,i+u-f),n.fillRect(t+r-f,i+u-f,f,f)),h?(n.moveTo(t+f,i+u-f),n.arc(t+f,i-f+u,f,HALFPI,PI,!1)):(n.moveTo(t,i+u-f),n.fillRect(t,i+u-f,f,f)),n.fillRect(t+f,i,r-f-f,u),n.fillRect(t,i+f,f+1,u-f-f),n.fillRect(t+r-f-1,i+f,f+1,u-f-f),n.fill()},RGraph.HideZoomedCanvas=function(){var t=15,i=10,n,r;if(typeof __zoomedimage__=="object")obj=__zoomedimage__.obj;else return;if(obj.Get("chart.zoom.fade.out")){for(n=i,r=1;n>=0;--n,++r)typeof __zoomedimage__=="object"&&setTimeout("__zoomedimage__.style.opacity = "+String(n/10),r*t);typeof __zoomedbackground__=="object"&&setTimeout("__zoomedbackground__.style.opacity = "+String(n/i),r*t)}typeof __zoomedimage__=="object"&&setTimeout("__zoomedimage__.style.display = 'none'",obj.Get("chart.zoom.fade.out")?i*t+10:0),typeof __zoomedbackground__=="object"&&setTimeout("__zoomedbackground__.style.display = 'none'",obj.Get("chart.zoom.fade.out")?i*t+10:0)},RGraph.AddCustomEventListener=function(n,t,i){return typeof RGraph.events[n.uid]=="undefined"&&(RGraph.events[n.uid]=[]),RGraph.events[n.uid].push([n,t,i]),RGraph.events[n.uid].length-1},RGraph.FireCustomEvent=function(n,t){var i,r;if(n&&n.isRGraph&&(n[t]&&n[t](n),i=n.uid,typeof i=="string"&&typeof RGraph.events=="object"&&typeof RGraph.events[i]=="object"&&RGraph.events[i].length>0))for(r=0;r<RGraph.events[i].length;++r)RGraph.events[i][r]&&RGraph.events[i][r][1]==t&&RGraph.events[i][r][2](n)},RGraph.getGutterSuggest=function(n,t){for(var u=0,r,f,i=0;i<t.length;++i)u=Math.min(u,t[i]);if(u=Math.abs(u),r=RGraph.number_format(n,RGraph.array_max(RGraph.getScale(Math.max(u,RGraph.array_max(t)),n)),n.Get("chart.units.pre"),n.Get("chart.units.post")),n.type=="hbar")for(r="",f=0,i=0;i<n.Get("chart.labels").length;++i)r=n.Get("chart.labels").length>r.length?n.Get("chart.labels")[i]:r;return n.context.font=n.Get("chart.text.size")+"pt "+n.Get("chart.text.font"),f=n.context.measureText(r).width+5,n.type=="hbar"?f/3:f},RGraph.SetConfig=function(n,t){for(i in t)typeof i=="string"&&n.Set(i,t[i]);return n},RGraph.RemoveAllCustomEventListeners=function(){var n=arguments[0];n&&RGraph.events[n]?RGraph.events[n]=[]:RGraph.events=[]},RGraph.RemoveCustomEventListener=function(n,t){typeof RGraph.events=="object"&&typeof RGraph.events[n.id]=="object"&&typeof RGraph.events[n.id][t]=="object"&&(RGraph.events[n.id][t]=null)},RGraph.DrawBackgroundImage=function(n){var t,i,r;if(typeof n.Get("chart.background.image")=="string"){typeof n.canvas.__rgraph_background_image__=="undefined"?(t=new Image,t.__object__=n,t.__canvas__=n.canvas,t.__context__=n.context,t.src=n.Get("chart.background.image"),n.canvas.__rgraph_background_image__=t):t=n.canvas.__rgraph_background_image__,t.onload=function(){n.__rgraph_background_image_loaded__=!0,RGraph.Clear(n.canvas),RGraph.RedrawCanvas(n.canvas)};var u=n.Get("chart.gutter.left"),o=n.Get("chart.gutter.right"),f=n.Get("chart.gutter.top"),s=n.Get("chart.gutter.bottom"),h=n.Get("chart.background.image.stretch"),e=n.Get("chart.background.image.align");typeof e=="string"?(i=e.indexOf("right")!=-1?n.canvas.width-t.width-o:u,r=e.indexOf("bottom")!=-1?n.canvas.height-t.height-s:f):(i=u,r=f);var i=typeof n.Get("chart.background.image.x")=="number"?n.Get("chart.background.image.x"):i,r=typeof n.Get("chart.background.image.y")=="number"?n.Get("chart.background.image.y"):r,c=h?n.canvas.width-u-o:t.width,l=h?n.canvas.height-f-s:t.height;typeof n.Get("chart.background.image.w")=="number"&&(c=n.Get("chart.background.image.w")),typeof n.Get("chart.background.image.h")=="number"&&(l=n.Get("chart.background.image.h")),n.context.drawImage(t,i,r,c,l)}},RGraph.hasTooltips=function(n){if(typeof n.Get("chart.tooltips")=="object"&&n.Get("chart.tooltips")){for(var t=0;t<n.Get("chart.tooltips").length;++t)if(!RGraph.is_null(n.Get("chart.tooltips")[t]))return!0}else if(typeof n.Get("chart.tooltips")=="function")return!0;return!1},RGraph.CreateUID=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(n){var t=Math.random()*16|0,i=n=="x"?t:t&3|8;return i.toString(16)})},RGraph.ObjectRegistry.Add=function(n){var t=n.uid,i=n.canvas.id;RGraph.ObjectRegistry.objects.byUID.push([t,n]),RGraph.ObjectRegistry.objects.byCanvasID.push([i,n])},RGraph.ObjectRegistry.Remove=function(n){for(var i=n.id,r=n.uid,t=0;t<RGraph.ObjectRegistry.objects.byUID.length;++t)RGraph.ObjectRegistry.objects.byUID[t]&&RGraph.ObjectRegistry.objects.byUID[t][1].uid==r&&(RGraph.ObjectRegistry.objects.byUID[t]=null);for(t=0;t<RGraph.ObjectRegistry.objects.byCanvasID.length;++t)RGraph.ObjectRegistry.objects.byCanvasID[t]&&RGraph.ObjectRegistry.objects.byCanvasID[t][0]==i&&(RGraph.ObjectRegistry.objects.byCanvasID[t]=null)},RGraph.ObjectRegistry.Clear=function(){var i,t,n;if(arguments[0])for(i=typeof arguments[0]=="object"?arguments[0].id:arguments[0],t=RGraph.ObjectRegistry.getObjectsByCanvasID(i),n=0;n<t.length;++n)RGraph.ObjectRegistry.Remove(t[n]);else RGraph.ObjectRegistry.objects={},RGraph.ObjectRegistry.objects.byUID=[],RGraph.ObjectRegistry.objects.byCanvasID=[]},RGraph.ObjectRegistry.getObjectsByCanvasID=function(n){for(var i=RGraph.ObjectRegistry.objects.byCanvasID,r=[],t=0;t<i.length;++t)i[t]&&i[t][0]==n&&r.push(i[t][1]);return r},RGraph.ObjectRegistry.getFirstObjectByXY=RGraph.ObjectRegistry.getObjectByXY=function(n){for(var u=n.target,r=RGraph.ObjectRegistry.getObjectsByCanvasID(u.id),i,t=r.length-1;t>=0;--t)if(i=r[t].getObjectByXY(n),i)return i},RGraph.ObjectRegistry.getObjectsByXY=function(n){for(var f=n.target,r=[],u=RGraph.ObjectRegistry.getObjectsByCanvasID(f.id),i,t=u.length-1;t>=0;--t)i=u[t].getObjectByXY(n),i&&r.push(i);return r},RGraph.ObjectRegistry.getObjectByUID=function(n){for(var i=RGraph.ObjectRegistry.objects.byUID,t=0;t<i.length;++t)if(i[t]&&i[t][1].uid==n)return i[t][1]},RGraph.ObjectRegistry.getObjectsByType=function(n){for(var i=RGraph.ObjectRegistry.objects.byUID,r=[],t=0;t<i.length;++t)i[t]&&i[t][1]&&i[t][1].type&&i[t][1].type&&i[t][1].type==n&&r.push(i[t][1]);return r},RGraph.ObjectRegistry.getFirstObjectByType=function(n){for(var i=RGraph.ObjectRegistry.objects.byUID,t=0;t<i.length;++t)if(i[t]&&i[t][1]&&i[t][1].type==n)return i[t][1];return null},RGraph.getAngleByXY=function(n,t,i,r){var u=Math.atan((r-t)/(i-n));return u=Math.abs(u),i>=n&&r>=t?u+=TWOPI:i>=n&&r<t?u=HALFPI-u+(PI+HALFPI):i<n&&r<t?u+=PI:u=PI-u,u>TWOPI&&(u-=TWOPI),u},RGraph.getHypLength=function(n,t,i,r){return Math.sqrt((i-n)*(i-n)+(r-t)*(r-t))},RGraph.getRadiusEndPoint=function(n,t,i,r){var u=n+Math.cos(i)*r,f=t+Math.sin(i)*r;return[u,f]},RGraph.InstallEventListeners=function(n){RGraph.isOld()||(RGraph.InstallCanvasClickListener?(RGraph.InstallWindowMousedownListener(n),RGraph.InstallWindowMouseupListener(n),RGraph.InstallCanvasMousemoveListener(n),RGraph.InstallCanvasMouseupListener(n),RGraph.InstallCanvasMousedownListener(n),RGraph.InstallCanvasClickListener(n)):(RGraph.hasTooltips(n)||n.Get("chart.adjustable")||n.Get("chart.annotatable")||n.Get("chart.contextmenu")||n.Get("chart.resizable")||n.Get("chart.key.interactive")||n.Get("chart.events.click")||n.Get("chart.events.mousemove"))&&alert("[RGRAPH] You appear to have used dynamic features but not included the file: RGraph.common.dynamic.js"))},RGraph.pr=function(n){var t="",i=arguments[2]?arguments[2]:"",r;switch(typeof n){case"number":i==""&&(t+="Number: "),t+=String(n);break;case"string":i==""&&(t+="String ("+n.length+"):"),t+='"'+String(n)+'"';break;case"object":if(n==null){t+="null";break}t+="Object\n"+i+"(\n";for(r in n)(typeof r=="string"||typeof r=="number")&&(t+=i+" "+r+" => "+RGraph.pr(n[r],!0,i+" ")+"\n");t=t+i+")";break;case"function":t+=n;break;case"boolean":t+="Boolean: "+(n?"true":"false")}if(arguments[1])return t;alert(t)},RGraph.DashedLine=function(n,t,i,r,u){var h=5;typeof arguments[5]=="number"&&(h=arguments[5]);var f=r-t,e=u-i,o=Math.floor(Math.sqrt(f*f+e*e)/h),c=f/o,l=e/o,s=0;do s%2==0&&s>0?n.lineTo(t,i):n.moveTo(t,i),t+=c,i+=l;while(s++<=o)},RGraph.AJAX=function(n,t){var i;window.XMLHttpRequest?i=new XMLHttpRequest:window.ActiveXObject&&(i=new ActiveXObject("Microsoft.XMLHTTP")),i.onreadystatechange=function(){this.readyState==4&&this.status==200&&(this.__user_callback__=t,this.__user_callback__())},i.open("GET",n,!0),i.send()},RGraph.RotateCanvas=function(n,t,i,r){var u=n.getContext("2d");u.translate(t,i),u.rotate(r),u.translate(0-t,0-i)},RGraph.DrawAxes=RGraph.DrawYAxis=function(n,t){var w,p,h,r,f;for(r in t)typeof r=="string"&&(w=r.replace(/^chart\./,"axis."),t[w]=t[r]);var a=n.gutterTop,at=n.gutterBottom,i=t["axis.context"]?t["axis.context"]:n.context,u=t["axis.x"],f=n.properties["chart.gutter.top"],b=t["axis.min"]?t["axis.min"]:0,tt=t["axis.max"],v=t["axis.color"]?t["axis.color"]:"black",k=t["axis.title"]?t["axis.title"]:"",it=t["axis.title.color"]?t["axis.title.color"]:v,rt=t["axis.text.color"]?t["axis.color"]:v,e=n.canvas.height-n.gutterBottom-n.gutterTop,y=typeof t["axis.numticks"]=="number"?t["axis.numticks"]:10,o=t["axis.numlabels"]?t["axis.numlabels"]:5,d=t["axis.font"]?t["axis.font"]:"Arial",c=t["axis.text.size"]?t["axis.text.size"]:10,s=typeof t["axis.align"]=="string"?t["axis.align"]:"left",g=t["axis.scale.formatter"],ut=t["axis.scale.decimals"],ft=t["axis.scale.invert"],et=t["axis.units.pre"],ot=t["axis.units.post"],st=t["axis.linewidth"]?t["axis.linewidth"]:1,ht=t["axis.noendtick.top"],ct=t["axis.noendtick.bottom"],lt=t["axis.noyaxis"];if(i.lineWidth=st+.001,i.strokeStyle=v,!lt&&(i.beginPath(),i.moveTo(Math.round(u),f),i.lineTo(Math.round(u),f+e),i.stroke(),y)){for(p=e/y,i.beginPath(),r=ht?1:0;r<=y-(ct?1:0);++r)i.moveTo(s=="right"?u+3:u-3,Math.round(f+p*r)),i.lineTo(u,Math.round(f+p*r));i.stroke()}for(i.fillStyle=rt,i.beginPath(),h=0,r=0;r<=o;++r){var nt=(tt-b)*((o-r)/o)+b,l=RGraph.number_format(n,nt.toFixed(ut),et,ot),l=String(typeof g=="function"?g(n,nt):l),h=Math.max(h,i.measureText(l).width);f=ft?a+(e-e/o*r):a+e/o*r,RGraph.Text(i,d,c,u-(s=="right"?-5:5),f,l,"center",s=="right"?"left":"right")}i.stroke(),k&&(i.beginPath(),i.fillStyle=it,RGraph.Text(i,d,c+2,s=="right"?u+c+h+2:u-c-h-2,e/2+a,k,"center","center",null,s=="right"?90:-90),i.stroke())},RGraph.DrawXAxis=function(n,t){var d,i,b,it,o,k;for(i in t)typeof i=="string"&&(d=i.replace(/^chart\./,"axis."),t[d]=t[i]);var r=t["axis.context"]?t["axis.context"]:n.context,l=n.gutterLeft,yt=n.gutterRight,o=n.properties["chart.gutter.left"],u=t["axis.y"],g=t["axis.min"]?t["axis.min"]:0,nt=t["axis.max"]?t["axis.max"]:null,f=t["axis.labels"]?t["axis.labels"]:null,rt=typeof t["axis.labels.position"]=="string"?t["axis.labels.position"]:"section",y=t["axis.color"]?t["axis.color"]:"black",ut=t["axis.title.color"]?t["axis.title.color"]:y,ft=t["axis.text.color"]?t["axis.text.color"]:y,e=n.canvas.width-n.gutterLeft-n.gutterRight,pt=n.canvas.height-n.gutterBottom-n.gutterTop,a=t["axis.text.font"]?t["axis.text.font"]:"Arial",s=t["axis.text.size"]?t["axis.text.size"]:10,v=typeof t["axis.align"]=="string"?t["axis.align"]:"bottom",c=t["axis.numlabels"]?t["axis.numlabels"]:5,tt=t["axis.scale.formatter"],et=Number(t["axis.scale.decimals"]),ot=t["axis.scale.invert"],st=t["axis.units.pre"]?t["axis.units.pre"]:"",ht=t["axis.units.post"]?t["axis.units.post"]:"",p=t["axis.title"]?t["axis.title"]:"",w=typeof t["axis.numticks"]=="number"?t["axis.numticks"]:f&&f.length?f.length:10,h=t["axis.hmargin"]?t["axis.hmargin"]:0,ct=t["axis.linewidth"]?t["axis.linewidth"]:1,lt=t["axis.noendtick.left"],at=t["axis.noendtick.right"],vt=t["axis.noxaxis"];if(r.lineWidth=ct+.001,r.strokeStyle=y,!vt){for(r.beginPath(),r.moveTo(o,Math.round(u)),r.lineTo(o+e,Math.round(u)),r.stroke(),r.beginPath(),i=lt?1:0;i<=w-(at?1:0);++i)r.moveTo(Math.round(o+e/w*i),u),r.lineTo(Math.round(o+e/w*i),u+(v=="bottom"?3:-3));r.stroke()}if(r.fillStyle=ft,f){for(c=f.length,r.beginPath(),i=0;i<f.length;++i)RGraph.Text(r,a,s,rt=="edge"?(e-h-h)/(f.length-1)*i+l+h:(e-h-h)/f.length*i+e/f.length/2+l+h,v=="bottom"?u+s+2:u-s-2,String(f[i]),"center","center");r.fill()}else{for(nt||alert("[DRAWXAXIS] If not specifying axis.labels you must specify axis.max!"),r.beginPath(),i=0;i<=c;++i)b=(nt-g)/c*i+g,it=String(typeof tt=="function"?tt(n,b):RGraph.number_format(n,b.toFixed(et),st,ht)),o=ot?e-e/c*i+l:e/c*i+l,RGraph.Text(r,a,s,o,v=="bottom"?u+s+2:u-s-2,it,"center","center");r.fill()}p&&(k=RGraph.MeasureText(p,!1,a,s+2),r.fillStyle=ut,RGraph.Text(r,a,s+2,e/2+n.gutterLeft,v=="bottom"?u+k[1]+10:u-k[1]-10,p,"center","center"))},RGraph.MeasureText=function(n,t,i,r){var f,u,r;return(typeof __rgraph_measuretext_cache__=="undefined"&&(__rgraph_measuretext_cache__=[]),f=n+":"+t+":"+i+":"+r,typeof __rgraph_measuretext_cache__=="object"&&__rgraph_measuretext_cache__[f])?__rgraph_measuretext_cache__[f]:(__rgraph_measuretext_cache__["text-div"]?__rgraph_measuretext_cache__["text-div"]&&(u=__rgraph_measuretext_cache__["text-div"]):(u=document.createElement("DIV"),u.style.position="absolute",u.style.top="-100px",u.style.left="-100px",document.body.appendChild(u),__rgraph_measuretext_cache__["text-div"]=u),u.innerHTML=n.replace(/\r\n/g,"<br />"),u.style.fontFamily=i,u.style.fontWeight=t?"bold":"normal",u.style.fontSize=r+"pt",r=[u.offsetWidth,u.offsetHeight],__rgraph_measuretext_cache__[f]=r,r)},RGraph.AddEffects||(RGraph.AddEffects=function(){}),RGraph.LinearGradient=function(n,t,i,r,u){for(var e=n.context.createLinearGradient(t,i,r,u),h=arguments.length-5,o,s,f=5;f<arguments.length;++f)o=arguments[f],s=(f-5)/(h-1),e.addColorStop(s,o);return e},RGraph.RadialGradient=function(n,t,i,r,u,f,e){for(var s=n.context.createRadialGradient(t,i,r,u,f,e),l=arguments.length-7,h,c,o=7;o<arguments.length;++o)h=arguments[o],c=(o-7)/(l-1),s.addColorStop(c,h);return s},RGraph.array_shift=function(n){for(var i=[],t=1;t<n.length;++t)i.push(n[t]);return i},RGraph.AddEventListener=function(n,t,i){var r=arguments[3]?arguments[3]:"unknown";RGraph.Registry.Get("chart.event.handlers").push([n,t,i,r])},RGraph.ClearEventListeners=function(n){if(n&&n=="window")window.removeEventListener("mousedown",window.__rgraph_mousedown_event_listener_installed__,!1),window.removeEventListener("mouseup",window.__rgraph_mouseup_event_listener_installed__,!1);else{var t=document.getElementById(n);t.removeEventListener("mouseup",t.__rgraph_mouseup_event_listener_installed__,!1),t.removeEventListener("mousemove",t.__rgraph_mousemove_event_listener_installed__,!1),t.removeEventListener("mousedown",t.__rgraph_mousedown_event_listener_installed__,!1),t.removeEventListener("click",t.__rgraph_click_event_listener_installed__,!1)}},RGraph.HidePalette=function(){var n=RGraph.Registry.Get("palette");typeof n=="object"&&n&&(n.style.visibility="hidden",n.style.display="none",RGraph.Registry.Set("palette",null))},RGraph.random=function(n,t){var i=arguments[2]?arguments[2]:0,r=Math.random();return Number(((t-n)*r+n).toFixed(i))},RGraph.NoShadow=function(n){n.context.shadowColor="rgba(0,0,0,0)",n.context.shadowBlur=0,n.context.shadowOffsetX=0,n.context.shadowOffsetY=0},RGraph.SetShadow=function(n,t,i,r,u){n.context.shadowColor=t,n.context.shadowOffsetX=i,n.context.shadowOffsetY=r,n.context.shadowBlur=u},RGraph.array_reverse=function(n){for(var i=[],t=n.length-1;t>=0;t--)i.push(n[t]);return i},RGraph.Registry.Set=function(n,t){return RGraph.Registry.store[n]=t,t},RGraph.Registry.Get=function(n){return RGraph.Registry.store[n]},RGraph.degrees2Radians=function(n){return n*(PI/180)},RGraph.log=function(){var n=Math.log;return function(t,i){return n(t)/(i?n(i):1)}}(),RGraph.is_array=function(n){return n!=null&&n.constructor.toString().indexOf("Array")!=-1},RGraph.trim=function(n){return RGraph.ltrim(RGraph.rtrim(n))},RGraph.ltrim=function(n){return n.replace(/^(\s|\0)+/,"")},RGraph.rtrim=function(n){return n.replace(/(\s|\0)+$/,"")},RGraph.GetHeight=function(n){return n.canvas.height},RGraph.GetWidth=function(n){return n.canvas.width},RGraph.is_null=function(n){return n==null||typeof n=="object"&&!n?!0:!1},RGraph.Timer=function(n){var t=new Date;console.log(n+": "+t.getSeconds()+"."+t.getMilliseconds())},RGraph.Async=function(n){return setTimeout(n,arguments[1]?arguments[1]:1)},RGraph.isIE=function(){return navigator.userAgent.indexOf("MSIE")>0},ISIE=RGraph.isIE(),RGraph.isIE6=function(){return navigator.userAgent.indexOf("MSIE 6")>0},ISIE6=RGraph.isIE6(),RGraph.isIE7=function(){return navigator.userAgent.indexOf("MSIE 7")>0},ISIE7=RGraph.isIE7(),RGraph.isIE8=function(){return navigator.userAgent.indexOf("MSIE 8")>0},ISIE8=RGraph.isIE8(),RGraph.isIE9=function(){return navigator.userAgent.indexOf("MSIE 9")>0},ISIE9=RGraph.isIE9(),RGraph.isIE10=function(){return navigator.userAgent.indexOf("MSIE 10")>0},ISIE10=RGraph.isIE10(),RGraph.isIE9up=function(){return navigator.userAgent.match(/MSIE (\d+)/),Number(RegExp.$1)>=9},ISIE9UP=RGraph.isIE9up(),RGraph.isIE10up=function(){return navigator.userAgent.match(/MSIE (\d+)/),Number(RegExp.$1)>=10},ISIE10UP=RGraph.isIE10up(),RGraph.isOld=function(){return ISIE6||ISIE7||ISIE8},ISOLD=ISIE6||ISIE7||ISIE8,RGraph.Reset=function(n){n.width=n.width,RGraph.ObjectRegistry.Clear(n),n.__rgraph_aa_translated__=!1}