Skip to content

vizb

The root command (vizb) is the primary entry point. It parses data and generates interactive visualizations. The input format is auto-detected by default (override with --parser).

Use the root command to generate multiple chart types from one dataset (--charts bar,line,...) with optional per-chart overrides (--chart). To generate a single chart with a flag set tailored to it, use the chart subcommands (vizb bar, vizb pie, …) instead.

Terminal window
vizb [target] [flags]
Terminal window
vizb data.csv -o output.html

Pass a file path as the first argument.

Vizb reads CSV and JSON tables directly, and parses benchmark output from Go, Rust, JavaScript, and TypeScript frameworks. The format is detected automatically; force a parser with --parser:

Terminal window
# CSV / JSON tables (auto-detected; -P optional)
vizb data.csv -o output.html
vizb data.json -o output.html
# Rust Criterion
cargo bench | vizb --parser rs:criterion -o output.html
# Rust Divan
cargo bench | vizb --parser rs:divan -o output.html
# Vitest
npx vitest bench | vizb --parser js:vitest -o output.html
# Tinybench
node bench.js | vizb --parser js:tinybench -o output.html

See the Parser Guide for each parser’s metrics, and the Tabular Data guide for CSV/JSON rules.

Flag Short Default Description
--output -o (stdout) Output file path. .json → JSON, else → HTML
--parser -P auto Parser: auto (detect), go, js:tinybench, js:vitest, rs:criterion, rs:divan, csv, json
--name -n Benchmarks Dataset name
--theme default Initial series palette: default, vintage, meadow, westeros, essos, wonderland, walden, chalk, infographic, macarons, roma, shine, purple-passion, or 2+ comma-separated hex colors
--description -d "" Dataset description
--tag -t "" Tag identifier for release tracking
--id "" Stable dataset id for ?id= deep links in the HTML UI
--group-pattern -p x Pattern-based grouping (n/x/y/z with your chosen separators; z → 3D). Benchmarks: / or _. CSV/JSON: match -g (commas for -g a,b,c, spaces for quoted -g "a b", etc.)
--group-regex -r "" Regex-based grouping (named captures)
--group -g "" Names dimensions in --group-pattern order. csv/json: column/field names (separators must match -p); benchmark parsers: human-readable axis labels
--select (repeatable) csv/json only: see --select mode matrix below
--json-path "" json only: select a nested array to chart via a jq-like dot path (e.g. --json-path '.data.results')
--sort -s "" Deprecated on root: use --chart <type>:sort=<asc|desc>. Sort order: asc or desc (default: as-is)
--charts -c bar,line,pie Chart types to generate (bar, line, scatter, pie, heatmap, radar)
--chart Per-chart type settings override (repeatable): <type>:<key>=<val>,... — see below
--show-labels -l false Deprecated on root: use --chart <type>:labels. Show value labels on charts
--filter -f "" Regex to include only matching rows (CSV/JSON: --group label) or benchmark names
--mem-unit -M B Memory unit: b, B, KB, MB, GB
--time-unit -T ns Time unit: ns, us, ms, s
--number-unit -N "" Number unit: K, M, B, T (default: as-is)

--theme changes series colors only; light/dark mode remains independent. See Color Themes for the complete visual palette catalog, runtime behavior, and custom palette syntax. For a brand palette, pass at least two #rgb or #rrggbb colors:

Terminal window
vizb data.csv --theme "#ff6b6b,#4ecdc4,#ffe66d" -o report.html
Terminal window
# Pipe benchmarks to HTML
go test -bench . | vizb -o output.html
# From a file
vizb bench.txt -o output.html
Terminal window
# Generate JSON for later merging
vizb bench.txt -o data.json
# Then generate HTML from JSON
vizb data.json -o output.html
Terminal window
# Pattern grouping (slash-separated multi-dimensional data)
vizb bench.txt -p n/x/y -o output.html
# 4D grouping → renders a 3D chart (z requires x and y)
vizb bench.txt -p n/x/y/z -o output.html
# Regex grouping
vizb bench.txt -r '(?<n>.*)/text=(?<x>.*)/level=(?<y>.*)' -o output.html

See the Group guide and 3D Charts for detailed examples.

--select is repeatable (csv and json parsers only). Its role depends on whether grouping is explicit:

