Klar

Charts / React chart kit primitives / Micro-charts

Sparkline

A tiny trend line with an optional fill, sized to whatever space it is given.

React component Sparkline, data through props. Small charts that sit under a number in a KPI strip. Tags: sparkline, trend, micro, line, kpi, inline.

Install

npm i klar-charts

import 'klar-charts/styles.css'
import { ThemeScope, Sparkline } from 'klar-charts'

# or copy the source:
npx shadcn@latest add https://klar.run/r/kit-sparkline.json

Usage

<Sparkline values={r.values} width={w} height={44} area color={r.color} />

Related sparkline charts