403Webshell
Server IP : 202.61.199.114  /  Your IP : 216.73.217.139
Web Server : nginx/1.22.1
System : Linux de.arni-solutions.de 6.1.0-49-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.174-1 (2026-05-26) x86_64
User : web20 ( 1018)
PHP Version : 8.4.23
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /tmp/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /tmp/a.js
(function(){
// ===== Performance-Dashboard: kombiniertes Diagramm (Balken Provision + 3 Linien) =====
(function(){
    var host=document.querySelector('.pdash-chart[data-pdash]');
    if(!host) return;
    var D; try{ D=JSON.parse(host.getAttribute('data-pdash')); }catch(e){ return; }
    var axis=D.axis||[]; if(!axis.length) return;
    var SVGNS='http://www.w3.org/2000/svg';
    var W=1000,H=320,padL=46,padR=52,padT=14,padB=26;
    var plotW=W-padL-padR, plotH=H-padT-padB, n=axis.length;
    var SER=[{k:'visitors',c:'#2563eb',name:'Besucher'},{k:'organic',c:'#16a34a',name:'Organische Klicks'},{k:'affClicks',c:'#f59e0b',name:'Affiliate-Klicks'}];
    var fmtInt=function(v){return new Intl.NumberFormat('de-DE').format(Math.round(v));};
    var fmtEur=function(v){return new Intl.NumberFormat('de-DE',{minimumFractionDigits:2,maximumFractionDigits:2}).format(v)+' €';};
    function nice(m){ m=Math.max(1,m); var p=Math.pow(10,Math.max(0,String(Math.floor(m)).length-1)); return Math.ceil(m/p)*p; }
    function el(t,a){ var e=document.createElementNS(SVGNS,t); for(var k in a)e.setAttribute(k,a[k]); return e; }
    function esc(s){var d=document.createElement('div');d.textContent=s==null?'':String(s);return d.innerHTML;}
    function dLabel(iso){var p=String(iso).split('-');return p[2]+'.'+p[1]+'.';}

    var maxL=1,maxC=0;
    SER.forEach(function(s){(D[s.k]||[]).forEach(function(v){if(v>maxL)maxL=v;});});
    (D.commission||[]).forEach(function(v){if(v>maxC)maxC=v;});
    var niceL=nice(maxL), niceC=nice(maxC);
    var xStep=n>1?plotW/(n-1):plotW;
    var xAt=function(i){return n<=1?padL+plotW/2:padL+plotW*i/(n-1);};
    var yL=function(v){return padT+plotH*(1-v/niceL);};
    var yC=function(v){return padT+plotH*(1-(niceC>0?v/niceC:0));};

    var svg=el('svg',{viewBox:'0 0 '+W+' '+H,preserveAspectRatio:'none',role:'img','aria-label':'Performance-Verlauf'});
    var grid=4;
    for(var g=0;g<=grid;g++){
        var gy=padT+plotH*g/grid;
        svg.appendChild(el('line',{x1:padL,y1:gy.toFixed(1),x2:W-padR,y2:gy.toFixed(1),stroke:'#eceff3','stroke-width':1}));
        var tl=el('text',{x:padL-6,y:(gy+3).toFixed(1),'text-anchor':'end','font-size':10,fill:'#94a3b8'}); tl.textContent=fmtInt(niceL*(1-g/grid)); svg.appendChild(tl);
        if(niceC>0){ var tr=el('text',{x:W-padR+6,y:(gy+3).toFixed(1),'text-anchor':'start','font-size':10,fill:'#a78bfa'}); tr.textContent=Math.round(niceC*(1-g/grid)); svg.appendChild(tr); }
    }
    for(var i=0;i<n;i++){ if(n<=16||i%5===0||i===n-1){ var tx=el('text',{x:xAt(i).toFixed(1),y:H-7,'text-anchor':'middle','font-size':9,fill:'#94a3b8'}); tx.textContent=dLabel(axis[i]); svg.appendChild(tx); } }

    // Balken Provision (rechte Achse)
    var bw=Math.max(2,Math.min(16,xStep*0.55));
    (D.commission||[]).forEach(function(v,i){ if(v<=0)return; var h=padT+plotH-yC(v); svg.appendChild(el('rect',{x:(xAt(i)-bw/2).toFixed(1),y:yC(v).toFixed(1),width:bw.toFixed(1),height:Math.max(0,h).toFixed(1),rx:2,fill:'#a78bfa','fill-opacity':.55})); });
    // Linien
    SER.forEach(function(s){ var pts=[]; (D[s.k]||[]).forEach(function(v,i){pts.push(xAt(i).toFixed(1)+','+yL(v).toFixed(1));}); svg.appendChild(el('polyline',{points:pts.join(' '),fill:'none',stroke:s.c,'stroke-width':2,'stroke-linejoin':'round','stroke-linecap':'round'})); });

    // Hover
    var guide=el('line',{x1:0,y1:padT,x2:0,y2:padT+plotH,stroke:'#cbd5e1','stroke-width':1,opacity:0}); svg.appendChild(guide);
    var dots=SER.map(function(s){var c=el('circle',{r:3.5,fill:s.c,stroke:'#fff','stroke-width':1.5,opacity:0});svg.appendChild(c);return c;});
    var hit=el('rect',{x:padL,y:padT,width:plotW,height:plotH,fill:'transparent'}); svg.appendChild(hit);
    var tip=document.createElement('div'); tip.className='pdash-tip'; document.body.appendChild(tip);
    function move(ev){
        var box=svg.getBoundingClientRect(), rx=(ev.clientX-box.left)/box.width*W;
        var i=Math.round((rx-padL)/(n>1?plotW/(n-1):1)); if(i<0)i=0; if(i>n-1)i=n-1;
        var gx=xAt(i); guide.setAttribute('x1',gx); guide.setAttribute('x2',gx); guide.setAttribute('opacity',1);
        var rows='';
        SER.forEach(function(s,si){ var v=(D[s.k]||[])[i]||0; dots[si].setAttribute('cx',gx); dots[si].setAttribute('cy',yL(v)); dots[si].setAttribute('opacity',1);
            rows+='<div><span style="display:inline-block;width:8px;height:8px;border-radius:2px;background:'+s.c+';margin-right:5px"></span>'+esc(s.name)+': <b>'+fmtInt(v)+'</b></div>'; });
        var cv=(D.commission||[])[i]||0;
        rows+='<div><span style="display:inline-block;width:8px;height:8px;border-radius:2px;background:#a78bfa;margin-right:5px"></span>Provision: <b>'+fmtEur(cv)+'</b></div>';
        tip.innerHTML='<div style="opacity:.7;margin-bottom:3px">'+dLabel(axis[i])+'</div>'+rows; tip.style.opacity=1;
        var tx=ev.clientX+14, ty=ev.clientY+14; if(tx+tip.offsetWidth>window.innerWidth-10)tx=ev.clientX-tip.offsetWidth-14;
        tip.style.left=tx+'px'; tip.style.top=ty+'px';
    }
    function leave(){ guide.setAttribute('opacity',0); dots.forEach(function(d){d.setAttribute('opacity',0);}); tip.style.opacity=0; }
    hit.addEventListener('mousemove',move); hit.addEventListener('mouseleave',leave);
    host.appendChild(svg);
})();
})();

