VSPlotter
VSPlotter is a lightweight, high-performance plotting extension for Visual Studio Code. It lets you create plots, grids, and dashboards from CSV/TSV/JSON — and from other formats (Parquet, HDF5, …) via format handlers — directly in the editor.
Features
- ✅ VSPlotter sidebar: Dedicated VSPlotter activity-bar container for the Plots tree (File Explorer, Saved Plots, Settings, Dashboards) — no longer nested under Explorer
- ✅ Live plot refresh: Chart/grid toolbar Refresh / Live;
vsplotter.liveRefresh.enabled for automatic updates when data files change on disk
- ✅ Datetime X columns: ISO dates (
2004-09-01) and timestamps plot on real time axes (uPlot time scale); vsplotter.datetimeColumns.enabled toggles auto-detection; per-plot xColumnType / datetimeTimezone in chart Settings and JSON
- ✅ File types: CSV, TSV, JSON out of the box (custom delimiters); Parquet built-in (hyparquet); HDF5 and other formats via Custom file formats (
__formats__ / vsplotter.formatHandlers)
- ✅ Create plots and AG Grid tables from supported files within VS Code
- ✅ Lightweight and high-performance plotting using uPlot
- ✅ Numeric axis precision: Y (and numeric X) tick labels and the live legend keep enough decimals for small floats — scientific notation below
1e-3 or at 1e6+ — instead of uPlot’s default 3-digit format collapsing them to 0. Optional per–Y-axis opts.axes[].precision (1–12 significant figures) from chart Settings → Axes, saved plot JSON, dashboard widgets, or <vsp-plot precision="N">
- ✅ Interactive selection of x-axis and y-axis columns (including multiple Y columns)
- ✅ Automatic row numbering for default x-axis
- ✅ Automatic handling of non-numeric data with enum labels; optional
vsplotter.enumLegendShowIndex for LABEL (index) in the live legend
- ✅ Saved plot settings to easily recreate plots for multiple files
- ✅ Auto-plot configuration with JSON import/export; Save to workspace on a chart (or Save grid view on a grid) writes one basename-anchored entry to
.vscode/vsplotter.json without dumping the rest of the session. Open Saved Plot on a CSV matches that basename (same places as Open Dashboard)
- ✅ File Explorer integration with automatic file discovery
- ✅ Chart decorations: Limit corridors, μ±kσ bands, reference lines, and annotation markers from chart Settings → Decorations, saved
PlotSettings.decor, or a file-pattern auto-plot entry
- ✅ Chart Export: Copy charts to clipboard or save as PNG; Copy / Save visible data as CSV (current zoom window)
- ✅ Large files: Lazy infinite CSV/TSV grids above 25 MB, plot min/max decimation with zoom re-sample, dashboard Preview / Load full size-gate, CLI
grid-chunks/ — see Current limits
- ✅ Plot settings dialog: Edit X/Y columns (including Select all / Unselect all for Y and per subplot group), layout, uPlot series/axes/scales, legend/cursor, and raw
opts JSON from the chart toolbar (Settings, gear icon); Save updates the plot tree like Edit Plot Settings and refreshes the open chart. Charts created with Plot from a grid stay linked to that grid: the Data tab uses displayed grid columns (not CSV-only names), chart-side Computed columns are hidden (use grid columns instead), and Save replots from the live grid so row filters and valueGetter columns stay in sync.
- ✅ Plot computed columns (synthetic ids): Default prefix is
__vp: (VS Code setting vsplotter.plotComputedColumnPrefix, non-empty; per-plot JSON may set plotComputedColumnPrefix). The chart legend, default axis labels, auto title, and tab title show the id without that prefix (full ids stay in JSON, settings UI, and quick picks). In the chart Settings dialog, Add / Edit opens a dedicated modal (shared with the grid’s Insert Custom Column… flow) for expression vs source, optional dependsOn, and post-transform presets. Expressions are compile-checked (extension host); dependsOn is filled from detected references in params.data["col"], getValue("…"), and params.getValue("…") (bracket form — dot access like params.data.A is not auto-detected). The modal offers Ctrl+Space (Windows/Linux), Cmd+Space (macOS), and @ filtering for column/snippet insertions. The grid Edit Column Settings → Value Formula box uses the same shortcuts. Edit Plot Settings → Computed columns & transforms uses the same Expression vs Source split with validation and an editable comma-separated dependsOn step prefilled from those references. Each entry is either a row expr (same idea as grid formulas: params.data, params.getValue, params.prev = previous file row raw fields) or a source column/id copy, plus optional built-in transform: delta / alias diff (same behavior), unary log, log10, log1p, sqrt, abs, exp, sin, cos, tan (radians), min / max / mean (average) / std (population standard deviation over finite values, same as NumPy std default) — each fills every row with that scalar (all null if no finite values). Use dependsOn for raw headers and other synthetic ids so evaluation order is defined; cycles are rejected. Later columns see post-transform values when using params.getValue on earlier synthetics (e.g. mean / std then an expr for μ±kσ bands). Delta/diff on Y: first point is 0 (synthetic anchor for stable uPlot Y scaling), then differences. X delta/diff drops the first chart row so the first plotted X is the first real step and stays numeric for uPlot. Plot transforms use file row order; the grid’s Formula preset (column editor) and context-menu transform actions use the same ids, with delta/diff on AG Grid display order (sort/filter) and min/max/mean/std as constants over filtered visible rows.
- ✅ Overlay Plots: Compare data from multiple files on one chart
- ✅ Dashboards: Summarize one or many files in a customizable panel (
per-file / aggregate / both / sections / composite); JSON widgets (compose with include), HTML <vsp-*> templates, or JS hooks; PASS/WARN/FAIL checks; Export to print-ready HTML — see the Dashboards authoring guide
- ✅ Custom file formats: Built-in Parquet plus workspace converters under
__formats__ (or vsplotter.formatHandlers) for HDF5 and other formats — see Custom file formats
- ✅ Summary Statistics: View min/max/mean/median/std dev per column in grids
- ✅ Grid CSV export: Copy or save the table as CSV in the current filter and sort order, including derived columns and only displayed fields (every matching row, not just the current page)
- ✅ Custom Delimiters: Auto-detect or manually select CSV delimiters (comma, tab, semicolon, pipe)
- ✅ Seamless integration with VS Code's interface
- ✅ CLI (
vsplotter): Create offline HTML plots, grids, and dashboards from files/args without opening VS Code; headless dash --check for CI (when / timing / limits / expr); serve to host an emitted folder (sidecar Plot Selected); list / doctor for discovery and install diagnostics; plot / grid / dash --pdf Print → PDF via system Chrome/Chromium/Edge (--pdf-theme dark optional) — see CLI and docs/cli.md
Quick Start
- Open the VSPlotter icon in the activity bar (Plots tree), or open a
.csv file in the editor
- Run
VSPlotter: Create Plot from file (or Ctrl+Alt+P)
- Select your x-axis and y-axis column(s)
- View your plot in a new VS Code tab
Try VSPlotter: Show Sample Dashboard or VSPlotter: Show Sample Plot for bundled demos. For Parquet/HDF5, see Custom file formats below.
Commands
VSPlotter: Show Sample Grid Table: Displays a sample grid to show the extension's capabilities
VSPlotter: Show Sample Plot: Opens media/data/sampledata.csv with Sin(x) + Cos(x) in one subplot group, EnumTest (enumerated strings) in another, vertical layout, light chart decorations (in-spec sin corridor, Cos mean refline, verticals where Sin(x) = Cos(x), red band on EnumTest FAIL), and saved opts so the plot-settings dialog demonstrates subgroups, enums, the Decorations tab, and the Series / Legend / Cursor tabs
VSPlotter: Create Plot from file: Creates a plot from the selected data file
VSPlotter: Create Grid Table from file: Creates a grid table from the selected data file
VSPlotter: Overlay Plot from Multiple Files: Select multiple files and overlay their data on a single chart for comparison
VSPlotter: Open Dashboard: Open a dashboard defined under __dashboards__ in .vscode/vsplotter.json (also listed under Dashboards in the Plots tree, nested under matching File Explorer files when the dashboard is single-file — "fileExplorer": false opts out, "fileExplorer": true forces nesting even for composite/source dashboards — on the Plots view title bar, on a data-file right-click in the VS Code Explorer / editor title / Plots File Explorer file node — matching registered defs plus ephemeral Quick stats / Numeric overview / Categories starters — and on folder right-click in the VS Code Explorer or a folder node in the Plots File Explorer tree — both folder actions scope match/glob/files to that folder)
VSPlotter: Open as Dashboard: Open an HTML dashboard template from the Explorer or editor (right-click a .html file). Uses registered __dashboards__ config when the path matches, otherwise an embedded manifest or CSV picker
VSPlotter: New Dashboard from Template: Scaffold a new HTML dashboard from bundled starters (Blank, Gate Card, Parameterized Rolling Checks, Run Report, Split Run, Finance, Feature Showcase) or workspace __templates__ entries; registers it under __dashboards__ (also available as + on the Dashboards tree section)
VSPlotter: Clean Converted Outputs: Delete CSV/JSON files produced by custom format converters (paths recorded from __formats__ / formatHandlers)
VSPlotter: Delete Dashboard: Remove a dashboard from the Plots tree (optionally delete its HTML file) via the trash icon on a dashboard leaf
VSPlotter: Duplicate Dashboard: Clone a __dashboards__ entry under a new name (same html / hook paths) via the copy icon on a dashboard leaf
VSPlotter: Edit Dashboard Settings: Open the dashboard's source for editing from the Plots tree context menu — the HTML template for HTML dashboards, otherwise the __dashboards__ entry in .vscode/vsplotter.json
VSPlotter: Copy JSON Settings to Clipboard: On JSON/hook dashboard leaves (no html), copy a paste-ready __dashboards__ snippet (same command as for plots/grids)
VSPlotter: Show Sample Dashboard: Open a bundled example dashboard (JSON, HTML, JS hook, sections, split-run composite, Runs (include pack) / Runs (HTML include shell), Market Comparison aggregate) or any bundled HTML template (Gate Card, Parameterized Rolling Checks, Run Report, Split Run, Finance Dashboard, Feature Showcase) against sample data
VSPlotter: Export Dashboard: Export the active (open) dashboard as self-contained HTML — interactive by default when size is reasonable (zoomable charts, filterable tables, Print button), or static (PNG charts) for large exports / print fidelity; also vsplotter.exportDashboardTo for tasks/CI
VSPlotter: Open in VSCode Editor: Open a File Explorer tree node's file in a regular VS Code editor tab (right-click a file in the VSPlotter Plots sidebar)
VSPlotter: Save Auto-Plot Configuration - Export current configurations to a JSON file
VSPlotter: Load Auto-Plot Configuration - Import configurations from a JSON file; the file is merged into workspace .vscode/vsplotter.json (including __formats__, __dashboards__, and __templates__ sections) and applied immediately
VSPlotter: Open Settings - Quick access to VSPlotter configuration
Keyboard Shortcuts
All shortcuts use Ctrl+Alt (⌃⌥ on Mac) to avoid conflicts with VS Code defaults.
| Shortcut |
Command |
Context |
Ctrl+Alt+P |
Create Plot from file |
Active supported data file |
Ctrl+Alt+P |
Plot Selected Grid Columns |
Active Grid Table panel |
Ctrl+Alt+G |
Create Grid Table from file |
Active supported data file |
Ctrl+Alt+O |
Overlay Plot from Multiple Files |
Any |
Ctrl+Alt+D |
Show Sample Plot |
Any |
Ctrl+Alt+T |
Show Sample Grid Table |
Any |
Ctrl+Alt+B |
Open Dashboard |
Any |
Ctrl+Alt+R |
Refresh File Explorer |
Any |
VSPlotter is built on top of the uPlot charting library, known for its exceptional performance and small footprint. This ensures that VSPlotter can handle large datasets with ease, providing a smooth and responsive plotting experience even for complex visualizations.
For data grid visualizations, AG Grid is used for a full-featured, high-performance spreadsheet-like viewer for CSV files.
Large File Optimizations
- Progressive loading: Datasets above 50K rows load in chunks in the webview; pagination and page size always follow your VS Code settings (
vsplotter.gridOptions.*) and optional grid JSON — they are not forced by row count.
- Streaming parser: CSV files larger than 5MB use an incremental streaming parser. Plots and dashboards store selected columns in arrays (not one object per row).
- Plot decimation: Series over
vsplotter.plot.maxRenderPoints (100,000) or vsplotter.dashboard.maxPlotPoints (50,000) use a min/max envelope so spikes survive. Zooming a standalone chart re-decimates the window; double-click restores the full envelope. Set vsplotter.decimationMode to stride or off to change the algorithm.
- Debounced filters: Row and column filter inputs are debounced (200ms) to avoid excessive re-rendering while typing. Header column filters are on by default (
vsplotter.gridOptions.defaultColDef.filter); lazy/infinite grids still disable them. Filter rows… on an IDE lazy grid is host-side (not disabled). Autofit on load defaults to on (vsplotter.gridUserOptions.enableAutofitOnLoad).
- Cached cell rules: Cell class rule functions are pre-compiled once rather than re-created on every cell render.
- Row buffer: 20 rows are pre-rendered above/below the viewport for smoother scrolling.
Current limits
Very large inputs used to crash both the IDE and the CLI. See
docs/large-files.md for the mitigations:
- IDE CSV/TSV grids at or above
vsplotter.largeFiles.lazyGridThresholdMb
(25 MB) use an offset index + AG Grid infinite row model — scroll arbitrarily
large files without loading every row into memory. Plot Selected still
works: the host reads the chosen source columns (sort and quick filter apply).
Computed formula columns are skipped in lazy mode — plot the source columns,
or open the file below the lazy threshold.
- Oversized client-side opens (JSON, or CSV under the threshold) refuse when
rows exceed
vsplotter.largeFiles.maxClientSideRows, offering a preview or
lazy loading instead of a silent full load.
- Dashboards cap table/grid widget payloads at
vsplotter.dashboard.maxTableRows (100,000) and
plots at vsplotter.dashboard.maxPlotPoints (50,000), with a visible note when
a grid widget is truncated. Opening an IDE dashboard against a file at/above
vsplotter.dashboard.maxFullEvalFileMb (25 MB) prompts Cancel / Preview first N
rows / Load full file (plus Always preview / Always load full) — Preview applies
clientSidePreviewRows to parse, eval, plots, and events (table caps alone do
not bound host gates). Set vsplotter.dashboard.oversizeOpen to last /
preview / full to skip the dialog, or 0 on maxFullEvalFileMb to disable
the gate.
- CLI
vsplotter grid on large CSV writes chunked sidecars (grid-chunks/)
instead of inlining every row. JSON and --max-rows N still embed. Open the
folder with vsplotter serve <dir> so the page can fetch chunks and
Plot Selected can read the original CSV (or chunks if the source file is
gone). Plot opens a new window — if the browser blocks it, allow popups for
the site and click Plot again. A static server (npx serve) can scroll the
grid but cannot plot.
- CLI
vsplotter plot defaults to plot.maxRenderPoints (pass --max-points 0
for every sample). plot / grid / dash print load progress on files ≥ 5 MB
instead of sitting silent.
Requirements
- Visual Studio Code v1.60.0 or higher
- CLI only: Node.js 18+ (VS Code not required)
CLI
Generate offline HTML plots, grids, and dashboards from the terminal (same TypeScript parsers/builders as the extension). Requires Node.js 18+; VS Code is optional. If Node is not installed, the editor’s Electron binary can run out/cli.js with ELECTRON_RUN_AS_NODE=1 — see CLI — without a system Node install.
Install from npm
# one-off
npx vsplotter doctor
npx vsplotter --help
# global (puts `vsplotter` on PATH)
npm install -g vsplotter
vsplotter doctor
vsplotter plot media/data/sampledata.csv --x X --y "Sin(x)" --out out/sample-plot
Built-in Parquet needs the optional hyparquet dependency (usually installed automatically). If vsplotter doctor reports Parquet missing: npm install -g hyparquet in the same environment, or npm install hyparquet next to a local install. Full install paths (clone, VSIX, discovery): docs/cli.md.
From a clone
npm install && npm run compile
# Plot / grid / dashboard → open out/.../index.html in a browser
node out/cli.js plot media/data/sampledata.csv --x X --y "Sin(x)" "Cos(x)" --out out/sample-plot
node out/cli.js grid media/data/sampledata.csv --out out/sample-grid
node out/cli.js serve out/sample-grid
node out/cli.js dash gate-card --out out/gate-card
node out/cli.js dash gate-card --pdf out/gate-card.pdf
node out/cli.js dash gate-card --pdf out/gate-dark.pdf --pdf-theme dark
node out/cli.js plot media/data/sampledata.csv --x X --y "Sin(x)" --pdf out/sample-plot.pdf
node out/cli.js dash feature-showcase --out out/feature-showcase
# Parquet / custom formats (same converters as the IDE)
node out/cli.js plot media/data/format-demo/run.parquet --x time --y temp pressure --out out/parquet-plot
node out/cli.js plot media/data/format-demo/run.vspexample \
--formats media/data/format-demo/vsplotter.formats.example.json \
--x time --y temp --out out/vspex-plot
# Headless checks for CI (when / timing / limits / expr; --allow-warn for WARN→0)
./examples/cli/dash-check.sh
node out/cli.js dash examples/cli/ci-gate-warn.html --check --allow-warn --json
node out/cli.js dash examples/cli/ci-gate-expr.json --check --json
node out/cli.js dash examples/cli/ci-gate-when.json --check --json
# Same gates from JSON / __dashboards__ (your .vscode/vsplotter.json defs)
node out/cli.js dash examples/cli/ci-gate-pass.json --check --json
node out/cli.js dash "CI Gate FAIL" --settings examples/cli/ci-gates.json --check --json
# Discover dashboards / formats / templates
node out/cli.js list
node out/cli.js list dashboards --json
# Install diagnostics (root / Chrome / catalogs)
node out/cli.js doctor
After npm link (or a global/npx install / VSIX), the vsplotter command is available. Root auto-discovery uses VSPLOTTER_ROOT, the CLI package location, node_modules/vsplotter, and VS Code/Cursor extension folders — see docs/cli.md. Copy-paste scripts and JSON samples: examples/cli/.
Usage Examples
Create a plot from a file
- Open a
.csv file or left-click the file from the Explorer window.
- Select the
VSPlotter: Create Plot from file from the command palette.
- Select your desired X-Axis (default is the row number).
- Select 1 or more columns for the Y-Axis.
- Click
OK to create the plot.
- Hover over the graph to see point values.
- Click, hold, and drag to zoom.
- Double click to reset zoom. A custom axis range (Settings → Scales, or
opts.scales range / rangeFrom) is the home window: drag-zoom still works, and double-click returns to that range instead of the full data extent.

