Fix: Energie-Dashboard Nodes größer R=62, Icon 28px (v1.7.2)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -439,16 +439,16 @@ function renderEnergy(inverters, aggregates, period) {
|
||||
}
|
||||
|
||||
// Circle node — HA style
|
||||
const R = 56;
|
||||
const R = 62;
|
||||
function node(cx, cy, iconName, topLabel, valW, col, active, sub) {
|
||||
const c = active ? col : C.dim;
|
||||
const sw = active ? 2 : 1;
|
||||
const fi = active ? '0.08' : '0.03';
|
||||
return `<g>
|
||||
<circle cx="${cx}" cy="${cy}" r="${R}" fill="${col}" fill-opacity="${fi}" stroke="${c}" stroke-width="${sw}"/>
|
||||
${icon(iconName, cx, cy - 15, c, 26)}
|
||||
<text x="${cx}" y="${cy+7}" text-anchor="middle" font-size="14" font-weight="700" fill="${active?col:C.txt}" dominant-baseline="middle">${fW(valW)}</text>
|
||||
<text x="${cx}" y="${cy+24}" text-anchor="middle" font-size="10" fill="${C.dim}" dominant-baseline="middle" letter-spacing=".06em">${topLabel}${sub?' · '+sub:''}</text>
|
||||
${icon(iconName, cx, cy - 17, c, 28)}
|
||||
<text x="${cx}" y="${cy+8}" text-anchor="middle" font-size="14" font-weight="700" fill="${active?col:C.txt}" dominant-baseline="middle">${fW(valW)}</text>
|
||||
<text x="${cx}" y="${cy+26}" text-anchor="middle" font-size="10" fill="${C.dim}" dominant-baseline="middle" letter-spacing=".06em">${topLabel}${sub?' · '+sub:''}</text>
|
||||
</g>`;
|
||||
}
|
||||
|
||||
@@ -467,12 +467,12 @@ function renderEnergy(inverters, aggregates, period) {
|
||||
}
|
||||
|
||||
// Kreuz-Layout: Solar(260,72) oben, Grid(108,224) links, Haus(260,224) Mitte,
|
||||
// Batterie(412,224) rechts, Wallbox(260,376) unten (optional). R=56, Abstand=40px.
|
||||
// Batterie(412,224) rechts, Wallbox(260,376) unten (optional). R=62, Abstand=28px.
|
||||
const SEG = [
|
||||
{ id:'ep-pv', d:`M 260,128 C 258,148 262,152 260,168`, col:C.pv, on:pvOn, rev:false },
|
||||
{ id:'ep-grid', d:`M 164,224 C 183,220 185,228 204,224`, col:impOn?C.imp:C.exp, on:impOn||expOn, rev:expOn },
|
||||
{ id:'ep-bat', d:`M 316,224 C 335,220 337,228 356,224`, col:C.bat, on:chOn||dchOn, rev:dchOn },
|
||||
...(hasEV ? [{ id:'ep-ev', d:`M 260,280 C 258,300 262,304 260,320`, col:C.ev, on:evOn, rev:false }] : []),
|
||||
{ id:'ep-pv', d:`M 260,134 C 258,148 262,148 260,162`, col:C.pv, on:pvOn, rev:false },
|
||||
{ id:'ep-grid', d:`M 170,224 C 182,220 186,228 198,224`, col:impOn?C.imp:C.exp, on:impOn||expOn, rev:expOn },
|
||||
{ id:'ep-bat', d:`M 322,224 C 334,220 338,228 350,224`, col:C.bat, on:chOn||dchOn, rev:dchOn },
|
||||
...(hasEV ? [{ id:'ep-ev', d:`M 260,286 C 258,300 262,300 260,314`, col:C.ev, on:evOn, rev:false }] : []),
|
||||
];
|
||||
|
||||
const defs = SEG.map(s => `<path id="${s.id}" d="${s.d}" fill="none"/>`).join('');
|
||||
@@ -488,7 +488,7 @@ function renderEnergy(inverters, aggregates, period) {
|
||||
const batLbl = chOn ? 'LADEN' : dchOn ? 'ENTLADEN' : 'BATTERIE';
|
||||
const batSub = batSoc != null ? Math.round(batSoc) + '%' : '';
|
||||
|
||||
const svgH = hasEV ? 460 : 310;
|
||||
const svgH = hasEV ? 468 : 310;
|
||||
const svg = `<svg viewBox="0 0 520 ${svgH}" width="100%" style="display:block" xmlns="http://www.w3.org/2000/svg">
|
||||
<defs>${defs}</defs>
|
||||
${lines}
|
||||
|
||||
Reference in New Issue
Block a user