diff --git a/Energy_Pie/module.html b/Energy_Pie/module.html index 3952247..89b4a2e 100644 --- a/Energy_Pie/module.html +++ b/Energy_Pie/module.html @@ -144,43 +144,64 @@ } // --- donut card --- - function donutCard({ title, percent, subtitle, color }) { - const share = clamp01(percent / 100); - const r = 56; - const c = 2 * Math.PI * r; - const dash = share * c; - const gap = c - dash; +function donutCard({ title, percent, subtitle, color }) { + const share = clamp01(percent / 100); + const r = 56; + const c = 2 * Math.PI * r; + const dash = share * c; + const gap = c - dash; - return ` -