PerspectiveExamples

Y Area - Row and Split By 2 — Stacked grouped area chart. X is State, grouped by Region. Y is sales. Subgroup is customer segment. Sorted descending by total sales.

Y Area chart of Sales, grouped by Region and State, split by Ship Mode, sorted by Sales.

Y Area - Row and Split By 2 — Stacked grouped area chart. X is State, grouped by Region. Y is sales. Subgroup is customer segment. Sorted descending by total sales.: Y Area chart of Sales, grouped by Region and State, split by Ship Mode, sorted by Sales.

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": "Y Area - Row and Split By 2",
            "plugin": "Y Area",
            "group_by": [
                "Region",
                "State"
            ],
            "split_by": [
                "Ship Mode"
            ],
            "columns": [
                "Sales"
            ],
            "sort": [
                [
                    "Sales",
                    "desc"
                ]
            ],
            "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