You are reading the development docs (2026.12.1-dev.1): features here may not be released yet.
Skip to content

Chart Card ​

custom:lcards-chart

Chart card: a 24-hour temperature history as an orange area with a gradient fill, a blue smoothed line from a data source, and a dashed comfort threshold

A chart of your Home Assistant sensors over time: lines, areas, columns, gauges, range bands, candlesticks and more. It picks up your LCARS theme's colours and fonts, so most charts need nothing more than a list of entities.

  • Each entry under sources is one series: an entity's history, Home Assistant's long-term statistics, or an LCARdS data source.
  • The card is built on ApexCharts. You don't need to know ApexCharts to use it: these pages cover everything LCARdS sets up for you.

Try it

  • In the card editor, Open Configuration Studio gives you a live preview while you add series, pick a chart type and adjust colours.
  • The Playground lets you edit chart YAML here in the docs and see the result.

The charts on these pages are drawn by the card's own code from generated sample data.

PageCovers
Series and TimeWhere the data comes from, series options, the time window, grouping, Y axes
Chart TypesEvery chart type with an example, gauges, range charts, mixing types in one chart
StylingColours, lines, fills, markers, grid, fonts, theme, animation, raw ApexCharts options
Axes and LabelsReference lines, legend, value labels, axes, formatters, tooltip and toolbar
ExamplesComplete charts to copy
PlaygroundEdit YAML and see the chart live
UpgradingOlder chart configs, and coming from apexcharts-card

Quick start ​

Three charts to start from: one sensor, two sensors as areas, and a week of daily energy from long-term statistics.

  • Without graph_span a chart shows the last 24 hours, and it moves along as time passes.
  • Statistics suit long spans: see Long-term statistics.
yaml
type: custom:lcards-chart
sources:
  - entity: sensor.living_room_temperature
yaml
type: custom:lcards-chart
chart_type: area
sources:
  - entity: sensor.living_room_temperature
    name: Living room
  - entity: sensor.outdoor_temperature
    name: Outside
style:
  legend:
    show: true
yaml
type: custom:lcards-chart
chart_type: column
graph_span: 7d
sources:
  - entity: sensor.energy_consumption
    name: Energy per day
    statistics:
      type: change
      period: day

Chart types ​

chart_type picks how the series are drawn. Time charts plot each series over the time window; the round charts, the radar and the treemap show each series' latest value.

  • A series can override the chart type with its own type, so one chart can show columns and a line together: see Mixing chart types.
  • Every type is shown with an example on Chart Types.
yaml
type: custom:lcards-chart
chart_type: radialBar
sources:
  - entity: sensor.phone_battery
    name: Phone
  - entity: sensor.living_room_humidity
    name: Humidity
TypeShowsData
lineValues over time as linesAny series
areaLines with the area below filledAny series
columnVertical barsAny series; works well with grouping
barHorizontal bars, one per point, labelled with its timeAny series; group it so there are only a few bars
scatterIndividual pointsAny series
heatmapOne row per series, colour by valueAny series; works well with grouping
radialBarCircular gauges, one per seriesThe latest value of each series (0 to 100 works best)
pie, donutSlices of a wholeThe latest value of each series (use two or more)
polarAreaSlices sized by valueThe latest value of each series
radarValues around a polygonThe latest value of each series
treemapRectangles sized by valueThe latest value of each series
rangeAreaA shaded band from low to highSee Range charts
boxPlotSpread of values per time bucketSee Range charts
candlestickOpen, high, low and close per time bucketSee Range charts
rangeBarA timeline: a row per entity, a bar for each stretch of one stateEntity history, see Timelines

Card options ​

The chart's own top-level keys. Each block has its own page; this table links to it.

  • The chart also takes the keys every LCARdS card takes (height, width, id, tags, grid_options, data_sources ...): see Common card properties. Rules can restyle a chart through its id and tags: see the Rules Engine.
  • In a sections view the chart takes 6 columns and 4 rows unless grid_options says otherwise, and can't be made smaller than 4 by 2.
yaml
type: custom:lcards-chart
chart_type: area
graph_span: 12h
yaxis:
  - id: temperature
    min: -10
    max: 30
sources:
  - entity: sensor.outdoor_temperature
    name: Outside
KeyTypeDefaultDescription
typestringrequiredcustom:lcards-chart
sourceslist-The series: see Series and Time and Series options
chart_typestringlineHow the series are drawn: see Chart types
state_bandslist-An entity's states shaded behind the series: see State bands
sync_groupstring-Charts that move together when you hover or zoom one: see Linked charts
graph_spanstring24hHow much time the chart shows: see Time window
spanobject-Line the window up with the calendar, or move it back: see Time window
yaxislistone shared axisSeveral Y axes: see Y axes
xaxis_typestringcategory for bar, else datetimedatetime, category or numeric
data_sourcesobject-LCARdS data sources the series can plot: see Data Sources
styleobjectyour theme's chart styleColours, lines, labels and more: see Styling and Axes and Labels

Older options (source, series_names, history_hours, ...) still work: see Upgrading.

Released under the MIT License. | About