Skip to content
LoidoltTheme 0.11.1
Svelte 5

Component

LineChart

Lines over shared categories — trends over time. `area` fills under them.

import { LineChart } from '@loidolt/theme-charts';

Example

Sheets cut per month

Line chart of 3 series over 12 categories, Jan to Dec. Birch ply rises, from a low of 42 in Jan to a high of 92 in Nov; Cork rises, from a low of 18 in Jan to a high of 41 in Nov; Acrylic rises, from a low of 10 in Feb to a high of 26 in Dec.

Sheets cut, stacked

Line chart of 3 series over 12 categories, Jan to Dec. Birch ply rises, from a low of 42 in Jan to a high of 92 in Nov; Cork rises, from a low of 18 in Jan to a high of 41 in Nov; Acrylic rises, from a low of 10 in Feb to a high of 26 in Dec.

Sheets cut, stacked
MonthBirch plyCorkAcrylic
Jan421812
Feb482210
Mar512014
Apr632513
May583117
Jun662916
Jul712719
Aug693318
Sep743022
Oct803621
Nov924124
Dec883926

Notes

  • Its description reads each series’ trend and extremes ("Birch ply rises, from a low of 42 in Jan to a high of 92 in Nov").
  • Points show for 12 or fewer categories. null values leave a gap rather than drawing through zero.

Props

Generated from the component source, so it cannot drift from the implementation.

LineChart props
PropTypeDefaultNotes
data required CategoryData—Categories along the x axis and a series of values for each.
categoryLabel string'Category'Heading of the first column in the data table.

Plus the attributes of Omit<ComponentProps<typeof Chart>, 'option' | 'table' | 'extensions'>andLineOptions, forwarded to the root element.