Funnel
Stages as stepped pixel bars, with the count and the conversion from the stage before.
import { Funnel, dashboardFunnel } from "@forgeron/ui";- Lead480
- Qualified21244%
- Proposal9645%
- Won3840%
Overall 7.9% of Lead reach Won
| Stage | Count | Of the first stage | Of the stage before |
|---|---|---|---|
| Lead | 480 | 100% | |
| Qualified | 212 | 44% | 44% |
| Proposal | 96 | 20% | 45% |
| Won | 38 | 8% | 40% |
import { Funnel } from "@forgeron/ui";
export default function Default() {
return (
<div style={{ width: 380 }}>
<Funnel
title="Deals by stage"
unit="deals"
highlight="Won"
items={[
{ label: "Lead", value: 480 },
{ label: "Qualified", value: 212 },
{ label: "Proposal", value: 96 },
{ label: "Won", value: 38 },
]}
/>
</div>
);
}- Open€820k
- Negotiation€410k50%
- Signed€150k37%
Overall 18.3% of Open reach Signed
| Stage | Count | Of the first stage | Of the stage before |
|---|---|---|---|
| Open | €820k | 100% | |
| Negotiation | €410k | 50% | 50% |
| Signed | €150k | 18% | 37% |
// The numbers are any unit: format writes them.
import { Funnel } from "@forgeron/ui";
const eur = (n: number) => `€${(n / 1000).toFixed(0)}k`;
export default function Money() {
return (
<div style={{ width: 420 }}>
<Funnel
title="Pipeline value"
format={eur}
items={[
{ label: "Open", value: 820_000 },
{ label: "Negotiation", value: 410_000 },
{ label: "Signed", value: 150_000 },
]}
/>
</div>
);
}API → Props
| Prop | Type | Default | Description |
|---|---|---|---|
title | string | — | Names the chart; also its caption. |
items | { label, value }[] | — | The stages, first to last. |
format | (value: number) => string | String | Writes a value. |
highlight | string | — | The label of the stage drawn in ember. |
unit | string | — | What a stage counts, in the tooltip: deals. |
className | string | — | Extra classes. |