Select
The --select flag is repeatable and applies to the csv and json parsers only. Other parsers warn and ignore it. It plays two different roles depending on whether group is active:
- With group (
-g,-r, or a non-default-p) —--selectpicks which numeric columns get their own chart. - Without group (solo) — each
--selectassigns 2–3 columns to coordinate axes, and vizb plots every row as a separate point (no aggregation).
A column cannot be in both --select and --group. See Group vs Select for when to use each approach.
Role 1 — Group stat pick
Section titled “Role 1 — Group stat pick”With group active, every numeric column gets its own chart by default. Use --select to keep only the columns you want, in the order you want them, and optionally rename each chart’s label.
vizb bar sales.csv -g region,product -p x,y --select amount,total -o bars.htmlvizb bar sales.csv -g region,product -p x,y --select 'amount{Total},count{Orders}' -o bars.html| Topic | Behaviour |
|---|---|
| Syntax | Comma-separated column names; optional trailing {label} to rename the chart (stat) |
| Order | Charts appear in --select flag order |
| Quoting | Quote names that contain ,, {, or } (e.g. "price{USD}") |
| Scope | csv and json parsers only; ignored with a warning elsewhere |
| Omitted | Auto-detects every numeric column (the default) |
This is the grouped companion to --group — see the Group guide for --group / -p mechanics.
Role 2 — Solo --select (no group)
Section titled “Role 2 — Solo --select (no group)”Pass --select without group (-g, -r, or non-default -p) and vizb enters select axis mode. Auto-group and auto-value are both disabled. Each --select defines one view with 2–3 columns assigned to x, y, and optional z. Every row stays a separate point — nothing is summed.
The mode depends on the column types you select:
| Mode | Trigger | Result |
|---|---|---|
| Value | All selected columns numeric | Continuous coordinate axes (x, y[, z]) |
| Mixed | One categorical + numeric | Category on x, values on y[, z]; scatter is the primary chart |
| Multi-stat | Repeatable flags, 2 columns each | One dataset; each flag → a stat type (latency by region); chart tabs by stat |
Value mode (all numeric)
Section titled “Value mode (all numeric)”Pick two or three numeric columns as coordinate axes. With three, vizb auto-enables 3D.
# Two numeric columns → 2D value scattervizb scatter spiral-3d.csv --select x,y -o scatter.html
# Three numeric columns → 3D value scatter (auto-enables 3D)vizb scatter spiral-3d.csv --select x,y,z -o scatter3d.htmlMixed mode (category + value)
Section titled “Mixed mode (category + value)”When the first selected column is categorical and the rest are numeric, vizb puts the category on the x axis and the values on y (and optional z). This is the natural fit for plots like region vs. latency.
# Category region on x, numeric latency on yvizb scatter region-metrics.csv --select region,latency -o mixed.html
# Three columns: category x + value y + value zvizb scatter life-expectancy-income.csv --select Country,"Life Expectancy",Income -o mixed3d.htmlMulti-stat mode (repeatable)
Section titled “Multi-stat mode (repeatable)”Repeat --select with two columns per flag (dim,metric) to build several stat combinations in one dataset. Charts separate by stat type. The default chart name is metric by dim (e.g. latency by region).
vizb scatter region-metrics.csv \ --select region,latency \ --select region,sales \ -o dual.htmlRename the dimension axis label with {label} on the dimension column, and rename chart tabs with a trailing (Title):
vizb scatter region-metrics.csv \ --select 'region{Region},latency (Latency by Region)' \ --select 'region{Region},sales (Sales by Region)' \ -o dual.htmlSolo --select rules
Section titled “Solo --select rules”- A single
--selectneeds 2–3 columns (assigned tox,y, optionalzby position). - Repeatable
--selecttakes 2 columns per flag only: each flag isdim,metric→ one stat type in a single dataset; charts separate by stat name. (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 prefixes for every column or omit them for all. - No overlap with
--groupcolumns. Repeatable solo--selectdoes not imply grouping. - Other parsers warn and ignore
--select.
Solo --select vs auto-value
Section titled “Solo --select vs auto-value”Both produce value/mixed charts, but they differ in who picks the columns:
| Auto-value | Solo --select |
|
|---|---|---|
| Trigger | No flags; all-numeric file | --select only |
| Columns | First 2–3 numeric columns, auto-detected | Only the columns you name |
| 2D vs 3D | 3+ columns → auto-3D | 3 names → 3D; 2 names stays 2D |
| Inference | Logged to stdout (🧠 Auto-valued by …) |
None — you are explicit |
Solo --select is the override when auto-value guesses wrong or you want fewer columns than the file holds. See Group vs Select → Auto-value for the inference rules.