Lattice Grid Buy a licence

demo D249

Arc diagram in ESM

Lay every node on one line and join related pairs with an arc, so the links read at a glance

type: 'arc', source, target, value

This lays every node on one line and joins related pairs with an arc above it. It makes the connections in a set of items read at a glance, so clusters and hubs stand out along a single axis.

Building…
Loading a live grid…

This is the ES module version. The grid is imported straight from a CDN as a module, the same configuration as the vanilla tab without a global script tag, so it drops into any bundler or a bare module script.

The configuration

<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@toclocoinc/lattice-grid@1.71.0/lattice-grid.min.css">

<div id="grid" style="height: 320px"></div>
<div id="chart" style="height: 320px"></div>

<script type="module">
  import { createChart } from '@toclocoinc/lattice-grid/modules/charts';
  import '@toclocoinc/lattice-grid/modules/chart-arc';  // opt in to the arc type

  const grid = createGrid(document.getElementById('grid'), {
    rowKey: 'id',
    columns: [
      { field: 'source', title: 'From', filter: { type: 'set' } },
      { field: 'target', title: 'Calls', filter: { type: 'set' } },
      { field: 'calls', title: 'Calls / min', type: 'number', total: 'sum' },
    ],
    rows,  // one edge a row: source, target, calls
  });

  createChart({
    grid,
    container: document.getElementById('chart'),
    type: 'arc',
    source: 'source',
    target: 'target',
    value: 'calls',
    title: 'Which service calls which',
  });
</script>