Sparkline specialized charts¶
Specialized charts offer different ways to display historical data without using a conventional line or area chart. Equalizer and graded charts highlight numeric levels, state bands show how named states change over time, and barcode charts use color to make changes in value easy to recognize.
Shared color behavior¶
Specialized charts can calculate a separate color for each displayed bin or level. Use colorstops_transition to choose between clearly defined color thresholds and smooth transitions between the configured colors.
1 2 3 4 5 6 7 8 9 10 | |
See Color Stops for reusable color-stop templates and threshold definitions.
Equalizer chart¶
Basic usage¶
An equalizer divides the visible Y range into a configurable number of levels. For each time bin, it highlights the levels that correspond to the recorded value.
| Equalizer chart |
|---|
![]() |
1 2 3 4 5 6 | |
Configuration fields¶
| Field | Required | Default | Description |
|---|---|---|---|
show.chart_type | Use equalizer to display an equalizer chart. | ||
equalizer.value_buckets | 10 | The number of vertical value levels shown in the chart. | |
equalizer.square | false | Displays square levels when enabled. | |
equalizer.column_spacing | 1 | The amount of space between consecutive time bins. | |
equalizer.row_spacing | 1 | The amount of space between value levels. |
Styling¶
Equalizer levels use the configured entity color, line colors, or color stops. When color stops are calculated per bin, the chart can communicate both the value and its threshold state at a glance.
Period support¶
real_time | rolling_window | calendar |
|---|---|---|
Axes, grid, labels, and tooltip¶
| Display element | Support |
|---|---|
| X-axis | Yes, automatic. |
| Y-axis | Yes, automatic. |
| Grid | X and Y. |
| Tick marks | X and Y. |
| Labels | X and Y. |
| Tooltip and indicator | No. |
Graded chart¶
Basic usage¶
A graded chart assigns each bin value to one of the ranks defined by its color stops. This is useful when the category or grade matters more than the value’s exact numeric position.
1 2 3 4 5 | |
Add ranks to the color-stop entries when their visual order should differ from their numeric definition order.
Configuration fields¶
| Field | Required | Default | Description |
|---|---|---|---|
show.chart_type | Use graded to display a graded chart. | ||
graded.square | false | Displays square grade indicators when enabled. | |
equalizer.value_buckets | 10 | The number of grade levels visible in the chart. | |
color_stops.colors | Defines the values, colors, and optional ranks used by the chart. |
Styling¶
The ranks in the configured color stops determine which grade is shown and which color it uses. Color-stop templates are especially useful when several cards share the same grading scale.
Period support¶
real_time | rolling_window | calendar |
|---|---|---|
Axes, grid, labels, and tooltip¶
| Display element | Support |
|---|---|
| X-axis | No. |
| Y-axis | No. |
| Grid | No. |
| Tick marks | No. |
| Labels | No. |
| Tooltip and indicator | No. |
State bands chart¶
Basic usage¶
A state bands chart places each mapped entity state on its own row. The width of a horizontal segment shows how long that state remained active. Rounded connections between rows make changes from one state to another easy to follow.
| State bands chart |
|---|
![]() |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 | |
The value determines both the vertical row and the matching color stop. When label is omitted, the translated Home Assistant state label is used where available.
State bands always use discrete colors. Smooth interpolation between color stops does not apply to this chart type.
Configuration fields¶
| Field | Required | Default | Description |
|---|---|---|---|
show.chart_type | Use state_bands to display a state bands chart. | ||
state_map.type | Use state_value to map named states to numeric rows. | ||
state_map.map | Defines each source state, its numeric row value, and an optional display label. | ||
color_stops.colors | [] | Assigns a color to each mapped value. When no color stops are configured, the normal graph color is used. | |
state_bands.radius | 0.5 | Controls the corner radius of the foreground segments. | |
state_bands.update_interval | 5min | Determines how often the current segment advances while the entity state remains unchanged. | |
state_bands.styles | stroke-width: 0 | Applies styles to the foreground state segments. | |
state_bands.background.padding | 0.75 | Controls the visible border around the foreground segments. | |
state_bands.background.connection_width | 0.375 | Controls the width of the transition connections between rows. | |
state_bands.background.styles | opacity: 0.3 | Applies styles to the connected background layer. |
Styling¶
Each foreground segment uses the color stop assigned to its mapped value. The separate background layer follows the same row colors and connects consecutive segments.
Use state_bands.styles to style the foreground segments and state_bands.background.styles to style the connected layer behind them.
Period support¶
real_time | rolling_window | calendar |
|---|---|---|
Axes, grid, labels, and tooltip¶
| Display element | Support |
|---|---|
| X-axis | Yes, automatic time axis. |
| Y-axis | Yes, categorical state rows. |
| Grid | X ticks and Y row separators. |
| Tick marks | X and Y. |
| Labels | X times and Y state labels. |
| Tooltip and indicator | Yes, per state segment. |
Move the pointer or a finger across the chart to inspect a state period. The indicator snaps to the center of the active segment. The tooltip then shows the state, start time, end time, and duration.
Barcode chart¶
Basic usage¶
A barcode chart draws one narrow colored segment for each time bin. Time runs from left to right, while the color of each segment represents its value.
The examples below show several available variations. The top sparkline displays the current day using radial barcode, audio, and rice_grain visualizations. The six sparklines below it show the previous week, with the average in the center and the minimum and maximum values at the bottom.
| Barcode | Barcode - Audio variant |
|---|---|
![]() | ![]() |
| Barcode - Stalactites variant | Barcode - Stalagmites variant |
|---|---|
![]() | ![]() |
1 2 3 4 5 6 7 8 9 10 11 12 13 | |
Each segment uses the value of its own time bin. The current entity state is therefore not applied to the entire historical barcode.
Leave chart_variant unset to display full-height segments. Use audio for centered value bars, stalactites for bars that grow downward from the top, or stalagmites for bars that grow upward from the bottom.
Configuration fields¶
| Field | Required | Default | Description |
|---|---|---|---|
show.chart_type | Use barcode to display a barcode chart. | ||
show.chart_variant | Not set | Choose audio, stalactites, or stalagmites. Leave it unset for full-height segments. | |
color_stops.colors | [] | Defines the value-based color of each segment. | |
colorstops_transition | smooth | Chooses between hard and smooth transitions between colors. | |
barcode.styles | {} | Applies SVG styles to the barcode segments. |
Styling¶
Use barcode.styles to control the appearance of the segments. Their data-driven colors continue to come from the configured color stops.
Period support¶
real_time | rolling_window | calendar |
|---|---|---|
Axes, grid, labels, and tooltip¶
| Display element | Support |
|---|---|
| X-axis | Yes, automatic. |
| Y-axis | No. |
| Grid | X only. |
| Tick marks | X only. |
| Labels | X only. |
| Tooltip and indicator | Yes. |
Radial barcode chart¶
Basic usage¶
A radial barcode arranges the configured time bins around a circle. The full configured period is distributed around the ring, starting with the first bin and ending with the last.
| Radial Barcode chart - Sunburst variant - flower viz |
|---|
![]() |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | |
Move the pointer or a finger over the ring to inspect an individual segment. The selected foreground segment is highlighted, while the remaining segments are dimmed relative to their configured opacity. The tooltip displays the value and time information for the selected bin.
Leave chart_viz unset for backwards-compatible default behavior. You can also set chart_viz: bar explicitly. With a fixed-width variant these form a regular ring; with a sunburst variant they become value-sized radial bars. Choose flower, flower2, or rice_grain to replace the bars with rounded shapes.
Leave chart_variant unset for backwards-compatible behavior. You can also set chart_variant: fixed explicitly for a fixed-width ring. Use sunburst, sunburst_centered, sunburst_outward, or sunburst_inward when each segment’s radial size should represent its value.
Configuration fields¶
| Field | Required | Default | Description |
|---|---|---|---|
show.chart_type | Use radial_barcode to display a radial barcode chart. | ||
show.chart_viz | Not set | Supports bar, flower, flower2, or rice_grain. bar is the explicit standard-segment mode; its geometry follows the selected chart_variant. | |
show.chart_variant | Not set | Supports fixed, sunburst, sunburst_centered, sunburst_outward, and sunburst_inward. fixed explicitly selects the fixed-width ring. | |
radial_barcode.size | 5 | Controls the radial width of the barcode ring. | |
radial_barcode.line_width | 0 | Adds line width to the radial segments. | |
radial_barcode.background.styles | opacity: 0.3 | Applies styles to the complete reference ring. | |
radial_barcode.foreground.styles | {} | Applies styles to the data-driven foreground segments. | |
radial_barcode.face.show_day_night | false | Displays the day-and-night face. | |
radial_barcode.face.show_hour_marks | false | Displays hour marks. | |
radial_barcode.face.show_hour_numbers | false | Displays absolute or relative hour numbers. | |
radial_barcode.face.hour_marks_count | 24 | Defines the number of hour marks. |
Styling¶
Use foreground.styles for the colored data segments and background.styles for the reference ring behind them.
During interaction, the foreground emphasis changes temporarily to highlight the selected segment. Once the interaction ends, the configured styles are restored.
Each foreground segment receives its color from the color stops, based on that segment’s own bin value.
Period support¶
real_time | rolling_window | calendar |
|---|---|---|
Axes, grid, labels, and tooltip¶
| Display element | Support |
|---|---|
| X-axis | No. |
| Y-axis | No. |
| Grid | No. |
| Tick marks | No. |
| Labels | No. |
| Tooltip | Yes, per radial segment. |
| Indicator | No. |






