Perspective › Examples
Market — Blotter
Data grid of timestamp, id, Diff from market open and price, sorted by timestamp, with 3 computed expression columns.
Simulated real-time order flow: a stateful matching engine on a private worker, view-mirrored to the UI.

Data
A simulated order book streaming into a Perspective table in real time: orders are created, filled, cancelled and expired continuously, and every data grid, pivot and chart updates incrementally as they arrive.
Generated continuously in the browser by a JavaScript simulation streaming into a Perspective Table.
Configuration
This example is a saved <perspective-viewer> workspace. Pass this JSON to viewer.restoreWorkspace() to reproduce it over the same table:
{
"layout": {
"type": "tab-layout",
"tabs": [
"p0"
],
"selected": 0
},
"panels": {
"p0": {
"table": "",
"theme": null,
"columns_config": {
"Diff from market open": {
"fg_mode": "bar",
"fg_gradient": 12.9
},
"if(\"side\"=='buy'){-1}else{1}": {
"fg_mode": "bar",
"fg_gradient": 8,
"aggregate_depth": 1
},
"status": {
"bg_mode": "series"
},
"side": {
"bg_mode": "series"
}
},
"plugin": "Datagrid",
"plugin_config": {},
"settings": true,
"title": "Blotter",
"group_by": [],
"split_by": [],
"sort": [
[
"timestamp",
"desc"
]
],
"filter": [],
"expressions": {
"bucket(\"price\", 1)": "bucket(\"price\", 1)",
"bucket(\"timestamp\", 'm')": "bucket(\"timestamp\", 'm')",
"Diff from market open": "\"price\" - 20"
},
"columns": [
"timestamp",
"id",
"Diff from market open",
"price",
"status",
"side"
],
"aggregates": {}
}
},
"active": "p0"
}
About Perspective
Perspective is an open-source, WebAssembly-powered data grid, pivot table and charting component for large, real-time and streaming datasets — in the browser, Python, Jupyter, Node.js and Rust.
Documentation