Skip to content
Calm motion: animations on this site only fade, with no movement

Venn ​

Two or three circles that overlap, with the count in each part

Shows how groups share members, for example the people who follow a show in more than one place. For parts of one whole, use the waffle.

Basic
Where people follow the show
PartCount
Only Podcast apps27k
Only YouTube20k
Only Newsletter8k
Podcast apps and YouTube10k
Podcast apps and Newsletter7k
YouTube and Newsletter2k
Podcast apps, YouTube, and Newsletter4k
  • sets is a list of two or three sets. Each set has a key, a label, a size, and an optional color. The size is the whole set, with the parts it shares.
  • overlaps gives the size of each pair, such as { keys: ["pod", "yt"], size: 14 }, and of all three sets. The size of a pair includes the part that all three share.
  • Each part of the drawing shows how many are in that part only. The chart works these counts out from the sizes, by inclusion and exclusion.
  • The circles have a fixed size and place, so the areas do not show the counts. The numbers do.
  • The legend names the sets with their sizes. format sets the text of a count.
  • For screen readers, the chart is a table with a row for each part, such as "Only YouTube" or "Podcast apps and YouTube". label names the table. Change the words with labels or a label pack: part, count, only (a function of the name), and and (a function of the names).

Usage ​

ts
import { BlessVenn } from "blessing-ui";

API ​

Props

NameTypeDefaultDescription
sets*BlessVennSet[]—two or three sets
overlapsBlessVennOverlap[][]the size of each overlap: each pair, and all three
format((v: number) => string)—
labelstring"Chart"names the chart and its table for screen readers
labelsPartial<{ part: string; count: string; only: (name: string) => string; and: (names: string[]) => string; }>—

Released under the MIT License. Character names and artwork belong to their owners.