GitHubGitHub
← All widgets
Analytics / widget

Time series chart

A multi-series uPlot chart with unioned timestamps, same-unit scales, padded ranges, live token resolution, tooltip, threshold lines, and resilient states.

Multiple seriesTooltipThresholdsLoadingEmptyError

Response time

Response timemsRequests/s
<TimeSeriesChart title="Response time" {series} thresholds={limits} />

Installation

pnpm add @chanrg/4ui

Import the stylesheet once, at the root of your app:

import '@chanrg/4ui/styles.css';

Usage

import { TimeSeriesChart } from '@chanrg/4ui';<TimeSeriesChart title="Response time" {series} thresholds={limits} />

API reference

Props

PropTypeDefaultDescription
seriesTimeSeries[][]Normalized timestamp/value series.
heightnumber260Plot height.
variantline | areaareaTrace fill treatment.
thresholdsChartThreshold[][]Horizontal threshold references.

CSS variables

VariableDescription
--4ui-surfacePrimary component surface.
--4ui-textPrimary foreground color.
--4ui-borderDefault control and panel border.

Accessibility

  • Legend labels identify each series without depending on color.
  • Empty and error states remain textual.
  • Tooltip rows include series label, value, and unit.

Dependencies

uPlot, internal UplotRenderer, internal buildTimeSeries