agentsclimarketplace

Venn diagram

Skill reaviz/skills/reaviz/charts/venn-diagram

AI Skills for Reaviz Projects

Install
npx -y skills add reaviz/skills --skill venn-diagram

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

2 things to look at

  • no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
  • 4 stars4 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

SKILL.md

5.9 KB, as published. Nobody here has run it

VennDiagram

Venn and Euler diagram showing set intersections. Three layout types: standard Venn, proportional Euler, and Star Euler. Supports selections, custom styling per state, and inner/outer labels.

Import

import {
  VennDiagram,
  VennSeries,
  VennArc,
  VennLabel,
  VennOuterLabel
} from 'reaviz';

VennDiagram Props

PropTypeDefaultDescription
dataVennDiagramData[]Chart data (required)
type'venn' | 'euler' | 'starEuler''venn'Layout algorithm
disabledbooleanfalseDisable the chart
seriesReactElement<VennSeriesProps> | null<VennSeries />Series component
widthnumberautoWidth in pixels
heightnumberautoHeight in pixels
marginsMarginsChart margins
classNamestringSVG CSS class
containerClassNamestringContainer div CSS class

VennDiagramData

interface VennDiagramData {
  key: string[];   // Set names (e.g. ['A'] or ['A', 'B'] for intersection)
  data: number;    // Size of set/intersection
}

VennSeries Props

PropTypeDefaultDescription
animatedbooleantrueEnable animations
colorSchemeColorSchemeType'cybertron'Color scheme
disabledbooleanfalseDisable interactions
selectionsstring[]Active selection keys (e.g. `['A
arcReactElement<VennArcProps> | null<VennArc />Arc element
labelReactElement<VennLabelProps> | null<VennLabel />Inner label element
outerLabelReactElement<VennOuterLabelProps> | null<VennOuterLabel />Outer label element

VennArc Props

PropTypeDefaultDescription
strokeWidthnumber3Stroke thickness
strokestring | (data, index, isActive, isHovered) => stringStroke color or function
gradientReactElement<GradientProps> | null<Gradient />Gradient fill
maskReactElement<MaskProps> | nullSVG pattern mask
glowGlowGlow effect
tooltipReactElement<ChartTooltipProps> | null<ChartTooltip />Tooltip component
initialStyleobject{ opacity: 0.6 }Default arc style
activeStyleobject{ opacity: 0.8 }Style when selected
inactiveStyleobject{ opacity: 0.3 }Style when other arcs are active
styleobjectCustom CSS styles
disabledbooleanDisable interactions
onClick(event) => voidClick handler
onMouseEnter(event) => voidMouse enter handler
onMouseLeave(event) => voidMouse leave handler

VennLabel Props

PropTypeDefaultDescription
labelType'key' | 'value''key'Show set name or value
showAllbooleanfalseShow labels for small intersections too
wrapbooleantrueWrap long text
fillstringText color
fontSizenumber11Font size
fontFamilystring'sans-serif'Font family
animatedbooleantrueEnable animations
format(data) => anyCustom label formatter

VennOuterLabel Props

PropTypeDefaultDescription
fillstring'#000'Text color
fontSizenumber14Font size
fontFamilystring'sans-serif'Font family
animatedbooleantrueEnable animations
format(data) => anyCustom label formatter

Basic Usage

const data = [
  { key: ['A'], data: 12 },
  { key: ['B'], data: 12 },
  { key: ['A', 'B'], data: 2 },
];

<VennDiagram
  height={450}
  width={450}
  data={data}
/>

Three Sets

const data = [
  { key: ['A'], data: 12 },
  { key: ['B'], data: 12 },
  { key: ['C'], data: 8 },
  { key: ['A', 'B'], data: 2 },
  { key: ['A', 'C'], data: 3 },
  { key: ['B', 'C'], data: 1 },
  { key: ['A', 'B', 'C'], data: 1 },
];

<VennDiagram
  height={450}
  width={450}
  data={data}
/>

Euler Layout (Proportional)

<VennDiagram
  type="euler"
  height={450}
  width={450}
  data={data}
/>

Star Euler Layout

<VennDiagram
  type="starEuler"
  height={450}
  width={450}
  data={data}
  series={
    <VennSeries
      colorScheme={['#868686']}
      arc={<VennArc strokeWidth={1} stroke="#fff" gradient={<Gradient />} />}
      label={<VennLabel labelType="value" showAll={true} fill="#fff" />}
      outerLabel={<VennOuterLabel fill="#fff" />}
    />
  }
/>

Value Labels

<VennDiagram
  data={data}
  series={
    <VennSeries
      label={<VennLabel labelType="value" />}
    />
  }
/>

Managed Selections

<VennDiagram
  data={data}
  series={
    <VennSeries
      selections={['A|B', 'B']}
    />
  }
/>

Dynamic Stroke Color

<VennDiagram
  data={data}
  series={
    <VennSeries
      arc={
        <VennArc
          stroke={(_data, _index, active, hovered) => {
            if (hovered) return 'blue';
            if (active) return 'green';
            return 'white';
          }}
        />
      }
    />
  }
/>

Notes

  • type="venn" — equal-sized circles with overlapping intersections
  • type="euler" — circle sizes proportional to set values
  • type="starEuler" — star-shaped layout for many overlapping sets
  • selections uses pipe-delimited keys (e.g. 'A|B' for the intersection of A and B)
  • Inner labels show on sufficiently large regions by default; use showAll to force display
  • Outer labels appear around the diagram perimeter showing set names
  • Arc opacity transitions between initialStyle, activeStyle, and inactiveStyle based on hover/selection state

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.