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.
vizb [target] [flags]Input Methods
Section titled “Input Methods”vizb data.csv -o output.htmlPass a file path as the first argument.
go test -bench . | vizb -o output.htmlPiping go benchmarks directly to vizb.
# Format detected from content — no --parser neededvizb data.csv -o output.html # ✨ csvvizb data.json -o output.html # ✨ jsongo test -bench . -json | vizb -o output.html # ✨ goWith --parser auto (the default), vizb inspects the input content, picks the right parser, and prints its choice.
Parsers
Section titled “Parsers”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:
# CSV / JSON tables (auto-detected; -P optional)vizb data.csv -o output.htmlvizb data.json -o output.html
# Rust Criterioncargo bench | vizb --parser rs:criterion -o output.html
# Rust Divancargo bench | vizb --parser rs:divan -o output.html
# Vitestnpx vitest bench | vizb --parser js:vitest -o output.html
# Tinybenchnode bench.js | vizb --parser js:tinybench -o output.htmlSee 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:
vizb data.csv --theme "#ff6b6b,#4ecdc4,#ffe66d" -o report.htmlExamples
Section titled “Examples”Basic usage
Section titled “Basic usage”# Pipe benchmarks to HTMLgo test -bench . | vizb -o output.html
# From a filevizb bench.txt -o output.htmlJSON output
Section titled “JSON output”# Generate JSON for later mergingvizb bench.txt -o data.json
# Then generate HTML from JSONvizb data.json -o output.htmlGrouping
Section titled “Grouping”# 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 groupingvizb bench.txt -r '(?<n>.*)/text=(?<x>.*)/level=(?<y>.*)' -o output.htmlSee the Group guide and 3D Charts for detailed examples.
--select mode matrix
Section titled “--select mode matrix”--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
--selectneeds 2–3 columns (assigned tox,y, optionalzby position). - Repeatable
--select(2 columns per flag only): each flag isdim,metric→ one stat type in a single dataset; charts separate by stat name (defaultmetric 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
--selectonly):x:region,y:latency,z:sales— use for every column or omit prefixes for all. - No overlap with
--groupcolumns. Repeatable solo--selectdoes not imply grouping. - Other parsers warn and ignore
--select.
# Grouped: pick stat columnsvizb bar sales.csv -g region,product -p x,y --select amount,total -o bars.html
# Solo value: numeric x,y from spiral datavizb 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 typevizb scatter examples/csv/region-metrics.csv \ --select region,latency \ --select region,sales \ -o dual.htmlA 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.
Logarithmic scale
Section titled “Logarithmic scale”vizb bench.txt --chart bar:scale=log -o output.htmlFiltering
Section titled “Filtering”# Include only benchmarks matching a patternvizb bench.txt -f "Sort" -o output.htmlReducing output size
Section titled “Reducing output size”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.
vizb bench.txt -c bar -o output.html # ~400 kBvizb bench.txt -c bar,line -o output.html # ~415 kBThe 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.
Per-chart settings
Section titled “Per-chart settings”Use --chart (repeatable) to override settings for a specific chart type. Each spec is <type>:<key>=<val>,... or <type>:<bare-flag>,....
# Bar chart: swap axes to yx, sort ascendingvizb bench.txt -p n/x/y --chart bar:swap=yx,sort=asc -o output.html
# Line chart: log scale; pie chart: show labelsvizb bench.txt --chart line:scale=log --chart pie:labels -o output.html
# 3D bar with auto-rotate; line with labels offvizb 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.htmlSupported 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.
Tagging for release tracking
Section titled “Tagging for release tracking”vizb bench.txt -o v1.json --tag v1.0 -n "MyBench"See Merging Guide for tag-based comparison.
Deep links
Section titled “Deep links”Set --id when generating HTML so the UI can link to a dataset by name instead of index:
vizb sales.csv -g date,region -p x,y --id sales-by-date -o report.html# Share: report.html?id=sales-by-dateThe 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.