Multiple series¶
Multiple series compare entities or time periods on one shared graph. Use them to see related measurements together instead of switching between separate graphs.
Each series can have its own entity, name, color, chart type, and Y-axis. The graph shares its period, bins, X-axis, drawing area, and tooltip across all series.
Basic configuration¶
This complete example compares three rooms over the latest 24 hours:
Configuration options¶
| Option | Type | Required | Default | Description |
|---|---|---|---|---|
series[].id | string | Yes | - | Sets the unique name for the series inside the graph. |
series[].entity_index | entity index | Yes | - | Selects the entity whose history is displayed. |
series[].name | string | No | entity name | Sets the name shown in the legend and tooltip. |
series[].color | color | No | automatic palette | Sets a fixed color for the series. |
series[].sparkline | mapping | No | shared sparkline settings | Changes the chart type or chart-specific settings for this series. |
series[].period | mapping | No | shared period | Selects a supported period override, such as an earlier day. |
series[].y_axis_id | string | No | primary | Uses the primary or secondary Y-axis. |
sparkline.show.legend | boolean | No | false | Shows or hides the legend. |
legend.position | string | No | top | Places the legend at the top, bottom, left, or right. |
legend.rows | number | No | 1 | Divides a top or bottom legend over this number of rows. |
legend.gap | number | No | 4 | Sets the space between the legend and graph. |
legend.item_gap | number | No | 1 | Sets the space between a marker and its label. |
Compare several entities¶
When series is present, every graph line or bar is defined in that list:
The parent sparkline supplies the period, bins, axes, grid, and tooltip. A series can override some of the settings.
Compare today with yesterday¶
Both series use the same time-of-day X-axis. The tooltip identifies the series and shows the source time for its value.
Show a legend¶
Set show.legend to true to show the series names and colors:
Use top or bottom for a horizontal legend and left or right for a vertical legend.
Use two Y-axes¶
Use two axes when the series have different units or ranges.