Overlaid Bars
Potential behind, actual in front: two values per category in one hue on one scale, with value tags, compact axis ticks and tooltips.
Interactive preview · desktop · dark
Installation
Installation is available on the Startup and Business plans. Your personal install command appears here once you have access.
Usage
Import it, pass your props, and make it part of your product.
example.tsx
import { Building2 } from 'lucide-react';import { OverlaidBarsChart } from '@/components/component-kit/items/chart-overlaid-bars';
export function Example() { return ( <OverlaidBarsChart icon={Building2} title="Seats booked vs capacity" series={{ potential: 'Capacity', actual: 'Booked' }} data={[ { label: 'Main Hall', potential: 2400, actual: 1850 }, { label: 'Studio', potential: 900, actual: 620 }, { label: 'Atrium', potential: 1600, actual: 1340 }, ]} /> );}Props
| Prop | Type | Default | Description |
|---|---|---|---|
data | OverlaidBarsDatum[] | — | One row per category with potential and actual. |
series | { potential, actual } | Capacity / Booked | Labels for the two values. |
showTags | boolean | true | Show the potential in a tag above each column. |