PParable
All components

Revenue Chart

Blocks & Slices

A hand-rolled SVG area chart with a smooth monotone-cubic curve, gradient fill, and a stroke-draw + fill-fade mount animation; a crosshair tooltip snaps to the nearest point on hover or arrow-key scrub. Renders complete with no draw-in under reduced-motion.

Inspired by Watermelon UI — dashboard charts — independently built, not affiliated. Attribution policy

Net Revenue
$124.7K
+15.0%

Installation

npx shadcn@latest add https://parable-three.vercel.app/r/revenue-chart.json

Runs the shadcn CLI — the component source is copied intocomponents/parable/revenue-chart.tsx. You own it from there.

Usage

The exact code rendering the preview above.

<div className="w-full max-w-[460px]"><RevenueChart title="Net Revenue" /></div>

Props

RevenueChartProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "title">

PropTypeDefaultDescription
dataRevenueChartDatum[]DEFAULT_DATASeries to plot. Ships a nice 12-point default when omitted.
titlestring"Revenue"Heading shown top-left of the card.
colorstring"#8b5cf6"Line + fill colour. Defaults to Parable violet `#8b5cf6` (mirrors the site's `--pb-violet` token).
heightnumber220Plot area height in pixels (excludes the header row).
valueFormatter(n: number) => stringcompactUSDFormats headline, tooltip and aria values. Defaults to compact USD.

npm dependencies

  • lucide-react