Skip to content

feat: combined chart mixing lines, columns and areas, with a second axis - #99

Merged
tempus2016 merged 1 commit into
mainfrom
feat/combined-chart
Nov 2, 2026
Merged

tempus2016 merged 1 commit into
mainfrom
feat/combined-chart

Conversation

@tempus2016

Copy link
Copy Markdown
Owner

A new history style, combined: each entity is drawn as a line, columns or an area (type, per entity), on one time axis. Daily energy as columns with the day's average temperature as a line; power as an area with the electricity price as a line; or all three together.

  • A second value axis on the right for a different unit. By default the first entity's unit goes on the left and any other unit on the right; an entity's y_axis: left|right overrides that. The right axis has its own round steps; gridlines follow the left one.
  • Areas are drawn at the back, then columns, then lines on top. Areas and columns stand on zero; areas keep their colour below zero.
  • With any columns and no group_by, readings are grouped to fit the span (as on the column chart), and every series is drawn at the middle of its group so a line runs over the columns' centres. Each series is combined its own way: a meter's change (energy per day) next to a temperature's average, or the entity's own aggregate. Statistics load one column for all series, so there the card's aggregate applies.
  • The tooltip lists every series, with dots on lines and areas at their own axis' scale, and names the whole group when grouped.

Built on the column and area charts and the line chart's line drawing, so all three look the same here as on their own. The chart area can now draw value labels on its right edge.

Editor: Chart section has the period, grouping, Line shape, Line width, Dots and Rounded tops, then axes and layout. Each entity has Draw as (Line, Columns, Area), Value axis (Automatic, Left, Right), Colour, Combine with, Line shape, Line width, Dashed and Colour below zero.

Part of milestone 1.3.0 (tracker #47). Tested on the dev Home Assistant instance.

Closes #12

A new history style, `combined`: each entity is drawn as a line, columns or
an area (`type`, per entity), on one time axis. Daily energy as columns with
the day's average temperature as a line; power as an area with the
electricity price as a line; or all three together.

- A second value axis on the right for a different unit. By default the
  first entity's unit goes on the left and any other unit on the right; an
  entity's `y_axis: left|right` overrides that. The right axis has its own
  round steps; gridlines follow the left one.
- Areas are drawn at the back, then columns, then lines on top. Areas and
  columns stand on zero; areas keep their colour below zero.
- With any columns and no `group_by`, readings are grouped to fit the span
  (as on the column chart), and every series is drawn at the middle of its
  group so a line runs over the columns' centres. Each series is combined
  its own way: a meter's change (energy per day) next to a temperature's
  average, or the entity's own `aggregate`. Statistics load one column for
  all series, so there the card's `aggregate` applies.
- The tooltip lists every series, with dots on lines and areas at their own
  axis' scale, and names the whole group when grouped.

Built on the column and area charts and the line chart's line drawing, so
all three look the same here as on their own. The chart area can now draw
value labels on its right edge.

Editor: Chart section has the period, grouping, Line shape, Line width,
Dots and Rounded tops, then axes and layout. Each entity has Draw as (Line,
Columns, Area), Value axis (Automatic, Left, Right), Colour, Combine with,
Line shape, Line width, Dashed and Colour below zero.

Closes #12
@github-actions github-actions Bot added the tests The unit suite and coverage label Nov 2, 2026
@tempus2016
tempus2016 merged commit d79ffc2 into main Nov 2, 2026
9 checks passed
@tempus2016
tempus2016 deleted the feat/combined-chart branch November 2, 2026 22:02
@github-project-automation github-project-automation Bot moved this from Todo to Done in Chartdeck Planner Nov 2, 2026
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))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

tests The unit suite and coverage

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

[Chart]: Combined line, column and area

1 participant