Repository navigation
feat: column chart of totals per hour, day, week or month - #98
Merged
Merged
Conversation
A new history style, `column`: vertical columns over time, for energy used
per day, rain per hour or hours of heating per day. It uses the shared
history frame, so periods, previous/next, statistics, axes, the tooltip and
the compact layout all work as on the line chart.
It is set up to be right with no options. With no period it shows the last
7 days; with no `group_by` it picks a grouping for the span (hours up to two
days, days up to two months, then weeks, then months; today by hour, a week
or month by day, a year by month); and with no `aggregate` it shows how much
a meter went up (`change`) when every entity is a meter (`state_class` total
or total_increasing), else the average. So an energy meter on its own draws
a column of kWh per day. `group_by: none` draws one column per reading.
- Rounded outer ends (`rounded`, on by default). Columns are drawn as HTML
over the plot rather than in its stretched SVG, so corners stay round.
- `labels` puts each column's value on top (a stack's total), and hides them
when the columns are too narrow to fit them.
- `stack: normal` piles series up; `stack: percent` scales each column to
100 %. Positive values stack up from zero, negative ones down.
- Negative values hang below zero, and the axis always includes zero.
- `color_by: bands` colours each column by its value's colour band.
- `range: true` draws each column from the group's lowest to its highest,
with the average marked across it. From statistics it asks the recorder
for min and max; from history it takes the spread of the values held in
each group. The shared history frame gained an opt-in for this, so other
charts are unchanged.
- Several entities sit side by side in each group.
- An entity's `target` (from the Limits section) is marked across each of
its columns.
- When grouped, the time axis puts one label under each set of columns
(Mon, Tue... or 26 Oct, Oct, Nov), every second or third when they would
not fit, and the tooltip names the whole group ("26 Oct - 1 Nov") and
highlights it.
Editor: Chart section has the period (7 days by default), Group readings by
(with Automatic and Don't group), Combine with, Stack, Colour, Range, Show
values on the columns and Rounded tops, then axes and layout. Each entity
gets its own Colour.
Closes #11
github-actions Bot
pushed a commit
that referenced
this pull request
Nov 2, 2026
## [1.3.0](v1.2.0...v1.3.0) (2026-11-02) ### Features * area chart of an entity's history, filled, stacked or split at zero ([#97](#97)) ([4fdefb5](4fdefb5)), closes [#10](#10) * column chart of totals per hour, day, week or month ([#98](#98)) ([3e158af](3e158af)), closes [#11](#11) * combined chart mixing lines, columns and areas, with a second axis ([#99](#99)) ([d79ffc2](d79ffc2)), closes [#12](#12) * group a chart's readings by hour, day, week or month ([#94](#94)) ([5ec00e5](5ec00e5)), closes [#49](#49) * show today, this week, an earlier period, and step back with buttons ([#93](#93)) ([53d4b21](53d4b21)), closes [#50](#50) ### Bug Fixes * space time labels by the plot's width, not the card's ([#96](#96)) ([4897ccf](4897ccf)) ### Documentation * Chartdeck is in the HACS default store ([#100](#100)) ([d139a27](d139a27)) * list the area, column and combined charts in the README ([#101](#101)) ([3d7823e](3d7823e))
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A new history style,
column: vertical columns over time, for energy used per day, rain per hour or hours of heating per day. It uses the shared history frame, so periods, previous/next, statistics, axes, the tooltip and the compact layout all work as on the line chart.It is set up to be right with no options. With no period it shows the last 7 days; with no
group_byit picks a grouping for the span (hours up to two days, days up to two months, then weeks, then months; today by hour, a week or month by day, a year by month); and with noaggregateit shows how much a meter went up (change) when every entity is a meter (state_classtotal or total_increasing), else the average. So an energy meter on its own draws a column of kWh per day.group_by: nonedraws one column per reading.rounded, on by default). Columns are drawn as HTML over the plot rather than in its stretched SVG, so corners stay round.labelsputs each column's value on top (a stack's total), and hides them when the columns are too narrow to fit them.stack: normalpiles series up;stack: percentscales each column to 100 %. Positive values stack up from zero, negative ones down.color_by: bandscolours each column by its value's colour band.range: truedraws each column from the group's lowest to its highest, with the average marked across it. From statistics it asks the recorder for min and max; from history it takes the spread of the values held in each group. The shared history frame gained an opt-in for this, so other charts are unchanged.target(from the Limits section) is marked across each of its columns.Editor: Chart section has the period (7 days by default), Group readings by (with Automatic and Don't group), Combine with, Stack, Colour, Range, Show values on the columns and Rounded tops, then axes and layout. Each entity gets its own Colour.
Part of milestone 1.3.0 (tracker #47). Tested on the dev Home Assistant instance.
Closes #11