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;rNumber(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;tn.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=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;t0)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;in.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;t0)for(t=0;t0)){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;rr.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=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=n&&r>=t?u+=TWOPI:i>=n&&rTWOPI&&(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"),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=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}