Twigs Charts
Charts

Sparkline

The Sparkline React component renders compact, inline charts to show data trends at a glance. Lightweight and responsive, it's perfect for dashboards, tables, and condensed visual summaries.

The Sparkline component is used to visualize data in a simple area / line chart format.

Usage

import { Sparkline } from "@sparrowengg/twigs-charts";

const Chart = () => {
  return <Sparkline data={[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]} color="#51D3D9" />;
};

Props

PropTypeDefault
height?
number | string
-
width?
number | string
-
curveType?
CurveType
linear
gardient?
boolean
true
color
string
-
data
Array<number | null>
-

Examples

Without Gradient

Curve Type