demo D202
Cumulative distribution
The ECDF, binless, beside a histogram of the same column
type: 'ecdf', y
Loading a live grid…
The configuration
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@toclocoinc/lattice-grid@1.13.0/lattice-grid.min.css">
<script src="https://cdn.jsdelivr.net/npm/@toclocoinc/lattice-grid@1.13.0/lattice-grid.min.js"></script>
<div style="display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; height: 210px">
<div id="ecdf"></div>
<div id="histogram"></div>
</div>
<div id="grid" style="height: 340px; margin-top: 14px"></div>
<script type="module">
import { createChart } from 'https://cdn.jsdelivr.net/npm/@toclocoinc/lattice-grid@1.13.0/modules/charts';
const grid = LatticeGrid.createGrid(document.getElementById('grid'), {
rowKey: 'id',
columns: [
{ field: 'symbol', title: 'Symbol', layout: { width: 120 } },
{ field: 'desk', title: 'Desk', filter: { type: 'set' } },
{ field: 'price', title: 'Price', type: 'number' },
{ field: 'bid', title: 'Bid', type: 'number' },
{ field: 'volume', title: 'Volume', type: 'number' },
{ field: 'notional', title: 'Notional', type: 'number',
format: { style: 'currency', currency: 'USD' }, total: 'sum' },
],
rows,
});
createChart({ grid, container: '#ecdf', type: 'ecdf', y: 'notional' });
createChart({ grid, container: '#histogram', type: 'histogram', y: 'notional' });
</script>