Skip to content

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) — --select picks which numeric columns get their own chart.
  • Without group (solo) — each --select assigns 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.

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.

Terminal window
vizb bar sales.csv -g region,product -p x,y --select amount,total -o bars.html
vizb 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.

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

Pick two or three numeric columns as coordinate axes. With three, vizb auto-enables 3D.

Terminal window
# Two numeric columns → 2D value scatter
vizb 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.html

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.

Terminal window
# Category region on x, numeric latency on y
vizb scatter region-metrics.csv --select region,latency -o mixed.html
# Three columns: category x + value y + value z
vizb scatter life-expectancy-income.csv --select Country,"Life Expectancy",Income -o mixed3d.html

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).

Terminal window
vizb scatter region-metrics.csv \
--select region,latency \
--select region,sales \
-o dual.html

Rename the dimension axis label with {label} on the dimension column, and rename chart tabs with a trailing (Title):

Terminal window
vizb scatter region-metrics.csv \
--select 'region{Region},latency (Latency by Region)' \
--select 'region{Region},sales (Sales by Region)' \
-o dual.html
  • A single --select needs 2–3 columns (assigned to x, y, optional z by position).
  • Repeatable --select takes 2 columns per flag only: each flag is dim,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 --select only): x:region,y:latency,z:sales — use prefixes for every column or omit them for all.
  • No overlap with --group columns. Repeatable solo --select does not imply grouping.
  • Other parsers warn and ignore --select.

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.