hd-bars
A period as bars against the previous one: each value a bar in its colour with a soft glow, the previous period’s value behind it as an outline, the running bar (current) drawn as “so far”, values below zero hanging under the line. Hover or tap a bar to read both. Bars grow in at full motion only; flat on e-ink. For any series of numbers: an hour by hour day, a week, a month.
| Attribute | What it is |
|---|---|
valuesrequired | The values, separated by commas, e.g. {{ energy.electricity.hours.values }}. |
previous | The previous period’s values, drawn behind as outlines, e.g. {{ energy.electricity.hours.previous }}. |
labels | A label per bar, separated by commas (Mon,Tue…); some are left out when they don’t fit. |
current | Index of the running bar (0 first), drawn as so far; the ones after it are still to come. |
color | A theme colour name.One of accent, lit, cool, good, warn, danger, chart-1, chart-2, chart-3, chart-4, chart-5, chart-6. Default accent. |
unit | Unit for the values read out, e.g. kWh. |
legend | What the bars and the outlines are, separated by a comma, e.g. “This week,Last week”: drawn above the bars and read in the tooltip. |
names | The same words for the tooltip only, without drawing a legend: rows of bars under each other name theirs this way, e.g. {{ energy.periods.week.electricity.bars.names }}. |
axis | Whether the labels show under the bars; none keeps them for the tooltip only, so of rows under each other only the last carries them.One of labels, none. Default labels. |
<hd-bars values="{{ energy.electricity.compare.week.bars.values }}" previous="{{ energy.electricity.compare.week.bars.previous }}" labels="{{ energy.electricity.compare.week.bars.labels }}" current="{{ energy.electricity.compare.week.bars.current }}" unit="kWh"></hd-bars>