AsterUIDocsv1.0.2

Docs / Component reference

LineChart & AreaChart

Follow values across an ordered series. This module includes both a line and a filled area presentation.

Line chart example

Install

sh
npx @fierst/ui@1.0.2 add line-chart

Registry dependencies: theme.

Exports from ./ui/line-chart: LineChart, AreaChart.

Download the registry source for line-chart 1.0.2.

API contracts

ts
export function* LineChart(
  props: {
    data: readonly { label: string; value: number }[];
    area?: boolean;
    height?: number;
    unit?: string;
    label?: string;
    class?: string;
  },
  ctx: Ctx,
)

export function AreaChart(props: {
  data: readonly { label: string; value: number }[];
  height?: number;
  unit?: string;
  label?: string;
  class?: string;
})