Graflume · Alpha

Venn · Basic implementation · Common features

Describe relative set size and overlap with up to six deterministically placed circles. Start with only the required data and family encoding. Expand the code to run the same example. Use the tabs to compare header, tooltip, theme, legend, highlight, callout, selection, view controls, and accessibility one feature at a time.

Chart family · Specialized families

Venn

Describe relative set size and overlap with up to six deterministically placed circles.

Quick API
venn()
Browser snapshot
graflume/complete
mark
venn
Presets
1

Basic implementation

The smallest runnable chart

Start with only the required data and family encoding. Expand the code to run the same example.

Basic example

Describe relative set size and overlap with up to six deterministically placed circles.

StatusLoading

  • minimal-implementation
Graflume.venn() Canvas 2D
Control help

Zoom and pan inspect the rendered surface without changing data axes or values. When playback controls are available, they move through real steps in the order each unique value first appears in the source data.

Use Tab to reach a control and Enter or Space to activate it. With the chart focused, use plus and minus to zoom and arrow keys to pan.

Auto placement compares perimeter candidates and avoids the plot, legend, and other callouts when possible. Explicit placement is preserved with only necessary safety correction. Callout text wraps safely inside the bubble. Long unbroken tokens are visually shortened within the line budget, while the complete source text remains available to assistive technology.

Loading

Browser API · Portable schema

Browser API

Graflume.venn()

const data = [
  {
    "members": [
      "Cohort explorer",
      "Forecast review"
    ],
    "sets": [
      "Analysis"
    ],
    "size": 34
  },
  {
    "members": [
      "Runtime profiler",
      "Schema audit"
    ],
    "sets": [
      "Engineering"
    ],
    "size": 28
  },
  {
    "members": [
      "Theme studio",
      "Layout review"
    ],
    "sets": [
      "Design"
    ],
    "size": 22
  },
  {
    "members": [
      "Metric debugger"
    ],
    "sets": [
      "Analysis",
      "Engineering"
    ],
    "size": 15
  },
  {
    "members": [
      "Story dashboard"
    ],
    "sets": [
      "Analysis",
      "Design"
    ],
    "size": 12
  },
  {
    "members": [
      "Component lab"
    ],
    "sets": [
      "Engineering",
      "Design"
    ],
    "size": 9
  },
  {
    "members": [
      "Graflume manual"
    ],
    "sets": [
      "Analysis",
      "Engineering",
      "Design"
    ],
    "size": 7
  }
];

const options = {
  "axes": {
    "x": false,
    "y": false
  },
  "height": 620,
  "locale": "en",
  "mark": {
    "fields": {
      "members": "members",
      "sets": "sets",
      "size": "size"
    }
  },
  "width": "container",
  "x": {
    "field": "sets",
    "title": "Sets",
    "type": "ordinal"
  },
  "y": {
    "field": "size",
    "title": "Items",
    "type": "quantitative"
  }
};

Graflume.venn('#chart', data, options);

Portable schema

ChartSpec 0.1 · options

{
  "axes": {
    "x": false,
    "y": false
  },
  "height": 620,
  "locale": "en",
  "mark": {
    "fields": {
      "members": "members",
      "sets": "sets",
      "size": "size"
    }
  },
  "width": "container",
  "x": {
    "field": "sets",
    "title": "Sets",
    "type": "ordinal"
  },
  "y": {
    "field": "size",
    "title": "Items",
    "type": "quantitative"
  }
}

Common features

Features shared by every chart

Use the tabs to compare header, tooltip, theme, legend, highlight, callout, selection, view controls, and accessibility one feature at a time. Hover over a data mark. On supported charts, move the pointer along the axis to see the nearest value. All exact values are available in the table below.

Header

Add a chart title and supporting description inside the visualization.

StatusLoading

  • header
Graflume.venn() Canvas 2D
Control help

Zoom and pan inspect the rendered surface without changing data axes or values. When playback controls are available, they move through real steps in the order each unique value first appears in the source data.

Use Tab to reach a control and Enter or Space to activate it. With the chart focused, use plus and minus to zoom and arrow keys to pan.

Auto placement compares perimeter candidates and avoids the plot, legend, and other callouts when possible. Explicit placement is preserved with only necessary safety correction. Callout text wraps safely inside the bubble. Long unbroken tokens are visually shortened within the line budget, while the complete source text remains available to assistive technology.

Loading

Browser API · Portable schema

Browser API

Graflume.venn()

const data = [
  {
    "members": [
      "Cohort explorer",
      "Forecast review"
    ],
    "sets": [
      "Analysis"
    ],
    "size": 34
  },
  {
    "members": [
      "Runtime profiler",
      "Schema audit"
    ],
    "sets": [
      "Engineering"
    ],
    "size": 28
  },
  {
    "members": [
      "Theme studio",
      "Layout review"
    ],
    "sets": [
      "Design"
    ],
    "size": 22
  },
  {
    "members": [
      "Metric debugger"
    ],
    "sets": [
      "Analysis",
      "Engineering"
    ],
    "size": 15
  },
  {
    "members": [
      "Story dashboard"
    ],
    "sets": [
      "Analysis",
      "Design"
    ],
    "size": 12
  },
  {
    "members": [
      "Component lab"
    ],
    "sets": [
      "Engineering",
      "Design"
    ],
    "size": 9
  },
  {
    "members": [
      "Graflume manual"
    ],
    "sets": [
      "Analysis",
      "Engineering",
      "Design"
    ],
    "size": 7
  }
];

const options = {
  "axes": {
    "x": false,
    "y": false
  },
  "height": 620,
  "locale": "en",
  "mark": {
    "fields": {
      "members": "members",
      "sets": "sets",
      "size": "size"
    }
  },
  "title": {
    "subtitle": "Venn diagram uses runnable data and options to demonstrate up to six deterministic circles; size-derived radius.",
    "text": "Venn"
  },
  "width": "container",
  "x": {
    "field": "sets",
    "title": "Sets",
    "type": "ordinal"
  },
  "y": {
    "field": "size",
    "title": "Items",
    "type": "quantitative"
  }
};

Graflume.venn('#chart', data, options);

Portable schema

ChartSpec 0.1 · options

{
  "axes": {
    "x": false,
    "y": false
  },
  "height": 620,
  "locale": "en",
  "mark": {
    "fields": {
      "members": "members",
      "sets": "sets",
      "size": "size"
    }
  },
  "title": {
    "subtitle": "Venn diagram uses runnable data and options to demonstrate up to six deterministic circles; size-derived radius.",
    "text": "Venn"
  },
  "width": "container",
  "x": {
    "field": "sets",
    "title": "Sets",
    "type": "ordinal"
  },
  "y": {
    "field": "size",
    "title": "Items",
    "type": "quantitative"
  }
}