;

(function(){var nav=document.getElementById("ovTabs");if(!nav)return;var btns=nav.querySelectorAll("[data-tab]"),panes=document.querySelectorAll(".site-tab[data-pane]");Array.prototype.forEach.call(btns,function(b){b.addEventListener("click",function(){var n=b.getAttribute("data-tab");Array.prototype.forEach.call(btns,function(x){x.classList.toggle("active",x===b);});Array.prototype.forEach.call(panes,function(p){p.hidden=(p.getAttribute("data-pane")!==n);});if(history.replaceState){try{var u=new URL(window.location);u.searchParams.set("tab",n);history.replaceState(null,"",u);}catch(e){}}});});})();

;

// ===== Affiliate-Tab: eine Linie je Partnerprogramm =====
(function(){
    var host=document.querySelector('.affpp-chart[data-affpp]');
    if(!host) return;
    var D; try{ D=JSON.parse(host.getAttribute('data-affpp')); }catch(e){ return; }
    var axis=D.axis||[], series=D.series||[];
    if(!axis.length || !series.length){ host.innerHTML='<div class="text-muted small py-3 text-center">Keine Programmdaten.</div>'; return; }
    var legendHost=document.querySelector('.affpp-legend');
    var COLORS=['#2563eb','#16a34a','#f59e0b','#db2777','#7c3aed','#0891b2','#dc2626','#65a30d','#0d9488','#9333ea','#ea580c','#475569'];
    var SVGNS='http://www.w3.org/2000/svg', W=1000,H=300,padL=46,padR=14,padT=14,padB=26;
    var plotW=W-padL-padR, plotH=H-padT-padB, n=axis.length, metric='clicks', hidden={};
    var fmtInt=function(v){return new Intl.NumberFormat('de-DE').format(Math.round(v));};
    var fmtEur=function(v){return new Intl.NumberFormat('de-DE',{minimumFractionDigits:2,maximumFractionDigits:2}).format(v)+' €';};
    var fmtVal=function(v){return metric==='commission'?fmtEur(v):fmtInt(v);};
    function nice(m){ m=Math.max(1,m); var p=Math.pow(10,Math.max(0,String(Math.floor(m)).length-1)); return Math.ceil(m/p)*p; }
    function el(t,a){ var e=document.createElementNS(SVGNS,t); for(var k in a)e.setAttribute(k,a[k]); return e; }
    function esc(s){var d=document.createElement('div');d.textContent=s==null?'':String(s);return d.innerHTML;}
    function dLabel(iso){var p=String(iso).split('-');return p[2]+'.'+p[1]+'.';}
    var tip=document.createElement('div'); tip.className='pdash-tip'; document.body.appendChild(tip);

    function render(){
        host.innerHTML='';
        var maxY=1; series.forEach(function(s,si){ if(hidden[si])return; (s[metric]||[]).forEach(function(v){if(v>maxY)maxY=v;}); });
        var niceY=nice(maxY);
        var xAt=function(i){return n<=1?padL+plotW/2:padL+plotW*i/(n-1);};
        var yAt=function(v){return padT+plotH*(1-v/niceY);};
        var svg=el('svg',{viewBox:'0 0 '+W+' '+H,preserveAspectRatio:'none',class:'aff-chart',role:'img','aria-label':'Tagesverlauf je Partnerprogramm'});
        var grid=4;
        for(var g=0;g<=grid;g++){ var gy=padT+plotH*g/grid;
            svg.appendChild(el('line',{x1:padL,y1:gy.toFixed(1),x2:W-padR,y2:gy.toFixed(1),stroke:'#eceff3','stroke-width':1}));
            var t=el('text',{x:padL-6,y:(gy+3).toFixed(1),'text-anchor':'end','font-size':10,fill:'#94a3b8'}); t.textContent=fmtVal(niceY*(1-g/grid)); svg.appendChild(t);
        }
        for(var i=0;i<n;i++){ if(n<=16||i%5===0||i===n-1){ var tx=el('text',{x:xAt(i).toFixed(1),y:H-7,'text-anchor':'middle','font-size':9,fill:'#94a3b8'}); tx.textContent=dLabel(axis[i]); svg.appendChild(tx); } }
        series.forEach(function(s,si){ if(hidden[si])return; var col=COLORS[si%COLORS.length], pts=[];
            for(var i=0;i<n;i++) pts.push(xAt(i).toFixed(1)+','+yAt((s[metric]||[])[i]||0).toFixed(1));
            svg.appendChild(el('polyline',{points:pts.join(' '),fill:'none',stroke:col,'stroke-width':2,'stroke-linejoin':'round','stroke-linecap':'round'}));
        });
        var guide=el('line',{x1:0,y1:padT,x2:0,y2:padT+plotH,stroke:'#cbd5e1','stroke-width':1,opacity:0}); svg.appendChild(guide);
        var dots=series.map(function(s,si){var c=el('circle',{r:3,fill:COLORS[si%COLORS.length],stroke:'#fff','stroke-width':1.5,opacity:0});svg.appendChild(c);return c;});
        var hit=el('rect',{x:padL,y:padT,width:plotW,height:plotH,fill:'transparent'}); svg.appendChild(hit);
        function move(ev){ var box=svg.getBoundingClientRect(), rx=(ev.clientX-box.left)/box.width*W;
            var i=Math.round((rx-padL)/(n>1?plotW/(n-1):1)); if(i<0)i=0; if(i>n-1)i=n-1; var gx=xAt(i);
            guide.setAttribute('x1',gx); guide.setAttribute('x2',gx); guide.setAttribute('opacity',1);
            var rows='';
            series.forEach(function(s,si){ if(hidden[si]){dots[si].setAttribute('opacity',0);return;} var v=(s[metric]||[])[i]||0;
                dots[si].setAttribute('cx',gx); dots[si].setAttribute('cy',yAt(v)); dots[si].setAttribute('opacity',1);
                rows+='<div><span style="display:inline-block;width:8px;height:8px;border-radius:2px;background:'+COLORS[si%COLORS.length]+';margin-right:5px"></span>'+esc(s.name)+': <b>'+fmtVal(v)+'</b></div>'; });
            tip.innerHTML='<div style="opacity:.7;margin-bottom:3px">'+dLabel(axis[i])+'</div>'+rows; tip.style.opacity=1;
            var tx=ev.clientX+14, ty=ev.clientY+14; if(tx+tip.offsetWidth>window.innerWidth-10)tx=ev.clientX-tip.offsetWidth-14;
            tip.style.left=tx+'px'; tip.style.top=ty+'px';
        }
        function leave(){ guide.setAttribute('opacity',0); dots.forEach(function(d){d.setAttribute('opacity',0);}); tip.style.opacity=0; }
        hit.addEventListener('mousemove',move); hit.addEventListener('mouseleave',leave);
        host.appendChild(svg);
    }
    function renderLegend(){
        if(!legendHost) return; legendHost.innerHTML='';
        series.forEach(function(s,si){ var tot=0; (s[metric]||[]).forEach(function(v){tot+=v;});
            var lg=document.createElement('span'); lg.className='affpp-lg'+(hidden[si]?' off':'');
            lg.innerHTML='<span class="sw" style="background:'+COLORS[si%COLORS.length]+'"></span>'+esc(s.name)+' <span class="affpp-tot">('+fmtVal(tot)+')</span>';
            lg.addEventListener('click',function(){ hidden[si]=!hidden[si]; lg.classList.toggle('off',hidden[si]); render(); });
            legendHost.appendChild(lg);
        });
    }
    var mt=document.querySelector('.affpp-metric');
    if(mt) mt.querySelectorAll('[data-metric]').forEach(function(b){ b.addEventListener('click',function(){
        metric=b.getAttribute('data-metric'); mt.querySelectorAll('[data-metric]').forEach(function(x){x.classList.toggle('active',x===b);}); render(); renderLegend();
    });});
    render(); renderLegend(); window.addEventListener('resize', render);
})();

