Line chart¶
A line chart shows how a numeric value changes over time without filling the area below it.
Use it for a clear continuous trend. Its light visual weight also makes several series easier to compare in the same graph.
Basic configuration¶
This example shows the average value over the latest 24 hours:
Configuration options¶
| Option | Type | Required | Default | Description |
|---|---|---|---|---|
show.chart_type | string | No | line | Displays a line chart. |
show.item_style | string | No | auto | Chooses a fixed color, one color from the current state, or a gradient across the graph. |
line.line_width | number | No | 1 | Sets the width of the line. |
line.color_filter | mapping | No | Not set | Adjusts the selected line color. |
line.styles | mapping | No | default line styles | Applies styles such as opacity or a dashed stroke. |
line.show.minmax | boolean | No | false | Shows the lowest and highest values measured within every interval. |
line.minmax.color_filter | mapping | No | Not set | Adjusts the min/max color independently from the line. |
line.minmax.styles | mapping | No | line color with 0.25 opacity | Styles the minimum-to-maximum band without changing the line. |
state_values.smoothing | boolean | No | true | Uses smooth or straight connections. |
show.points | boolean | No | false | Adds a point for every displayed interval. |
dots.radius | number | No | 2 | Sets the radius of optional points. |
series[].color | color | No | automatic palette | Gives each series a recognizable fixed color. |
Basic line chart¶
Show variation within each interval¶
The line normally shows one aggregated value for every interval. Add a minimum-to-maximum band when the variation within those intervals should remain visible.
The band uses the line color. Its opacity can be changed independently without making the line less visible.
Choose the line color¶
Keep a line at one configured color with fixed:
Color stops offer three other choices:
| Item style | Result |
|---|---|
colorstop | Uses one matching color for the current entity state. |
colorstopinterpolated | Uses one blended color for the current entity state. |
colorstopgradient | Distributes the configured colors across the complete value range. |
The line and its min/max band can use different colors. This keeps the current range visible while a fixed line remains easy to recognize:
A color filter can make the line or its min/max band lighter, darker, less saturated, or otherwise adjust the selected color:
The line and min/max filters are independent. Filtering the line does not change the min/max band. See Color filters for all available adjustments.
See Color stops for reusable palettes and scales.
Smooth or straight connections¶
Disable smoothing when every change should use a straight connection.