Activiteit per dag
A grid with one square per day across half a year, coloured by volume, with a tooltip per square and arrow-key navigation. For deliveries, visits or tickets at a glance.
opleveringen in 26 weken
How to use it
- Paste the HTML where the numbers & charts should appear.
- Add the CSS to your stylesheet. All classes are prefixed, so nothing clashes with your own styles.
- Add the JavaScript and call init() with the element that contains the HTML.
<!-- Activiteit per dag · © 2026 NedDev BV · NedDev Lab-licentie (gratis gebruik, niet doorverkopen) · neddev.com/nl/lab/gebruik/#licentie -->
<div class="jouw-container">
<div class="h6-cmg"><div class="h6-cmg__top"><p class="h6-cmg__t"><strong class="h6-cmg__sum"></strong> opleveringen in 26 weken</p><div class="h6-cmg__key" aria-hidden="true"><span>minder</span><i class="h6-cmg__l0"></i><i class="h6-cmg__l1"></i><i class="h6-cmg__l2"></i><i class="h6-cmg__l3"></i><i class="h6-cmg__l4"></i><span>meer</span></div></div><div class="h6-cmg__wrap"><div class="h6-cmg__months" aria-hidden="true"></div><div class="h6-cmg__body"><div class="h6-cmg__days" aria-hidden="true"><span>ma</span><span></span><span>wo</span><span></span><span>vr</span><span></span><span>zo</span></div><div class="h6-cmg__grid" role="group" aria-label="Opleveringen per dag, gebruik de pijltjestoetsen"></div></div></div><div class="h6-cmg__tip" aria-hidden="true"></div><span class="h6-cmg__sr" aria-live="polite"></span></div>
</div>/* Activiteit per dag · © 2026 NedDev BV · NedDev Lab-licentie (gratis gebruik, niet doorverkopen) · neddev.com/nl/lab/gebruik/#licentie */
.h6-cmg{position:absolute;inset:0;background:#f4f3f1;display:flex;flex-direction:column;justify-content:center;gap:12px;padding:0 20px;box-sizing:border-box;font-family:'Switzer',sans-serif;color:#0a0a0a;container-type:inline-size}
.h6-cmg__top{display:flex;justify-content:space-between;align-items:baseline;flex-wrap:wrap;gap:6px 16px;max-width:520px;width:100%;margin:0 auto}
.h6-cmg__t{margin:0;font-size:14px}
.h6-cmg__sum{font-size:18px;font-weight:700}
.h6-cmg__key{display:flex;align-items:center;gap:3px;font-size:12px;color:#5d5a55}
.h6-cmg__key span{margin:0 4px}
.h6-cmg__key i{width:10px;height:10px;border-radius:2px}
.h6-cmg__wrap{--s:clamp(7px,calc((100cqw - 74px) / 26 - 3px),15px);max-width:520px;width:100%;margin:0 auto}
.h6-cmg__months{display:grid;grid-template-columns:repeat(26,var(--s));column-gap:3px;margin:0 0 4px 26px;height:14px;font-size:11px;color:#5d5a55}
.h6-cmg__months span{white-space:nowrap}
.h6-cmg__body{display:flex;gap:4px}
.h6-cmg__days{display:grid;grid-template-rows:repeat(7,var(--s));row-gap:3px;width:22px;font-size:10px;line-height:var(--s);color:#5d5a55}
.h6-cmg__grid{display:grid;grid-template-rows:repeat(7,var(--s));grid-auto-flow:column;grid-auto-columns:var(--s);gap:3px}
.h6-cmg__d{width:var(--s);height:var(--s);border-radius:2px;outline:none;cursor:default}
.h6-cmg__d:focus-visible,.h6-cmg__d.is-hot{box-shadow:0 0 0 2px #0a0a0a}
.h6-cmg__l0{background:#e2dfda}.h6-cmg__l1{background:#fbcdb9}.h6-cmg__l2{background:#f89a74}.h6-cmg__l3{background:#F5480F}.h6-cmg__l4{background:#a32c05}
.h6-cmg__tip{position:absolute;left:0;top:0;z-index:3;pointer-events:none;background:#0a0a0a;color:#fff;font-size:12px;line-height:1.3;padding:6px 9px;border-radius:4px;white-space:nowrap;opacity:0;transition:opacity .12s}
.h6-cmg__tip.is-on{opacity:1}
.h6-cmg__sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}// Activiteit per dag · © 2026 NedDev BV · NedDev Lab-licentie (gratis gebruik, niet doorverkopen) · neddev.com/nl/lab/gebruik/#licentie
// root = het element waarin de HTML staat
function init(root){
var w=root.querySelector('.h6-cmg');if(!w)return;
var grid=w.querySelector('.h6-cmg__grid'),months=w.querySelector('.h6-cmg__months'),tip=w.querySelector('.h6-cmg__tip'),sr=w.querySelector('.h6-cmg__sr');
var WEEKS=26,DAYS=WEEKS*7,seed=20261018;
function rnd(){seed=(seed*48271)%2147483647;return seed/2147483647;}
var MAAND=['jan','feb','mrt','apr','mei','jun','jul','aug','sep','okt','nov','dec'],DAG=['ma','di','wo','do','vr','za','zo'];
var start=new Date(2026,3,20),cells=[],total=0,cur=DAYS-1;
for(var i=0;i<DAYS;i++){var d=new Date(start.getFullYear(),start.getMonth(),start.getDate()+i),wd=i%7,wk=Math.floor(i/7);
var busy=wd>4?.12:.55+.35*Math.sin(wk/4.2)*.5+(wk>12&&wk<17?-.3:0);
var n=rnd()<busy?Math.max(1,Math.round(rnd()*7*busy+rnd()*2)):0;total+=n;
var lv=n===0?0:n<=2?1:n<=4?2:n<=6?3:4;
var c=document.createElement('span');c.className='h6-cmg__d h6-cmg__l'+lv;c.tabIndex=i===cur?0:-1;
var lab=DAG[wd]+' '+d.getDate()+' '+MAAND[d.getMonth()]+' · '+(n===0?'geen opleveringen':n===1?'1 oplevering':n+' opleveringen');
c.setAttribute('aria-label',lab);c.dataset.i=i;grid.appendChild(c);cells.push({el:c,label:lab,date:d});}
w.querySelector('.h6-cmg__sum').textContent=total;
var prev=-1;for(var k=0;k<WEEKS;k++){var m=cells[k*7].date.getMonth();var s=document.createElement('span');if(m!==prev&&k<WEEKS-2){s.textContent=MAAND[m];}prev=m;months.appendChild(s);}
function showTip(i){var c=cells[i].el,wr=w.getBoundingClientRect(),r=c.getBoundingClientRect();
tip.textContent=cells[i].label.charAt(0).toUpperCase()+cells[i].label.slice(1);tip.classList.add('is-on');
var tw=tip.offsetWidth,th=tip.offsetHeight,x=r.left-wr.left+r.width/2-tw/2,y=r.top-wr.top-th-8;
x=Math.max(6,Math.min(wr.width-tw-6,x));if(y<4)y=r.bottom-wr.top+8;
tip.style.transform='translate('+Math.round(x)+'px,'+Math.round(y)+'px)';}
function hideTip(){tip.classList.remove('is-on');}
function focusCell(i){i=Math.max(0,Math.min(DAYS-1,i));cells[cur].el.tabIndex=-1;cur=i;var c=cells[i].el;c.tabIndex=0;c.focus();showTip(i);sr.textContent=cells[i].label;}
grid.addEventListener('pointerover',function(e){var t=e.target.closest('.h6-cmg__d');if(!t)return;cells.forEach(function(x){x.el.classList.remove('is-hot');});t.classList.add('is-hot');showTip(+t.dataset.i);});
grid.addEventListener('pointerleave',function(){cells.forEach(function(x){x.el.classList.remove('is-hot');});if(!grid.contains(document.activeElement))hideTip();});
grid.addEventListener('focusin',function(e){var t=e.target.closest('.h6-cmg__d');if(t){cells[cur].el.tabIndex=-1;cur=+t.dataset.i;t.tabIndex=0;showTip(cur);}});
grid.addEventListener('focusout',function(){setTimeout(function(){if(!grid.contains(document.activeElement))hideTip();},0);});
grid.addEventListener('keydown',function(e){var mv={ArrowUp:-1,ArrowDown:1,ArrowLeft:-7,ArrowRight:7}[e.key];
if(e.key==='Home')mv=-(cur%7);if(e.key==='End')mv=6-(cur%7);
if(mv===undefined)return;e.preventDefault();focusCell(cur+mv);});
}
init(document.querySelector('.jouw-container'));
More numbers & charts
Seen something you like?
Add it to your selection and send it over. We build your site around it, in your brand.
Get in touch →