PerspectiveExamples

Heatmap 4 — Heatmap. Columns are order date, bucketed by month. Rows are Profit, bucketed by 100. Color is Profit.

Heatmap chart of Profit, grouped by bucket("Order Date", 'M'), split by bucket("Profit", 100), with 2 computed expression columns.

Heatmap 4 — Heatmap. Columns are order date, bucketed by month. Rows are Profit, bucketed by 100. Color is Profit.: Heatmap chart of Profit, grouped by bucket("Order Date", 'M'), split by bucket("Profit", 100), with 2 computed expression columns.

Data

Programmatic variations on the Superstore retail sales dataset, showing the flexibility of Perspective's configuration: the same table re-queried as data grids, pivot tables and charts by changing only the viewer's JSON config.

Loaded from /data/superstore.lz4.arrow as arrow into the perspective-server engine.

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": "",
            "title": "Heatmap 4",
            "plugin": "Heatmap",
            "columns": [
                "Profit"
            ],
            "expressions": {
                "bucket(\"Profit\", 100)": "bucket(\"Profit\", 100)",
                "bucket(\"Order Date\", 'M')": "bucket(\"Order Date\", 'M')"
            },
            "group_by": [
                "bucket(\"Order Date\", 'M')"
            ],
            "split_by": [
                "bucket(\"Profit\", 100)"
            ],
            "theme": null
        }
    },
    "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