Network

Explore connections and groups among people or other entities.

Network

The smallest runnable chart

Explore the chart and its data table. Open the code below to use this example.

Basic example

Loading

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

View code and settings

Browser API

Graflume.graph()

const data = [
  {
    "source": "Collected",
    "target": "Validated",
    "value": 86
  },
  {
    "source": "Collected",
    "target": "Review queue",
    "value": 14
  },
  {
    "source": "Validated",
    "target": "Aggregated",
    "value": 58
  },
  {
    "source": "Validated",
    "target": "Exploration",
    "value": 28
  },
  {
    "source": "Aggregated",
    "target": "Reports",
    "value": 36
  },
  {
    "source": "Aggregated",
    "target": "Alerts",
    "value": 22
  },
  {
    "source": "Exploration",
    "target": "Models",
    "value": 18
  },
  {
    "source": "Exploration",
    "target": "Exports",
    "value": 10
  }
];

const options = {
  "axes": {
    "x": false,
    "y": false
  },
  "height": 620,
  "locale": "en",
  "mark": {
    "fields": {
      "target": "target",
      "value": "value"
    },
    "options": {
      "iterations": 240,
      "layout": "force",
      "nodeSpacing": 0.08,
      "routing": "straight",
      "seed": 1
    }
  },
  "width": "container",
  "x": {
    "field": "source",
    "title": "Workflow node",
    "type": "ordinal"
  },
  "y": {
    "field": "value",
    "title": "Interactions",
    "type": "quantitative"
  }
};

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

Portable schema

ChartSpec 0.1 · options

{
  "axes": {
    "x": false,
    "y": false
  },
  "height": 620,
  "locale": "en",
  "mark": {
    "fields": {
      "target": "target",
      "value": "value"
    },
    "options": {
      "iterations": 240,
      "layout": "force",
      "nodeSpacing": 0.08,
      "routing": "straight",
      "seed": 1
    }
  },
  "width": "container",
  "x": {
    "field": "source",
    "title": "Workflow node",
    "type": "ordinal"
  },
  "y": {
    "field": "value",
    "title": "Interactions",
    "type": "quantitative"
  }
}
Quick API
network()
Browser snapshot
graflume/complete
mark
graph
Presets
4
  • minimal-implementation

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.

Loading

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

View code and settings

Browser API

Graflume.graph()

const data = [
  {
    "source": "Collected",
    "target": "Validated",
    "value": 86
  },
  {
    "source": "Collected",
    "target": "Review queue",
    "value": 14
  },
  {
    "source": "Validated",
    "target": "Aggregated",
    "value": 58
  },
  {
    "source": "Validated",
    "target": "Exploration",
    "value": 28
  },
  {
    "source": "Aggregated",
    "target": "Reports",
    "value": 36
  },
  {
    "source": "Aggregated",
    "target": "Alerts",
    "value": 22
  },
  {
    "source": "Exploration",
    "target": "Models",
    "value": 18
  },
  {
    "source": "Exploration",
    "target": "Exports",
    "value": 10
  }
];

const options = {
  "axes": {
    "x": false,
    "y": false
  },
  "height": 620,
  "locale": "en",
  "mark": {
    "fields": {
      "target": "target",
      "value": "value"
    },
    "options": {
      "iterations": 240,
      "layout": "force",
      "nodeSpacing": 0.08,
      "routing": "straight",
      "seed": 1
    }
  },
  "title": {
    "subtitle": "Graph chart uses runnable data and options to demonstrate stable node/source/target IDs; tree preset.",
    "text": "Network"
  },
  "width": "container",
  "x": {
    "field": "source",
    "title": "Workflow node",
    "type": "ordinal"
  },
  "y": {
    "field": "value",
    "title": "Interactions",
    "type": "quantitative"
  }
};

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

Portable schema

ChartSpec 0.1 · options

{
  "axes": {
    "x": false,
    "y": false
  },
  "height": 620,
  "locale": "en",
  "mark": {
    "fields": {
      "target": "target",
      "value": "value"
    },
    "options": {
      "iterations": 240,
      "layout": "force",
      "nodeSpacing": 0.08,
      "routing": "straight",
      "seed": 1
    }
  },
  "title": {
    "subtitle": "Graph chart uses runnable data and options to demonstrate stable node/source/target IDs; tree preset.",
    "text": "Network"
  },
  "width": "container",
  "x": {
    "field": "source",
    "title": "Workflow node",
    "type": "ordinal"
  },
  "y": {
    "field": "value",
    "title": "Interactions",
    "type": "quantitative"
  }
}
  • header