diff --git a/Energy_Pie/module.html b/Energy_Pie/module.html index 53e7c2a..7c4e9bb 100644 --- a/Energy_Pie/module.html +++ b/Energy_Pie/module.html @@ -146,17 +146,44 @@ Netzbezug: ${v.Netz?.toFixed(2)||0} kWh `; - const donut=(t,p,c)=>` -
-
${t}
- - +const donut = (t, p, c) => { + const r = 56; + const C = 2 * Math.PI * r; // Umfang + const dash = (Math.max(0, Math.min(100, p)) / 100) * C; + + return ` +
+
${t}
+ +
+ + + + + + -
${p.toFixed(1)}%
-
`; + + +
+ ${p.toFixed(1)}% +
+
+
+ `; +}; const prod=v.Produktion||0; const cons=v.Hausverbrauch||0;