no message

This commit is contained in:
belevo\mh
2025-12-18 08:23:16 +01:00
parent 90701ec350
commit d2bae877a4

View File

@@ -215,8 +215,9 @@ function donutCard({ title, percent, subtitle, color }) {
const share = clamp01(percent / 100);
const r = 56;
const c = 2 * Math.PI * r;
const dash = share * c; // farbiger Anteil
const rest = c - dash; // Rest (dunkel)
let dash = share * c;
// Schutz gegen Rundungs-Artefakte bei 99.9..100%
if (dash > c - 0.01) dash = c;
return `
<div style="padding:18px 10px;
@@ -240,7 +241,7 @@ return `
stroke="${color}"
stroke-width="18"
stroke-linecap="butt"
stroke-dasharray="${dash} ${rest}"
stroke-dasharray="${dash} ${c}"
transform="rotate(-90 90 90)"
style="filter: drop-shadow(0 0 12px ${color});" />
</svg>