A Sparkline can stay minimal, or it can add axes, grid lines, tick marks, and labels when the reader needs exact time and value references. The X-axis represents time and the Y-axis represents values or mapped states; radial charts use the same idea around and across the circle.
This page shows how to turn those elements on, style their labels, reserve graph space, and use a secondary Y-axis for another series.
entities:-entity:sensor.temperature# Entity whose history is graphedlayout:sparklines:-xpos:50# Horizontal center of the graphypos:50# Vertical center of the graphwidth:80# Graph width in card coordinatesheight:35# Graph height in card coordinatesentity_index:0# Use the first entity configured abovesparkline:show:axis:x:true# Show the time axisy:true# Show the value axistickmarks:x:true# Show tick marks on the time axisy:true# Show tick marks on the value axislabels:x:true# Show labels on the time axisy:true# Show labels on the value axis
The X-axis represents time. The Y-axis represents values or mapped states.
entities:-entity:sensor.temperature# Entity whose history is graphedlayout:sparklines:-xpos:50# Horizontal center of the graphypos:50# Vertical center of the graphwidth:80# Graph width in card coordinatesheight:35# Graph height in card coordinatesentity_index:0# Use the first entity configured abovesparkline:show:grid:x:true# Show time-grid linesy:true# Show value-grid lines
Enable X and Y independently so the graph only shows the guides you need.
entities:-entity:sensor.temperature# Entity whose history is graphedlayout:sparklines:-xpos:50# Horizontal center of the graphypos:50# Vertical center of the graphwidth:80# Graph width in card coordinatesheight:35# Graph height in card coordinatesentity_index:0# Use the first entity configured abovex_axis:labels:styles:font-size:0.5em# Size of the displayed texty_axis:labels:styles:font-size:0.5em# Size of the displayed text
entities:-entity:sensor.temperature# Entity whose history is graphedlayout:sparklines:-xpos:50# Horizontal center of the graphypos:50# Vertical center of the graphwidth:80# Graph width in card coordinatesheight:35# Graph height in card coordinatesentity_index:0# Use the first entity configured abovesparkline:show:labels:y:false# Hide labels on the value axis
The grid, axis, and tick marks can stay visible without the labels.
entities:-entity:sensor.temperature# First graph series-entity:sensor.humidity# Second graph serieslayout:sparklines:-xpos:50# Horizontal center of the graphypos:50# Vertical center of the graphwidth:80# Graph width in card coordinatesheight:35# Graph height in card coordinatesseries:-id:temperature# Name this series inside the graphentity_index:0# Use entity 0 from entities: (0 = first entity)y_axis_id:primary# Use the primary Y-axis for this series-id:humidity# Name this series inside the graphentity_index:1# Use entity 1 from entities: (0 = first entity)y_axis_id:secondary# Use the secondary Y-axis for this series
Use this when the series have different units or very different ranges.
Required applies to the specific form described by that table: Yes means you need the field for that form; No means you can leave it out. Not set means the card adds no explicit value when the option is omitted.
Option
Type
Required
Default
Description
sparkline.show.grid.x, sparkline.show.grid.y
boolean
No
false
Adds horizontal and/or vertical guide lines so graph positions are easier to compare with an axis.
sparkline.show.axis.x, sparkline.show.axis.y
boolean
No
false
Shows the time and/or value axis when the graph needs readable reference scales.