// ===== SEO-Tab: Klicks/Impressionen mit Hover-Legende =====
(function(){
    var host=document.querySelector('.seo-chart[data-seo]');
    if(!host) return;
    var D; try{ D=JSON.parse(host.getAttribute('data-seo')); }catch(e){ return; }
    if(!D.length){ host.innerHTML='<div class="text-muted small py-3 text-center">Keine Daten.</div>'; return; }
    var SVGNS='http://www.w3.org/2000/svg', W=1000,H=300,padL=46,padR=52,padT=14,padB=26;
    var plotW=W-padL-padR, plotH=H-padT-padB, n=D.length;
    var fmtInt=function(v){return new Intl.NumberFormat('de-DE').format(Math.round(v));};
    function nice(m){ m=Math.max(1,m); var p=Math.pow(10,Math.max(0,String(Math.floor(m)).length-1)); return Math.ceil(m/p)*p; }
    function el(t,a){ var e=document.createElementNS(SVGNS,t); for(var k in a)e.setAttribute(k,a[k]); return e; }
    function esc(s){var d=document.createElement('div');d.textContent=s==null?'':String(s);return d.innerHTML;}
    function dLabel(iso){var p=String(iso).split('-');return p[2]+'.'+p[1]+'.';}
    var maxC=1,maxI=1; D.forEach(function(d){ if(d.clicks>maxC)maxC=d.clicks; if(d.impressions>maxI)maxI=d.impressions; });
    var niceC=nice(maxC), niceI=nice(maxI);
    var xAt=function(i){return n<=1?padL+plotW/2:padL+plotW*i/(n-1);};
    var yC=function(v){return padT+plotH*(1-v/niceC);};
    var yI=function(v){return padT+plotH*(1-v/niceI);};
    var svg=el('svg',{viewBox:'0 0 '+W+' '+H,preserveAspectRatio:'none',class:'aff-chart',role:'img','aria-label':'Suchmaschinen-Verlauf'});
    var grid=4;
    for(var g=0;g<=grid;g++){ var gy=padT+plotH*g/grid;
        svg.appendChild(el('line',{x1:padL,y1:gy.toFixed(1),x2:W-padR,y2:gy.toFixed(1),stroke:'#eceff3','stroke-width':1}));
        var tlc=el('text',{x:padL-6,y:(gy+3).toFixed(1),'text-anchor':'end','font-size':10,fill:'#2563eb'}); tlc.textContent=fmtInt(niceC*(1-g/grid)); svg.appendChild(tlc);
        var tri=el('text',{x:W-padR+6,y:(gy+3).toFixed(1),'text-anchor':'start','font-size':10,fill:'#f59e0b'}); tri.textContent=fmtInt(niceI*(1-g/grid)); svg.appendChild(tri);
    }
    for(var i=0;i<n;i++){ if(n<=16||i%5===0||i===n-1){ var tx=el('text',{x:xAt(i).toFixed(1),y:H-7,'text-anchor':'middle','font-size':9,fill:'#94a3b8'}); tx.textContent=dLabel(D[i].date); svg.appendChild(tx); } }
    var ip=[],cp=[]; for(var i=0;i<n;i++){ ip.push(xAt(i).toFixed(1)+','+yI(D[i].impressions).toFixed(1)); cp.push(xAt(i).toFixed(1)+','+yC(D[i].clicks).toFixed(1)); }
    svg.appendChild(el('polyline',{points:ip.join(' '),fill:'none',stroke:'#f59e0b','stroke-width':2,'stroke-linejoin':'round','stroke-linecap':'round'}));
    svg.appendChild(el('polyline',{points:cp.join(' '),fill:'none',stroke:'#2563eb','stroke-width':2,'stroke-linejoin':'round','stroke-linecap':'round'}));
    var guide=el('line',{x1:0,y1:padT,x2:0,y2:padT+plotH,stroke:'#cbd5e1','stroke-width':1,opacity:0}); svg.appendChild(guide);
    var dotC=el('circle',{r:3.5,fill:'#2563eb',stroke:'#fff','stroke-width':1.5,opacity:0}); svg.appendChild(dotC);
    var dotI=el('circle',{r:3.5,fill:'#f59e0b',stroke:'#fff','stroke-width':1.5,opacity:0}); svg.appendChild(dotI);
    var hit=el('rect',{x:padL,y:padT,width:plotW,height:plotH,fill:'transparent'}); svg.appendChild(hit);
    var tip=document.createElement('div'); tip.className='pdash-tip'; document.body.appendChild(tip);
    function move(ev){ var box=svg.getBoundingClientRect(), rx=(ev.clientX-box.left)/box.width*W;
        var i=Math.round((rx-padL)/(n>1?plotW/(n-1):1)); if(i<0)i=0; if(i>n-1)i=n-1; var d=D[i], gx=xAt(i);
        guide.setAttribute('x1',gx); guide.setAttribute('x2',gx); guide.setAttribute('opacity',1);
        dotC.setAttribute('cx',gx); dotC.setAttribute('cy',yC(d.clicks)); dotC.setAttribute('opacity',1);
        dotI.setAttribute('cx',gx); dotI.setAttribute('cy',yI(d.impressions)); dotI.setAttribute('opacity',1);
        tip.innerHTML='<div style="opacity:.7;margin-bottom:3px">'+dLabel(d.date)+'</div>'
            +'<div><span style="display:inline-block;width:8px;height:8px;border-radius:2px;background:#2563eb;margin-right:5px"></span>Klicks: <b>'+fmtInt(d.clicks)+'</b></div>'
            +'<div><span style="display:inline-block;width:8px;height:8px;border-radius:2px;background:#f59e0b;margin-right:5px"></span>Impressionen: <b>'+fmtInt(d.impressions)+'</b></div>'
            +'<div style="opacity:.8">CTR: <b>'+new Intl.NumberFormat("de-DE",{minimumFractionDigits:2,maximumFractionDigits:2}).format(d.ctr)+' %</b> · Ø Pos.: <b>'+(d.position>0?new Intl.NumberFormat("de-DE",{minimumFractionDigits:1,maximumFractionDigits:1}).format(d.position):"—")+'</b></div>';
        tip.style.opacity=1;
        var tx=ev.clientX+14, ty=ev.clientY+14; if(tx+tip.offsetWidth>window.innerWidth-10)tx=ev.clientX-tip.offsetWidth-14;
        tip.style.left=tx+'px'; tip.style.top=ty+'px';
    }
    function leave(){ guide.setAttribute('opacity',0); dotC.setAttribute('opacity',0); dotI.setAttribute('opacity',0); tip.style.opacity=0; }
    hit.addEventListener('mousemove',move); hit.addEventListener('mouseleave',leave);
    host.appendChild(svg);
})();

