diff --git a/html/can.js b/html/can.js index a7504f93..f4acd2ef 100644 --- a/html/can.js +++ b/html/can.js @@ -1,6 +1,7 @@ function hasCan(){var c0=document.getElementById('can0');c=document.getElementById('can');return !!(c0&&c&&c.getContext&&c.getContext('2d'));} function sep(d){ans={};var ar=d.split("\t");var l=ar.length;for(var i=0;i(zm-0.5)){return(zm-0.5)}return z} function gchx(c,x){return gch(x*c['xm']+c['xo'],c['ctx'].canvas.width)} function gchy(c,y){return gch((1-y)*c['ym']+c['yo'],c['ctx'].canvas.height)} @@ -37,7 +38,7 @@ for(var i=0;i=x0;i-=(6*3600)){var n=dfmt(i);var xo=(i-x0)/(x1-x0);if(c['tkey']){gbe(c,xo,0);gln(c,xo,-0.02);gst(c);gfz(c,xo,0,0,-hi*tpos,n,'brown','center')}if(c['tlines']){gbe(c,xo,0);gln(c,xo,1);gst(c)}} +for(var i=xhr;i>=x0;i-=(6*3600)){var n=dfmt(c,i);var xo=(i-x0)/(x1-x0);if(c['tkey']){gbe(c,xo,0);gln(c,xo,-0.02);gst(c);gfz(c,xo,0,0,-hi*tpos,n,'brown','center')}if(c['tlines']){gbe(c,xo,0);gln(c,xo,1);gst(c)}} glw(c,0.1); gss(c,'black'); if(c['smooth']){var xa=0,ya=0,xb=0,yb=0; @@ -47,11 +48,12 @@ glw(c,0.2); gss(c,'red'); var y=(av-y0)/(y1-y0); gbe(c,0,y);gln(c,1,y);gst(c); -var t=''+av.toFixed(2);gfz(c,1,y,1,0,t,'red','left') +var t=''+av.toFixed(2).'av';gfz(c,1,y,1,0,t,'red','left') } function sn(i,shi){if(shi.indexOf(' Shift ')<0){return ''+(i%10)}else{return shi.replace(/.* ([a-z])[a-z]*$/,'$1')}} -function gc(c){var div=document.getElementById('can0');while(div.firstChild){div.removeChild(div.firstChild)}c['can']=document.createElement('canvas');c['can'].id='can';c['wx']=window.innerWidth;c['wy']=window.innerHeight;c['xm']=Math.round(c['wx']*0.9+0.5);c['ym']=Math.round(c['wy']*0.8+0.5);if(c['ym']>c['xm']){c['ym']=c['xm']}c['xo']=0.0;c['yo']=0.0;c['ctx']=c['can'].getContext('2d');c['ctx'].canvas.width=c['xm']+1;c['ctx'].canvas.height=c['ym']+1;div.appendChild(c['can']);div=document.getElementById('smooth');c['smooth']=(div&&div.checked);div=document.getElementById('over');c['over']=(div&&div.checked);div=document.getElementById('skey');c['skey']=(div&&div.checked);div=document.getElementById('slines');c['slines']=(div&&div.checked);div=document.getElementById('tkey');c['tkey']=(div&&div.checked);div=document.getElementById('tlines');c['tlines']=(div&&div.checked);div=document.getElementById('zerob');c['zerob']=(div&&div.checked)} -function gdrw(d){var c={};gc(c); +function gc(c){var div=document.getElementById('can0');while(div.firstChild){div.removeChild(div.firstChild)}c['can']=document.createElement('canvas');c['can'].id='can';c['wx']=window.innerWidth;c['wy']=window.innerHeight;c['xm']=Math.round(c['wx']*0.9+0.5);c['ym']=Math.round(c['wy']*0.8+0.5);if(c['ym']>c['xm']){c['ym']=c['xm']}c['xo']=0.0;c['yo']=0.0;c['ctx']=c['can'].getContext('2d');c['ctx'].canvas.width=c['xm']+1;c['ctx'].canvas.height=c['ym']+1;div.appendChild(c['can'])} +function gopt(c){ccb(c,'smooth');ccb(c,'over');ccb(c,'skey');ccb(c,'slines');ccb(c,'tkey');ccb(c,'tlines');ccb(c,'zerob');ccb(c,'utc')} +function gdrw(d){var c={};gc(c);gopt(c); gfs(c,'white');gss(c,'#0000c0');glw(c,0.5);gbd(c); var rows=d['rows'],ymin=-1,ymax=0,xmin=-1,xmax=0; var tda=0; diff --git a/pool/page_usperf.php b/pool/page_usperf.php index 650df30f..68794134 100644 --- a/pool/page_usperf.php +++ b/pool/page_usperf.php @@ -10,7 +10,7 @@ function dousperf($data, $user) else $vlines = true; - $pg = '

User Shift Performance


'; + $pg = '

User Shift Reward Performance


'; if ($ans['STATUS'] == 'ok' and $ans['DATA'] != '') { $pg .= "
shift key "; @@ -22,7 +22,8 @@ function dousperf($data, $user) $pg .= " time lines "; $pg .= " key overlap "; $pg .= " smooth "; - $pg .= " zero based
"; + $pg .= " zero based "; + $pg .= " utc"; $pg .= "
"; $pg .= "A graph will show here if your browser supports html5/canvas"; $pg .= "
\n";