demo D249
Arc diagram: JavaScript Data Grid Demo
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.
Loading a live grid…
The configuration
<link rel="stylesheet" href="https://cdn.latticegrid.dev/lattice-grid@1.108.1/lattice-grid.min.css">
<script src="https://cdn.latticegrid.dev/lattice-grid@1.108.1/lattice-grid.min.js"></script>
<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 = LatticeGrid.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>