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