Create a plot from a grid table
- Open a
.csv file or left-click the file from the Explorer window.
- Select the
VSPlotter: Create Grid Table from file from the command palette.
- Select your desired X-Axis in the dropdown menu (default is the row number).
- Select one or more Y-axis columns by clicking column headers or the name labels next to the sidebar visibility checkboxes (click again to deselect). Shift+click a second header or label to add every visible column between that column and the previous non-Shift click to the selection (order follows the grid’s displayed columns).
- Optional: right-click the grid and use the context menu — Hide Selected Columns hides the current selection; Hide Other Columns hides everything that is not selected so only those columns remain visible (restore columns with the sidebar checkboxes or Show / Hide All).
- Optional: click Save grid view (
codicon-save-all) in the sidebar to persist the current column visibility, filters, and column customizations as one entry in .vscode/vsplotter.json under a basename-anchored pattern (sampledata\\.csv$). That does not dump other session plots. Presets appear in the Plots tree; they auto-apply the next time you open matching files only if vsplotter.gridAutoApplyFilePatternPresets is enabled (default off — click the preset to apply).
- Click the
Plot Selected button to generate the plot. On the chart, Save to workspace stores that plot (especially plot-from-grid) as a single named entry so it nests under the file after reload.

Plot enumerated (string) data
String data is automatically detected and enumerated for plotting. Axis ticks show the string labels; the live legend hover preview shows LABEL (index) (e.g. PASS (2)) by default. Set vsplotter.enumLegendShowIndex to false to show the label only (e.g. PASS).

