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
| Part | Count |
|---|---|
| Only Podcast apps | 27k |
| Only YouTube | 20k |
| Only Newsletter | 8k |
| Podcast apps and YouTube | 10k |
| Podcast apps and Newsletter | 7k |
| YouTube and Newsletter | 2k |
| Podcast apps, YouTube, and Newsletter | 4k |
setsis a list of two or three sets. Each set has akey, alabel, asize, and an optionalcolor. The size is the whole set, with the parts it shares.overlapsgives 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.
formatsets 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".
labelnames the table. Change the words withlabelsor a label pack:part,count,only(a function of the name), andand(a function of the names).
Usage
ts
import { BlessVenn } from "blessing-ui";API
Props
| Name | Type | Default | Description |
|---|---|---|---|
sets* | BlessVennSet[] | — | two or three sets |
overlaps | BlessVennOverlap[] | [] | the size of each overlap: each pair, and all three |
format | ((v: number) => string) | — | |
label | string | "Chart" | names the chart and its table for screen readers |
labels | Partial<{ part: string; count: string; only: (name: string) => string; and: (names: string[]) => string; }> | — |