Running A Stored Visualisation

----------------------------+--------+---------------------------+-------+-----------+---------------------------+-------------------------------------------------------------------+------------- public.ssd_performance_dashboard | public | ssd_performance_dashboard | 0 | [] | Ssd Performance Dashboard | SSD write performance dashboard, comparing buffered vs direct IO. | t (1 row)


The function `vis.list_stored_visualisations()` can be used to get this information in JSON format, this function is used by pgVis server.

```sql
SELECT jsonb_pretty(list_stored_visualisations());

[
    {
        "id": "public.ssd_performance_dashboard",
        "name": "ssd_performance_dashboard",
        "arity": 0,
        "schema": "public",
        "summary": "Dashboard Ssd Performance",
        "arguments": [],
        "can_execute": true,
        "description": "SSD write performance dashboard, comparing buffered vs direct IO."
    }
]

The function vis.run_stored_visualisation(id TEXT) can be used to run a stored visualisation, requiring only the stored visualisation id (which is schema.name of the function).

\pset pager off
SELECT vis.run_stored_visualisation('public.ssd_performance_dashboard');

Outputing A Stored Visualisation To HTML

Stored visualisations cannot only be used with pgVis server. You can still manually output them to HTML using psql , by using the vis.html() wrapper function.

\pset pager off
SELECT vis.html(vis.run_stored_visualisation('public.ssd_performance_dashboard'));
\a\t\g out.html \a\t