sheengemologic ui
All components

Sparkline

Renders a dependency-free inline trend path while preserving NaN gaps.@gemologic/sheen-charts · data

Playground

This example has no scalar controls. Its validated source remains interactive below.
<Sparkline values={latency} label="Latency over five samples" color="chart-3" />

Variant matrix

Latency trend with a gap

Anatomy

Package
@gemologic/sheen-charts
Source
packages/charts/src/Sparkline.tsx
Tokens
  • --sheen-chart-1
  • --sheen-chart-line-width
  • --sheen-color-market-up
  • --sheen-color-market-down
  • --sheen-color-market-flat
  • --sheen-color-accent

Accessibility

Role: imgKeyboard: No component-owned keys

Do

  • Use NaN for missing values and describe the trend in label.

Do not

  • Do not coerce gaps to zero or use a sparkline as the only representation of important data.

Generated props

NameTypeDefaultDescription
values *Float64Array<ArrayBufferLike>Float64 values in display order; NaN creates a visible path break.
label *stringRequired accessible description of the trend.
colorimport("./chart-types.ts").ChartColorTokenchart-1Semantic chart, market, or accent token name.
widthnumber120Positive finite intrinsic and view-box width.
heightnumber28Positive finite intrinsic and view-box height.
Native Solid/HTML attributes remain available and are omitted from this authored-prop view.