Skip to content

Sortable Table

A sortable, "infinite scroll" table view over a backing database table. Click column headers to sort, or command-click to reset the order. Data is queried as needed as the table is sorted or scrolled.

Loading Example...

Specification

js
import * as vg from "@uwdata/vgplot";

await vg.coordinator().exec([
  vg.loadParquet("flights", "data/flights-200k.parquet")
]);

export default vg.table({from: "flights", height: 300});
yaml
meta:
  title: Sortable Table
  description: >
    A sortable, "infinite scroll" `table` view over a backing database table.
    Click column headers to sort, or command-click to reset the order.
    Data is queried as needed as the table is sorted or scrolled.
data:
  flights: { file: data/flights-200k.parquet }
input: table
from: flights
height: 300
json
{
  "meta": {
    "title": "Sortable Table",
    "description": "A sortable, \"infinite scroll\" `table` view over a backing database table. Click column headers to sort, or command-click to reset the order. Data is queried as needed as the table is sorted or scrolled.\n"
  },
  "data": {
    "flights": {
      "file": "data/flights-200k.parquet"
    }
  },
  "input": "table",
  "from": "flights",
  "height": 300
}