+(max*i/4).toFixed(0),pad.l-4,y+4); } // bars vals.forEach((v,i)=>{ const bh=H*(v/max); const x=pad.l+i*bw+bw*.1; const bww=bw*.8; ctx.fillStyle='#0EA5E9'; ctx.beginPath(); ctx.roundRect?ctx.roundRect(x,pad.t+H-bh,bww,bh,3):ctx.rect(x,pad.t+H-bh,bww,bh); ctx.fill(); if(v>0){ctx.fillStyle='#0C4A6E';ctx.font='9px sans-serif';ctx.textAlign='center';ctx.fillText('R let clockI; function startClock(){ clearInterval(clockI); const up = ()=>{const el=$('adm-clock');if(el)el.textContent=new Date().toLocaleTimeString('pt-BR',{hour:'2-digit',minute:'2-digit'});}; up(); clockI = setInterval(up, 10000); } // INIT — render kanban empty on start renderKanban(); +v.toFixed(0),x+bww/2,pad.t+H-bh-4);} }); // labels ctx.fillStyle='#0369A1';ctx.font='9px sans-serif';ctx.textAlign='center'; labels.forEach((l,i)=>{ if(i%2===0||labels.length<=10) ctx.fillText(l,pad.l+i*bw+bw/2,pad.t+H+16); }); // title ctx.fillStyle='#0C4A6E';ctx.font='bold 12px sans-serif';ctx.textAlign='center'; ctx.fillText('Vendas dos �ltimos 14 dias',canvas.width/2,14); } // CLOCK let clockI; function startClock(){ clearInterval(clockI); const up = ()=>{const el=$('adm-clock');if(el)el.textContent=new Date().toLocaleTimeString('pt-BR',{hour:'2-digit',minute:'2-digit'});}; up(); clockI = setInterval(up, 10000); } // INIT — render kanban empty on start renderKanban();