Upload index.html
Browse files- index.html +13 -2
index.html
CHANGED
|
@@ -591,6 +591,11 @@
|
|
| 591 |
#reportSheet.region-infographic-sheet .ig-regional-caution{font-size:8px!important;padding:4px 7px!important;margin:3px 0 6px!important}
|
| 592 |
}
|
| 593 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 594 |
</style></head>
|
| 595 |
<body>
|
| 596 |
<div class="app">
|
|
@@ -1471,9 +1476,15 @@ function igMonthChart(months,prop,isNew){
|
|
| 1471 |
const monthNames=['jan','feb','mrt','apr','mei','jun','jul','aug','sep','okt','nov','dec'];
|
| 1472 |
const lookup=new Map(months.map(x=>[Number(x.key.slice(5))-1,Number(x[prop])||0]));
|
| 1473 |
const maximum=Math.max(1,...lookup.values());
|
| 1474 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1475 |
const v=lookup.get(i),height=v===undefined||v===0?0:Math.max(4,Math.round(v/maximum*84));
|
| 1476 |
-
|
|
|
|
|
|
|
| 1477 |
}).join('')}</div>`;
|
| 1478 |
}
|
| 1479 |
function igDonut(values,colors,label,inside){
|
|
|
|
| 591 |
#reportSheet.region-infographic-sheet .ig-regional-caution{font-size:8px!important;padding:4px 7px!important;margin:3px 0 6px!important}
|
| 592 |
}
|
| 593 |
|
| 594 |
+
|
| 595 |
+
/* INFOGRAPHIC V2.2 — lange maandwaarden verticaal in mintgroene staven, met behoud van de bestaande schaal. */
|
| 596 |
+
.infographic-sheet .ig-month-bars.ig-vertical-values .ig-bar{position:relative;display:flex;justify-content:center;align-items:center}
|
| 597 |
+
.infographic-sheet .ig-month-bars.ig-vertical-values .ig-val-vertical{display:block;position:static;width:auto;height:auto;max-width:100%;line-height:1;font-size:10.8px;font-weight:800;color:#123f3a;white-space:nowrap;writing-mode:vertical-rl;transform:rotate(180deg);text-align:center;text-shadow:none;letter-spacing:.15px}
|
| 598 |
+
|
| 599 |
</style></head>
|
| 600 |
<body>
|
| 601 |
<div class="app">
|
|
|
|
| 1476 |
const monthNames=['jan','feb','mrt','apr','mei','jun','jul','aug','sep','okt','nov','dec'];
|
| 1477 |
const lookup=new Map(months.map(x=>[Number(x.key.slice(5))-1,Number(x[prop])||0]));
|
| 1478 |
const maximum=Math.max(1,...lookup.values());
|
| 1479 |
+
// Bij vier- of meercijferige waarden past een horizontaal label niet in één maandkolom.
|
| 1480 |
+
// Toon daarom de volledige waarde verticaal ín de balk; kortere balken behouden het label boven de balk.
|
| 1481 |
+
// Dit is uitsluitend weergavelogica: de waarde, schaal en rekenregels blijven identiek.
|
| 1482 |
+
const vertical=!isNew&&maximum>=1000;
|
| 1483 |
+
return `<div class="ig-month-bars${isNew?' ig-new-bars':''}${vertical?' ig-vertical-values':''}" role="img" aria-label="${isNew?'Nieuwe cliënten':'Cliënten'} per maand">${monthNames.map((m,i)=>{
|
| 1484 |
const v=lookup.get(i),height=v===undefined||v===0?0:Math.max(4,Math.round(v/maximum*84));
|
| 1485 |
+
const verticalHere=vertical&&v!==undefined&&height>=44;
|
| 1486 |
+
const value=v===undefined?'':igNL(v);
|
| 1487 |
+
return `<div class="ig-month">${verticalHere?'':`<span class="ig-val">${value}</span>`}<span class="ig-bar" style="height:${height}px">${verticalHere?`<span class="ig-val ig-val-vertical">${value}</span>`:''}</span><span class="ig-label">${m}</span></div>`;
|
| 1488 |
}).join('')}</div>`;
|
| 1489 |
}
|
| 1490 |
function igDonut(values,colors,label,inside){
|