Integer codes via enumMap
When a column is already numeric (state codes, mode bits, etc.), add an enumMap on plot settings to label those integers without converting the CSV to strings:
{
"x": "Time",
"y": ["State", "Temp"],
"enumMap": {
"State": {
"values": { "0": "IDLE", "1": "RUN", "2": "COOLDOWN" },
"default": "UNKNOWN"
}
}
}
- Data is dense-remapped to
0…n-1 for plotting (even spacing like string enums); JSON still declares original codes.
- Axis ticks are placed only at those dense indices (unique labels; no mid-scale duplicates).
- Unmapped values use
default when set (last tick), otherwise they are omitted (null).
- Edit in chart Settings → Data → Enum maps, or Edit Plot Settings → Enum map (JSON). Dashboard plot widgets accept the same field.
Reusing Saved Plot Settings
Each unique X and Y-Axis combination is saved under the Saved Plot Settings section of the VSPlotter Plots Tree View in the VSPlotter activity-bar sidebar. These settings can be re-used for separate files with similar column data (e.g. stock data, time series data, etc.).
- Click on the desired settings under
Saved Plot Settings
- Select a file with the same column data used in the saved settings.

Selecting Saved Plots
Each time a plot is created, it is listed under both File Explorer and Saved Plots in the VSPlotter Plots tree for this session. Reloading the window drops those session nodes unless you persist them.
- Click Save to workspace on the chart toolbar (or right-click a plot → Save Plot to Workspace) to write one named entry to
.vscode/vsplotter.json under a basename-anchored match ((?:^|[\\/])run_001\\.csv$). The same JSON is removed from any other pattern that matches the file. Reserved sections (__dashboards__, __formats__, …) stay intact.
- Right-click a CSV/JSON/TSV (Explorer, editor title, or Plots file node) → Open Saved Plot. The picker lists plots and grids for that basename (tree + workspace config). Global
"" recipes are included only when their columns exist on the file. Another folder with the same basename shows that folder. Then Create Plot / Create Grid. Overlay recipes are skipped.
- Click the ✚ symbol to create a new plot from the same file
- Click the 🗂️ symbol to open the file in a Grid Table.
- Click a nested plot to restore it.
- Click the 🗑️ symbol to delete a saved plot.
Save Auto-Plot Configuration still exports the full in-memory bag (session plots, overlays, dashboards). Prefer Save to workspace when you only want the plot or grid you just created.

