About
A small SVG chart that draws a precise rate line over low-precision ghost volume bars, so a conversion or error rate is never read without the sample size it was measured on.
Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Rate Volume Chart to your project and fits it to your theme.
Code
How Rate Volume Chart is used: the demo's code. The component's own source comes with a free account.
Usage.tsx
import { RateVolume } from "@/components/ui/rate-volume";
const periods = [
{ rate: 0.03, volume: 180 },
{ rate: 0.032, volume: 150 },
{ rate: NaN, volume: 0 },
{ rate: 0.034, volume: 120 },
{ rate: 0.03, volume: 140 },
];
export default function RateVolumeZeroVolumeDemo() {
return (
<div className="w-full h-screen flex items-center justify-center bg-background">
<div className="flex flex-col items-center gap-3">
<div className="text-sm text-muted-foreground">
A zero-volume period gaps the line instead of interpolating
</div>
<RateVolume
data={periods}
minVolume={50}
title="Error rate"
width={240}
height={64}
/>
</div>
</div>
);
}







