Trend
Plots time series as areas, lines, bars or shaded targets.
When to use
- Compare a measure over time with a plan or a second series.
Examples
A single line
Loading the example
<k:Trend label="Daily shipments" labels="{/days}" height="180">
<k:Series name="Shipped" values="{/actual}"/>
</k:Trend>Actual and target
Loading the example
<k:Trend label="Weekly output and plan" labels="{/weeks}" unit="units" height="220">
<k:Series name="Actual" kind="bar" values="{/actual}"/>
<k:Series name="Plan" kind="ghost" values="{/plan}"/>
</k:Trend>Keyboard
- ← →
- Move between chart positions after focusing it.
API
Properties
| Name | Type | Default | Description |
|---|---|---|---|
labels | object | Horizontal axis labels | |
height | int | 220 | Chart height in pixels |
unit | string | Displayed unit of measure | |
label | string | Accessible name |
Aggregations
| Name | Type | Description |
|---|---|---|
series | Series[] | Data series, up to four |
Series
A data series in a trend chart.
Properties
| Name | Type | Default | Description |
|---|---|---|---|
name | string | Series name | |
values | object | Array of numeric values | |
kind | string | line | area, line, bar or ghost |