Chart Line
Time-series line charts built on unovis-vue. Pass an array of rows plus a config that maps each series key to a label and color.
Default
A single-series line with a natural curve, gradient-free.
Comparison
ChartLine overlays a dashed previous-period line and a gradient area fill for at-a-glance trends.
Linear
Straight segments between points (CurveType.Linear).
Step
Stepped interpolation (CurveType.Step).
Interactive
Toggle between series; totals update in the header.
API Reference
Props, events, and slots for each sub-component.
ChartLineDefault
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| data | Record<string, any>[] | — | Series rows. |
| config | ChartConfig | — | Map of dataKey → { label, color }. |
| dataKey | string | "value" | Row key for the y value. |
| xKey | string | "date" | Row key for the x value. |
ChartLine
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| data | Record<string, any>[] | — | Series rows (each with a date key). |
| config | ChartConfig | — | Theming map. |
| dataKey | string | "value" | Row key for the y value. |
| gradient | boolean | false | Render a gradient area fill under the line. |
| comparisonData | Record<string, any>[] | [] | Previous-period rows overlaid as a dashed line. |
| comparisonLabel | string | "Previous Period" | Legend/tooltip label for the comparison series. |
| yTickFormatter | (d) => string | null | Custom y-axis tick formatter. |
ChartLineLinear / ChartLineStep
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| data | Record<string, any>[] | — | Series rows. |
| config | ChartConfig | — | Theming map. |
| dataKey | string | "value" | Row key for the y value. |
| xKey | string | "date" | Row key for the x value. |
ChartLineInteractive
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| data | Record<string, any>[] | — | Series rows. |
| config | ChartConfig | — | Theming map; series with a color become toggles. |
| dataKeys | string[] | null | Override which series are selectable. |
| xKey | string | "date" | Row key for the x value. |
| title | string | "" | Optional header title. |
| description | string | "" | Optional header description. |