MiniArea

A small area chart with gradient fill. Similar to Sparkline but with a filled area effect.

Playground

Props

Midnight
200
48
Code
<MiniArea
  data={data}
  theme="midnight"
  width={200}
  height={48}
/>

Usage

The chart automatically fills its container width:

tsx
import { MiniArea } from '@derpdaderp/chartkit';

// Responsive - fills container width automatically
<MiniArea data={data} theme="midnight" />

// Fixed width
<MiniArea data={data} theme="midnight" width={160} height={40} />

Props

PropTypeDefaultDescription
data*T[] | number[]-Data array
dataKeykeyof T"value"Key for numeric values
widthnumberautoChart width (auto-fills container if not set)
heightnumber40Chart height
theme*ThemeName-Theme name
colorstring-Override color