Skip to content

Commit ebc812a

Browse files
committed
fix(ui): order Load before Grid import/export in charts
For inverters that don't export, placing Load before the grid series creates a visual gap between months instead of a zero-height grid bar.
1 parent 408c087 commit ebc812a

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

‎api/static/index.html‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -771,9 +771,9 @@ <h3 id="rule-editor-title">Edit Automation</h3>
771771
mk('Solar','pv1_power','#eab308'),
772772
mk('Battery charge','charge_power','#a855f7'),
773773
mk('Battery discharge','discharge_power','#22c55e'),
774+
mk('Load','load_power','#f97316'),
774775
mk('Grid import','grid_import_power','#3b82f6'),
775-
mk('Grid export','grid_export_power','#ef4444'),
776-
mk('Load','load_power','#f97316')
776+
mk('Grid export','grid_export_power','#ef4444')
777777
]);
778778
// Battery power = discharge - charge (net). There is no single 'battery_power'
779779
// register in history, so compute it from the two that do exist.
@@ -846,9 +846,9 @@ <h3 id="rule-editor-title">Edit Automation</h3>
846846
{label:'PV', data: rows.map(r=>r.pv), backgroundColor:'#eab308'},
847847
{label:'Battery in', data: rows.map(r=>r.battery_in), backgroundColor:'#a855f7'},
848848
{label:'Battery out', data: rows.map(r=>r.battery_out), backgroundColor:'#22c55e'},
849+
{label:'Load', data: rows.map(r=>r.load), backgroundColor:'#f97316'},
849850
{label:'Grid import', data: rows.map(r=>r.grid_in), backgroundColor:'#3b82f6'},
850-
{label:'Grid export', data: rows.map(r=>r.grid_out), backgroundColor:'#ef4444'},
851-
{label:'Load', data: rows.map(r=>r.load), backgroundColor:'#f97316'}
851+
{label:'Grid export', data: rows.map(r=>r.grid_out), backgroundColor:'#ef4444'}
852852
]);
853853
} catch (e) { console.error(e); }
854854
}

0 commit comments

Comments
 (0)