Mode Trigger --select syntax What it does
Group stat pick -g, -r, or non-default -p Any number of numeric columns; optional {label} Picks which numeric columns get their own chart
Solo value axes --select only; all selected cols numeric 2–3 cols per flag: x,y or x,y,z Assigns columns to continuous coordinate axes; disables auto-group and auto-value
Solo mixed axes One --select only; categorical x + numeric y[,z] 2–3 cols: region,latency Category on x, values on y/z; scatter is the primary chart
Solo multi-stat Repeatable --select only; 2 cols per flag region,latency + region,sales One dataset; each flag is an independent dim,metric pair; charts split by stat.type (default latency by region)
Auto-group No flags; mixed categorical + numeric file Picks highest-cardinality categorical column as x
Auto-value No flags; all-numeric file First 2–3 numeric columns as coordinate axes

Solo --select rules:

  • A single --select needs 2–3 columns (assigned to x, y, optional z by position).
  • Repeatable --select (2 columns per flag only): each flag is dim,metric → one stat type in a single dataset; charts separate by stat name (default metric by dim, e.g. latency by region). Rename axis labels with {label} on the dimension column (region{Region}). Rename chart tabs with a trailing (Title): --select region{Region},latency (Latency by Region). Legacy: {label} on the metric column still overrides the stat name when () is omitted.
  • Explicit placement (single --select only): x:region,y:latency,z:sales — use for every column or omit prefixes for all.
  • No overlap with --group columns. Repeatable solo --select does not imply grouping.
  • Other parsers warn and ignore --select.
Terminal window
# Grouped: pick stat columns
vizb bar sales.csv -g region,product -p x,y --select amount,total -o bars.html
# Solo value: numeric x,y from spiral data
vizb scatter spiral-3d.csv --select x,y -o xy.html
# Solo mixed: category region + value latency (scatter)
vizb scatter examples/csv/region-metrics.csv --select region,latency -o mixed.html
# Multi-stat: one dataset, charts by stat type
vizb scatter examples/csv/region-metrics.csv \
--select region,latency \
--select region,sales \
-o dual.html

A single solo --select auto-names the dataset from its columns (region × latency). Repeatable --select keeps one dataset; chart tabs follow stat types (latency by region, sales by region).

See Group vs Select for when to use each approach, and the Select guide for the full solo --select reference.

Terminal window
vizb bench.txt --chart bar:scale=log -o output.html
Terminal window
# Include only benchmarks matching a pattern
vizb bench.txt -f "Sort" -o output.html

By default bar, line, and pie are bundled. Use --charts to add heatmap or radar, or to narrow the set further — unselected renderers are dropped at generation time.

Terminal window
vizb bench.txt -c bar -o output.html # ~400 kB
vizb bench.txt -c bar,line -o output.html # ~415 kB

The 3D engine (~380 kB) is included automatically when data has a z-axis and bar or line is selected. For 2D-only data, it is always omitted.

See UI Overview → Output File Size for a size reference table.

Use --chart (repeatable) to override settings for a specific chart type. Each spec is <type>:<key>=<val>,... or <type>:<bare-flag>,....

Terminal window
# Bar chart: swap axes to yx, sort ascending
vizb bench.txt -p n/x/y --chart bar:swap=yx,sort=asc -o output.html
# Line chart: log scale; pie chart: show labels
vizb bench.txt --chart line:scale=log --chart pie:labels -o output.html
# 3D bar with auto-rotate; line with labels off
vizb bench.txt -p n/x/y/z --chart bar:3d-rotate --chart line:labels=false -o output.html
# Horizontal grouped bars (bar:horizontal)
vizb sales.csv -g region,category -p x,y --chart bar:horizontal -o out.html

Supported keys:

Key Bare flag Values Valid for
swap permutation of axis chars (e.g. yx, yxn) all
sort asc, desc all
labels labels true, false all
scale linear, log bar, line only
3d-rotate 3d-rotate true, false bar, line 3D only

Bare flags (no =) default to true. Per-chart settings override the chart’s own defaults. The root-level --sort and --show-labels flags are deprecated — use --chart overrides instead.

Terminal window
vizb bench.txt -o v1.json --tag v1.0 -n "MyBench"

See Merging Guide for tag-based comparison.

Set --id when generating HTML so the UI can link to a dataset by name instead of index:

Terminal window
vizb sales.csv -g date,region -p x,y --id sales-by-date -o report.html
# Share: report.html?id=sales-by-date

The id is stored as a top-level field on the dataset JSON. Passthrough JSON keeps any id already present — --id only applies on fresh assembly. When a dataset has an id, the UI syncs ?id= in the URL; otherwise it falls back to ?d=0, ?d=1, … See UI Overview → Deep links.