Blocks / Funnel

Funnel

Stages as stepped pixel bars, with the count and the conversion from the stage before.

import { Funnel, dashboardFunnel } from "@forgeron/ui";
/01 → Default
Deals by stage
  1. Lead480
  2. Qualified21244%
  3. Proposal9645%
  4. Won3840%

Overall 7.9% of Lead reach Won

Deals by stage
StageCountOf the first stageOf the stage before
Lead480100%
Qualified21244%44%
Proposal9620%45%
Won388%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>
  );
}
/02 → Money
Pipeline value
  1. Open€820k
  2. Negotiation€410k50%
  3. Signed€150k37%

Overall 18.3% of Open reach Signed

Pipeline value
StageCountOf the first stageOf the stage before
Open€820k100%
Negotiation€410k50%50%
Signed€150k18%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
PropTypeDefaultDescription
titlestring—Names the chart; also its caption.
items{ label, value }[]—The stages, first to last.
format(value: number) => stringStringWrites a value.
highlightstring—The label of the stage drawn in ember.
unitstring—What a stage counts, in the tooltip: deals.
classNamestring—Extra classes.