// ===== Besucher-Tab: Besucher/Seitenaufrufe mit Hover-Legende =====
(function(){
    var host=document.querySelector('.vis-chart[data-vis]');
    if(!host) return;
    var D; try{ D=JSON.parse(host.getAttribute('data-vis')); }catch(e){ return; }
    if(!D.length){ host.innerHTML='<div class="text-muted small py-3 text-center">Keine Daten.</div>'; return; }
    var SVGNS='http://www.w3.org/2000/svg', W=1000,H=300,padL=46,padR=52,padT=14,padB=26;
    var plotW=W-padL-padR, plotH=H-padT-padB, n=D.length;
    var fmtInt=function(v){return new Intl.NumberFormat('de-DE').format(Math.round(v));};
    function nice(m){ m=Math.max(1,m); var p=Math.pow(10,Math.max(0,String(Math.floor(m)).length-1)); return Math.ceil(m/p)*p; }
    function el(t,a){ var e=document.createElementNS(SVGNS,t); for(var k in a)e.setAttribute(k,a[k]); return e; }
    function dLabel(iso){var p=String(iso).split('-');return p[2]+'.'+p[1]+'.';}
    var maxV=1,maxP=1; D.forEach(function(d){ if(d.visitors>maxV)maxV=d.visitors; if(d.pageviews>maxP)maxP=d.pageviews; });
    var niceV=nice(maxV), niceP=nice(maxP);
    var xAt=function(i){return n<=1?padL+plotW/2:padL+plotW*i/(n-1);};
    var yV=function(v){return padT+plotH*(1-v/niceV);};
    var yP=function(v){return padT+plotH*(1-v/niceP);};
    var svg=el('svg',{viewBox:'0 0 '+W+' '+H,preserveAspectRatio:'none',class:'aff-chart',role:'img','aria-label':'Besucher-Verlauf'});
    var grid=4;
    for(var g=0;g<=grid;g++){ var gy=padT+plotH*g/grid;
        svg.appendChild(el('line',{x1:padL,y1:gy.toFixed(1),x2:W-padR,y2:gy.toFixed(1),stroke:'#eceff3','stroke-width':1}));
        var tlv=el('text',{x:padL-6,y:(gy+3).toFixed(1),'text-anchor':'end','font-size':10,fill:'#2563eb'}); tlv.textContent=fmtInt(niceV*(1-g/grid)); svg.appendChild(tlv);
        var trp=el('text',{x:W-padR+6,y:(gy+3).toFixed(1),'text-anchor':'start','font-size':10,fill:'#16a34a'}); trp.textContent=fmtInt(niceP*(1-g/grid)); svg.appendChild(trp);
    }
    for(var i=0;i<n;i++){ if(n<=16||i%5===0||i===n-1){ var tx=el('text',{x:xAt(i).toFixed(1),y:H-7,'text-anchor':'middle','font-size':9,fill:'#94a3b8'}); tx.textContent=dLabel(D[i].date); svg.appendChild(tx); } }
    var pp=[],vp=[]; for(var i=0;i<n;i++){ pp.push(xAt(i).toFixed(1)+','+yP(D[i].pageviews).toFixed(1)); vp.push(xAt(i).toFixed(1)+','+yV(D[i].visitors).toFixed(1)); }
    svg.appendChild(el('polyline',{points:pp.join(' '),fill:'none',stroke:'#16a34a','stroke-width':2,'stroke-linejoin':'round','stroke-linecap':'round'}));
    svg.appendChild(el('polyline',{points:vp.join(' '),fill:'none',stroke:'#2563eb','stroke-width':2,'stroke-linejoin':'round','stroke-linecap':'round'}));
    var guide=el('line',{x1:0,y1:padT,x2:0,y2:padT+plotH,stroke:'#cbd5e1','stroke-width':1,opacity:0}); svg.appendChild(guide);
    var dotV=el('circle',{r:3.5,fill:'#2563eb',stroke:'#fff','stroke-width':1.5,opacity:0}); svg.appendChild(dotV);
    var dotP=el('circle',{r:3.5,fill:'#16a34a',stroke:'#fff','stroke-width':1.5,opacity:0}); svg.appendChild(dotP);
    var hit=el('rect',{x:padL,y:padT,width:plotW,height:plotH,fill:'transparent'}); svg.appendChild(hit);
    var tip=document.createElement('div'); tip.className='pdash-tip'; document.body.appendChild(tip);
    function move(ev){ var box=svg.getBoundingClientRect(), rx=(ev.clientX-box.left)/box.width*W;
        var i=Math.round((rx-padL)/(n>1?plotW/(n-1):1)); if(i<0)i=0; if(i>n-1)i=n-1; var d=D[i], gx=xAt(i);
        guide.setAttribute('x1',gx); guide.setAttribute('x2',gx); guide.setAttribute('opacity',1);
        dotV.setAttribute('cx',gx); dotV.setAttribute('cy',yV(d.visitors)); dotV.setAttribute('opacity',1);
        dotP.setAttribute('cx',gx); dotP.setAttribute('cy',yP(d.pageviews)); dotP.setAttribute('opacity',1);
        tip.innerHTML='<div style="opacity:.7;margin-bottom:3px">'+dLabel(d.date)+'</div>'
            +'<div><span style="display:inline-block;width:8px;height:8px;border-radius:2px;background:#2563eb;margin-right:5px"></span>Besucher: <b>'+fmtInt(d.visitors)+'</b></div>'
            +'<div><span style="display:inline-block;width:8px;height:8px;border-radius:2px;background:#16a34a;margin-right:5px"></span>Seitenaufrufe: <b>'+fmtInt(d.pageviews)+'</b></div>'
            +(d.conversions>0?'<div style="opacity:.8">Conversions: <b>'+fmtInt(d.conversions)+'</b></div>':'');
        tip.style.opacity=1;
        var tx=ev.clientX+14, ty=ev.clientY+14; if(tx+tip.offsetWidth>window.innerWidth-10)tx=ev.clientX-tip.offsetWidth-14;
        tip.style.left=tx+'px'; tip.style.top=ty+'px';
    }
    function leave(){ guide.setAttribute('opacity',0); dotV.setAttribute('opacity',0); dotP.setAttribute('opacity',0); tip.style.opacity=0; }
    hit.addEventListener('mousemove',move); hit.addEventListener('mouseleave',leave);
    host.appendChild(svg);
})();

Youez - 2016 - github.com/yon3zu
LinuXploit