Skip to content

Style Duration Curve

tempus2016 edited this page Nov 21, 2026 · 2 revisions

Duration curve (vNEXT+)

How long a sensor spent at or above each value. The readings are sorted from highest to lowest, each as wide as the time it held, so the bottom runs from 0 to 100 % of the time and the curve's height at 14 % is the value the sensor was at or above for 14 % of it. It is a history chart like Line, and shares its period, calendar spans, previous and next buttons, statistics, grouping, axes and compact layout.

Good for

Solar output over a season, the house's power draw, a heat pump's flow temperature: how often a value is reached, rather than when.

Example

type: custom:chartdeck-card
style: duration_curve
title: Solar, last 90 days
period:
  last: 90
  unit: day
markers: [2]
skip_zero: true
entities:
  - sensor.solar_power

To use this style, set style: duration_curve (or pick Duration curve under Distributions in the editor's Style section). The chart options are in the editor's Chart section.

Sensible defaults

  • Weighted by time. A reading counts for as long as it held, until the next one; the last one holds until now, or the end of the span. Gaps count nothing. From statistics or grouped readings, each row or group counts for its length.
  • Each entity is a curve, a stepped line with a light fill down to zero in the entity's colour.
  • The value axis starts at 0 when every reading is 0 or more. Negative readings fit.
  • Period: the last 24 hours when period isn't set, as on the line chart.

Options

markers: [2, 5]    # values to label; a number, a list, or text like "2, 5"
skip_zero: false   # true: readings of exactly 0 are left out of the time (default false)
  • markers labels each value with a dashed guide across to where the curve crosses it, a line down and a dot, and a sentence: "Above 2 kW for 14% of the time". "Above" means strictly above. A marker above every reading reads 0 %; one below every reading, 100 %.
  • With one curve the sentence sits beside its dot. With several curves, with header: over, or for a marker outside the value axis, the sentences go in a list under the chart, each after its curve's name when there are several.
  • A marker is printed with the decimals you typed (1.5 reads "1.5 kW"). In text, commas, semicolons and spaces all separate values, so write decimals with a dot.
  • skip_zero: true leaves readings of exactly 0 out of the time, so a solar panel's nights don't take up half the chart and the shares are of the time it produced.
  • Per entity, color sets the curve's colour. The per-entity when and transform work as on the line chart.

Hovering or touching the chart picks a whole percent and shows each curve's value there, under "At or above this for 14% of the time". The marker sentences are also read out by screen readers.

In the editor: the period and source options, Values to mark (e.g. 2, 5), Leave out time at zero, the axes with Labels along the bottom, and the layout options. Each entity has a Line colour.

Missing entities

An entity with no readings, or one that doesn't exist, has no curve; the others still draw. With no readings at all the chart says "No readings in this period."

Everything else

The period, calendar spans, source, grouping, axes, gridlines and compact layout are the same as on the line chart. See Line for each one. The curve draws in when the card loads, without motion when the browser asks for less.

Layout: one chart for the whole card. Every shared option is described on the Options page.

Previous: Cycle plot · Next: Time in each state · All styles

Clone this wiki locally