Repository navigation
Style Duration Curve
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.
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.
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_powerTo 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.
- 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
periodisn't set, as on the line chart.
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)-
markerslabels 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.5reads "1.5 kW"). In text, commas, semicolons and spaces all separate values, so write decimals with a dot. -
skip_zero: trueleaves 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,
colorsets the curve's colour. The per-entitywhenandtransformwork 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.
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."
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
Start
Using it
-
Styles
- Bar
- Thin
- Segmented
- Tank
- Ring
- Needle
- Arc
- Line
- Area
- Column
- Combined
- Pie and donut
- Rings
- Pictograph
- Waffle
- Histogram
- Scatter
- Bubble
- Heatmap
- Box plot
- Funnel
- Waterfall
- Treemap
- Sunburst and icicle
- Radar
- Polar area
- Grouped and stacked bars
- Bullet
- Lollipop
- Slope
- Dumbbell
- Range area
- Sparkline
- Streamgraph
- Candlestick
- Violin and raincloud
- Beeswarm
- State timeline
- Climate
- Sankey
- Wind rose
- 24-hour clock
- Trend
- Marimekko
- Chord
- Battery grid
- Spiral
- Strip plot
- Cycle plot
- Duration curve
- Time in each state
- Badge
- Tile feature
- Options
- Visual editor
- Colour bands
Help