Auto-Plot Configuration
VSPlotter now supports auto-plot configurations that can be saved and loaded from JSON files. This allows you to:
- Create plot configurations once and reuse them across multiple files (including
decor spec limits / annotations on every matching run)
- Save configurations to
.vscode/vsplotter.json for workspace-specific settings
- Export configurations to share with team members
- Import configurations from other projects
- Multi-file overlays: use the reserved top-level key
"__overlays__" with an array of plot objects that include "overlayFiles" (two or more absolute paths), plus "x", "y", and optional "opts". On load, entries appear under Saved Plots → Overlays and Saved Plot Settings → Overlays (templates without concrete paths).
- Grid presets: grid entries in the same JSON file can set
userOptions (filters, visible columns, columnTypes, etc.). Use "" for Saved Grid Settings tree presets (click to apply — same as Saved Plot Settings; they are not auto-merged into every open). Use a regex file path for per-pattern presets: by default they also apply only when clicked; set vsplotter.gridAutoApplyFilePatternPresets to true to merge matching patterns when you open a file (workspace vsplotter.gridUserOptions → file pattern → explicit saved grid entry). From an open grid, customize columns/filters in the UI and click the sidebar Save grid view icon (codicon-save-all); you’ll be prompted for a name, then the view is written into .vscode/vsplotter.json under a basename-anchored key (sampledata\\.csv$). Later saves replace that entry in place and do not dump other session plots. The existing Save settings to file icon still exports a standalone JSON file.
Grid column types
First-row inference can mis-classify IDs, timestamps, or mixed columns. Override types in a file-pattern grid preset (auto-applied on open when vsplotter.gridAutoApplyFilePatternPresets is true, or when you click the preset), or set workspace vsplotter.gridUserOptions.columnTypes for true defaults. Entries under "" still accept columnTypes, but only when you click that Saved Grid Settings preset:
{
".*sensor.*\\.csv$": [{
"userOptions": {
"columnTypes": {
"Timestamp": "text",
"Value": "number",
"^ID$": "text",
".*Temp.*": "number"
}
}
}]
}
Keys that match a header exactly apply literally; other keys are treated as JavaScript regex patterns. The same columnTypes object is available as the workspace setting vsplotter.gridUserOptions.columnTypes.
Subplot Groups
When using subplot layouts (vertical, horizontal, or grid) on a single-file plot or a multi-file overlay (with two or more Y columns), you can group Y-axis columns so that each group shares a single subplot panel:
{
"x": "Time",
"y": ["Temp", "Pressure", "Voltage", "Current"],
"subplots": "vertical",
"subplotGroups": [
["Temp", "Pressure"],
["Voltage", "Current"]
]
}
This produces 2 subplots instead of 4 — each panel renders its columns overlaid like a subplots: "none" plot. Colors are assigned continuously across all groups. Columns not assigned to any group automatically go into a catch-all panel.
You can also configure groups interactively via Edit Plot Settings → Subplot Groups, or set Subplot layout from the VSPlotter Plots sidebar (inline submenu on each saved plot with 2+ Y columns; updates the same subplots JSON field as the settings dialog).
Dashboards
Dashboards compose plots and grids into one panel over one or many files. Open from the VSPlotter activity-bar Dashboards tree, a dashboard nested under a matching File Explorer file (binds to that file only), VSPlotter: Open Dashboard (Ctrl+Alt+B), right-click a CSV/JSON/TSV (Explorer, editor title, or Plots file node) for matching defs plus Quick stats / Numeric overview / Categories, or Open Saved Plot on the same file for basename-matched plot/grid presets plus Create Plot / Create Grid. Folder right-click in the VS Code Explorer or on a folder in the Plots File Explorer tree scopes dashboard sources to that folder. Open as Dashboard on an HTML file, or VSPlotter: Show Sample Dashboard. JSON dashboards (no html / hook / include) can Edit layout in the panel: left toolbox, canvas, right inspector (dashboard title, columns, match, and mode, then column-first widget fields; check recipes include limits, equals and latest (==, !=, >, <, <=, >=), timing, crossing count, monotonic, uniform step, percentile, and during-window); drag or Alt+↑/↓ to reorder cards, and drag inside a KPI band to reorder its items (Remove drops one); Save updates a workspace __dashboards__ entry, Save as registers a new one (samples and CSV starters), Discard reverts the draft. Closing a dirty tab discards the draft. How-to and screenshots: docs/dashboard-json-widgets.md. Single-file dashboards (no widget source, no baseline, not composite) nest under matching File Explorer files; "fileExplorer": false keeps them catalog-only, and "fileExplorer": true forces nesting even when the dashboard is multi-file. Multi-file sections dashboards show a table of contents by default ("toc": false opts out). The Plots tree starts collapsed on first load. Refresh Explorer also recursively collapses every Plots-tree node (including nested File Explorer folders) unless vsplotter.collapseExplorerOnRefresh is false. To verify auto-reload, choose Live Refresh Dashboard: VSPlotter copies a writable vsplotter-live-refresh-demo.csv into your workspace, opens it beside the dashboard, and refreshes the dashboard whenever you edit and save that CSV. Scaffold with New Dashboard from Template (tree +). Right-click a dashboard leaf for Edit Dashboard Settings (HTML template or JSON entry), Duplicate, or Delete.
Define entries under __dashboards__ in .vscode/vsplotter.json (JSON widgets, include composition, html template, and/or hook). Modes: per-file, aggregate, both, sections, composite. Toolbar Export / VSPlotter: Export Dashboard / vsplotter.exportDashboardTo save size-aware interactive or static HTML; Refresh and Live follow vsplotter.liveRefresh.*. Settings vsplotter.dashboard.maxTableRows / maxPlotPoints cap table and plot size; maxFullEvalFileMb / oversizeOpen gate oversized IDE opens. In Restricted Mode, expressions/hooks are disabled and HTML scripts/handlers are stripped.
Minimal JSON example:
{
"__dashboards__": {
"Run Summary": {
"match": ".*runs/run_.*\\.csv$",
"mode": "per-file",
"x": "Time",
"widgets": [
{ "type": "stat", "label": "Peak Temp", "value": "max(col('Temp'))", "format": "1" },
{ "type": "plot", "span": 4, "x": "Time", "y": ["Temp", "Pressure"] }
]
}
}
}
Authoring docs: hub docs/html-dashboards.md · cookbook (includes Market Comparison, Recipe J include, Recipe B JSON gate) · configuration · HTML · JSON (compare / baseline / include / gate / verdict / rollup / kpis / Edit layout) · hooks (curated stdlib + full api/ui) · expressions · analysis API. Index: docs/README.md.
Converters under __formats__ (or vsplotter.formatHandlers) write CSV/JSON to ${output}; VSPlotter runs them when stale and feeds the plot/grid/dashboard pipeline. Handlers are either a subprocess (command + args, e.g. Python HDF5) or an in-process JS plugin (module). Parquet is built-in (in-process hyparquet, setting vsplotter.builtinFormats.parquet, default on). The Format Demo sample opens bundled run.parquet and/or run.vspexample. Workspace __formats__ converters need a trusted workspace and first-run Allow consent. See docs/custom-formats.md.
The Formats node in the VSPlotter Plots sidebar lists every registered converter (claimed extensions, source — built-in / workspace / settings — command or module, and output).
Runtime dependencies
| Package |
Why |
hyparquet |
Built-in .parquet converter (optionalDependency; no Python required). If missing, Parquet stays unregistered — npm install hyparquet in the package root restores it. |
Optional host tools for example converters: Python + h5py / numpy for the HDF5 sample handler.
Chart Export
Charts can be exported directly from the plot panel:
- Open any plot (from a file, saved plot, or overlay).
- Use the toolbar buttons at the top of the chart panel. On a narrow panel the bar stays a single row: labels collapse to icons (hover for the name) and the file path ellipsizes, so the chart keeps the height. A very narrow panel scrolls that bar sideways.
- Copy to Clipboard – Copies the chart as a PNG image to the system clipboard.
- Save as PNG – Opens a file dialog to save the chart as a
.png file.
- Copy data (CSV) – Copies the plotted series as CSV. Rows are limited to the current x-axis zoom window (the full series when unzoomed). In the IDE, export always uses the source series held by the host — not the decimated draw buffer — so a zoomed large plot still copies every sample in the window. Copy is meant for glanceable slices: it confirms above 50k rows and refuses above 200k (use Save for those).
- Save data as CSV – Streams the same windowed series to a
.csv file (no row cap). UTF-8 with a BOM so Excel opens it correctly. Offline vsplotter plot HTML exports whatever points were embedded (honour --max-points 0 for full resolution).
Column headers match the legend (computed-column prefix stripped). Datetime X values are written as ISO 8601, honoring datetimeTimezone (utc / local). Enum series export the label, not the dense plotting index. Subplot layouts emit one CSV with every series (they share the x array). Overlay series labels already include the filename prefix.
Overlay interpolate caveat: when overlay alignment is interpolate, the exported X column is the interpolated union grid the chart displays — not the raw per-file sample times. Use row index alignment if you need file-native X.
This works for both single plots and subplot layouts. Offline vsplotter plot HTML uses the same buttons: Copy to Clipboard writes a PNG via the browser clipboard (prefer vsplotter serve / http://127.0.0.1 over file:// if paste is empty), Save as PNG downloads the image, and CSV Copy/Save use ${basename}-export.csv in the browser.
Grid export
From a grid panel, Export visible data as CSV… (sidebar download icon, or the context menu next to Copy Selected Columns) writes the table in the current filter and sort order, with displayed columns only, including derived valueGetter results. Pagination is not a filter: every matching row is exported, not just the current page. Copy visible data as CSV uses the same rows with the same 50k / 200k clipboard limits as charts.
Copy Selected Columns creates a new field that tracks the source column’s visible values. Add derived column… / Formula preset on that copy (delta, abs, …) therefore uses what you see, not the original source field.
Plot settings (chart webview)
From any chart panel, click Settings (gear icon) in the toolbar to open a modal editor (VS Code–style tabs and Codicons, similar to the grid column settings UI).
- Data – X column and Y columns (populated from CSV headers; for overlay plots, headers come from the first overlay file until you change the file list). For overlays, Overlay files lists the combined paths (Add files… opens a file picker; Remove keeps at least two files). Overlay alignment chooses interpolate (default) vs row index (first file’s X). Use Select all / Unselect all next to Y-axis columns when you want every column on or off the plot quickly.
- Layout – Title, width/height (leave empty for automatic sizing). Subplot layout and optional subplot groups (each group row has Select all / Unselect all) apply to single-file plots and to multi-file overlays when you have two or more Y columns (each subplot stacks the same metrics across overlay files; groups use the same rules as single-file plots). On overlays, the default title (
Overlay: … vs …, or Overlay: … when X is the built-in <Row> column) is recomputed when you change X or Y only if the title was still that default for the previous columns; a customized title is kept.
- Series – Per–Y-series line options (label, stroke, fill, width, visibility, gaps, points).
- Axes – Labels, axis side (dropdown: top/right/bottom/left → uPlot 0–3), scale key, stroke, grid; optional Precision (sig figs) on Y axes (1–12; empty = auto). Combined numeric Ys share one left axis and one precision — add a second Y axis with its own scale key for different precisions. Add extra axes if needed.
- Scales – Time/auto flags, direction, numeric min/max home window, and From data (
rangeFrom: min/max of a column, optionally where another column matches). Drag-zoom still works; double-click returns to that window. The same Axis window fields are on a dashboard plot or gate card in Edit layout. Add custom scale keys.
- Decorations – Limit corridors, μ±kσ bands, reference lines, and annotation markers (see Chart decorations).
- Legend / Cursor – Legend and cursor visibility options.
- Advanced – Full
opts object as JSON (functions and hooks cannot be round-tripped from the webview).
Save applies changes to saved plot settings (same tree update as the command VSPlotter: Edit Plot Settings) and reloads the chart in the same panel (no second tab). Cancel closes without saving. If the Advanced tab is active when you save, its JSON replaces the structured opts built from the other tabs for that save.
Chart decorations
Standalone charts can draw the same four decoration fields as a dashboard plot widget: limits, sigmaBounds, referenceLines, and annotations. Author them from Settings → Decorations, in saved plot JSON (decor), or on a file-pattern entry in .vscode/vsplotter.json so every matching run gets the same spec band. Show Sample Plot uses a light subset (corridor + mean + Sin=Cos markers + EnumTest FAIL band). Offline vsplotter plot renders the same overlays.
On Settings → Decorations, check Expression to type a detector expression. The tab documents context (col('Name'), Y-first detectors, this plot’s X column), paste-ready examples, and a detector catalog (same language as dash --check). The expression must return an array of event points (x, optional xEnd / kind / color).
{
"x": "X",
"y": ["Sin(x)", "Cos(x)"],
"decor": {
"limits": { "column": "Sin(x)", "min": -0.5, "max": 0.5, "label": "sin spec" },
"sigmaBounds": { "column": "Cos(x)", "k": 2, "mode": "control" },
"referenceLines": { "column": "Cos(x)", "stat": "mean", "label": "μ Cos" },
"annotations": "crossings(col(\"Sin(x)\"), 0)"
}
}
- Limits – Y-space corridor (optional warn band). Values outside
[min, max] fail (inclusive bounds; a point exactly on max is in spec) and shade fail intervals. Column defaults to the first Y series.
- Sigma bands – μ±kσ (
mode: "control", default k: 2) or a curve-following tube (mode: "series"). Optional window (trailing sample count, ≥ 2) uses the same rolling mean/std as dashboard rolling(): control becomes a Bollinger-style rolling μ±kσ tube; series is y±k×rolling σ. Omit window for global μ/σ over the whole column. Keep window shorter than the variation you care about (a window longer than one oscillation is nearly global σ again). Skipped on overlay plots (μ±kσ of which file?). The Decorations tab greys out this section for overlays.
- Reference lines – explicit
value, or reduce column with stat (min / max / mean / median, default max). On an overlay, stat reduces over the first overlay file.
- Annotations – a dashboard-style detector expression (evaluated host-side with the same evaluator as
dash --check) or a literal { x, xEnd?, kind?, color? }[]. Expressions apply in x-space on every subplot panel unless a point sets series to a Y column (then only that subplot). Enumerated columns compare as labels (v === "FAIL"), not dense codes. Limits / bands / reflines route to the panel whose Y column matches column. To mark where two series meet, cross their difference through 0: crossings(col("Sin(x)").map((s, i) => s - col("Cos(x)")[i]), 0) (where with a tolerance stays on sample rows instead of interpolating). Shade a categorical span with withColor(regions(col("EnumTest"), v => v === "FAIL"), "rgba(241,76,76,0.28)"). Settings → Decorations → Detector expression lists helpers (crossings, transitions, peaks, regions, withColor, …) and notes that dwell / countWhere / implies return scalars, not markers.
Put the same decor object on a file-pattern auto-plot so matching CSVs inherit it without opening Chart Settings:
{
".*run_.*\\.csv$": [
{
"x": "Time",
"y": ["Temp"],
"decor": {
"limits": { "column": "Temp", "min": 0, "max": 85, "label": "temp spec" }
}
}
]
}
The comprehensive sample (media/data/vsplotter.sampledata.comprehensive.json) includes a .*sampledata\\.csv$ entry with a sin spec corridor.
Charts have no params toolbar. A leftover {{params.name}} limit bound is valid JSON (dashboard paste) but produces no overlay — the Decorations tab shows a warning. Changing X/Y columns drops decorations whose column no longer resolves; they are not retargeted. Edit Plot Settings keeps the surviving decor on the draft (and writes the pruned bundle on Save).
CLI example: node out/cli.js plot media/data/sampledata.csv --settings examples/cli/plot-decor.json --out out/decor-plot (rolling tube: examples/cli/plot-decor-rolling.json).
The command VSPlotter: Edit Plot Settings adds Overlay files and Overlay alignment when the item is a multi-file overlay, and Subplots layout / Subplot groups when the overlay has at least two Y columns, so you can change which workspace files are combined (each file must include the current X and Y columns) and how metrics are split across panels.
Overlay Plot from Multiple Files
Compare data from different files side-by-side on a single chart:
- Run the command
VSPlotter: Overlay Plot from Multiple Files from the Command Palette (or click the inline + action on Saved Plots → Overlays or Saved Plot Settings → Overlays in the VSPlotter Plots tree).
- Select 2 or more files from your workspace.
- Choose the X-axis column and one or more Y-axis columns.
- When two or more Y columns are selected, choose subplot layout: the quick pick lists
vsplotter.openInSubPlots first (workspace default). Matching that setting omits subplots from saved JSON so the workspace default still applies; picking another value stores an explicit subplots (horizontal / vertical / grid / none). Skipped for a single Y column.
- Choose overlay X alignment for this plot: the quick pick reflects
vsplotter.defaultOverlayAlignMode when overlayAlignMode would be omitted from saved JSON, explains interpolate vs row index, and stores a per-plot choice (you can change it later in chart Settings → Data or Edit Plot Settings).
- Each file's data is plotted as a separate series, with the filename prefix in the legend for easy identification.
Overlay alignment (chart Settings → Data, Edit Plot Settings, or JSON overlayAlignMode):
- Workspace default when omitted: set
vsplotter.defaultOverlayAlignMode in VS Code Settings to interpolate or index. If a saved overlay omits overlayAlignMode, that setting is used. Per-plot overlayAlignMode in JSON always overrides.
- Interpolate to common numeric X: sorted union of all files’ numeric X values; each Y series is linearly interpolated onto that grid (
null outside that series’ X range; no extrapolation). Suited to different sample rates or timestamps on a shared numeric axis.
- Row index (first file’s X) (
"overlayAlignMode": "index"): only the first file’s X; Y values align by row index (legacy). Best when rows match across files or X is <Row>. Mismatched row lengths are padded/truncated (with a console warning); sampled X mismatch across files logs a hint to try interpolate.
If interpolation is not possible (no finite numeric X/Y pairs), VSPlotter falls back to row-index mode and shows a warning.
The overlay is saved automatically under Saved Plots → Overlays and Saved Plot Settings → Overlays, and is included when you use Save Auto-Plot Configuration (under the "__overlays__" key). In .vscode/vsplotter.json, use the "__overlays__" key or the empty pattern "" for overlay entries; regex file patterns skip overlay objects when applying config per file (by design). Click an overlay entry or run VSPlotter: Open Saved Overlay Plot to reopen it. Edit, duplicate, delete, and copy JSON work like other saved plots.
Summary Statistics
When opening a grid table, a Summary Statistics panel appears above the data grid:
- Click the Summary Statistics header to expand/collapse the panel.
- Shows per-column statistics for numeric columns: Count, Nulls, Min, Max, Mean, Median, and Std Dev.
- Text columns show count and null count.
Datetime X columns
When vsplotter.datetimeColumns.enabled is on (default), VSPlotter detects ISO dates (2004-09-01), common timestamps, and epoch numeric columns on the X axis and plots them on a uPlot time scale (values stored as Unix seconds).
Per-plot overrides (chart Settings → Data, Edit Plot Settings, or JSON):
| Field |
Values |
Purpose |
xColumnType |
auto, datetime, text, number |
Force or suppress datetime handling for this plot’s X column |
datetimeTimezone |
utc, local |
Tick label display timezone |
xColumnType: datetime forces a time axis even when the workspace master switch is off.
Live plot refresh
Reload open plots when data files change on disk (e.g. growing log CSVs):
- Manual: chart toolbar Refresh or command VSPlotter: Refresh Plot; grid toolbar Refresh reloads the table from disk
- Automatic:
vsplotter.liveRefresh.enabled is on by default; open plots and grids refresh when their data files change on disk
- Per panel: chart and grid toolbar Live toggles auto-refresh for that panel (overrides when global is off)
Related settings: vsplotter.liveRefresh.throttleMs (minimum ms between reloads while a file is changing; default 100 keeps ~10 Hz streams smooth — raise it for very large files, or go as low as 50 for faster streams), vsplotter.liveRefresh.refreshGrids (allow grids to participate in live refresh; default on), vsplotter.liveRefresh.maxFileSizeMb (skip huge files, default 50). Open live panels are also polled by mtime/size at that interval, so continuous appends still refresh when the OS file watcher is silent (common in Docker/remote hosts). Grid-linked charts replot when the source grid reloads; use each panel's Live toggle to opt in or out. Demo: Show Sample Dashboard → Live Refresh Dashboard, or python3 scripts/live-refresh-demo.py init then stream --smooth --output vsplotter-live-refresh-demo.csv (plot the sine column).
Custom Delimiter Support
VSPlotter supports CSV files with different delimiters:
- Auto-detect (default): Automatically detects comma, tab, semicolon, or pipe delimiters by analyzing the first few lines.
- Manual override: Set
vsplotter.csvDelimiter in settings to force a specific delimiter:
, (comma – standard CSV)
\t (tab – TSV files)
; (semicolon – common in European locales)
| (pipe)
Known Issues
- Lazy (large-file) CSV/TSV grids keep header column filters off and skip computed formula columns when plotting. Plot the source columns, or open the file below
vsplotter.largeFiles.lazyGridThresholdMb. Chunked CLI sidecar grids also disable Filter rows… (file-order slices only). See Current limits.
Release Notes
See the CHANGELOG for details on each release. Maintainers: publication steps are in docs/releasing.md.
Acknowledgements
VSPlotter is powered by uPlot and AG Grid.
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Enjoy plotting with VSPlotter!