Skip to content

Pie Chart

The pie chart shows how a whole breaks into parts. Unlike bar and line charts, pie has no cartesian axes — vizb maps your dimensions to multiple pie charts rendered side-by-side, one per axis. Each slice carries its name and percentage, so the composition of your dataset is immediately readable. The default is a filled pie; --donut cuts a hole.

Use pie charts when you care about proportion and share rather than raw magnitude: which dataset name dominates, which configuration contributes the most, or how Z variants divide the total.

Pie ignores the X/Y/Z grid model. Instead, each axis becomes its own standalone pie:

Dimension Role
XAxis Each unique X value becomes a slice in the “By X-Axis” pie
YAxis Each unique Y value becomes a slice in the “By Y-Axis” pie
ZAxis Each unique Z value becomes a slice in the “By Z-Axis” pie

Slice sizes are proportional to the sum of values for that axis entry. Labels show the slice name and its percentage of the total.

Sample orders below (copy → sales.csv). Full file: examples/csv/sales.csv (10,000 rows, 2024–2025). Live: tabular-data.

sales.csv
order_dateregioncategoryproductquantityamount
2024-01-01CentralHardwareConnector162488.24
2024-01-02EastToolsGear42207.08
2024-01-03NorthMechanicalSensor203465.22
2024-01-04WestElectronicsValve247633.44
2024-03-12SouthIndustrialWidget315088.10
2024-06-18EastElectronicsRelay122214.50
2024-09-05NorthHardwareBolt281724.27
2024-12-20WestToolsGadget192938.82
2025-02-08CentralMechanicalValve277350.26
2025-04-14SouthElectronicsWidget413278.77
2025-07-22EastIndustrialConnector155093.42
2025-10-03NorthToolsGear334102.15
2025-11-19WestHardwareSensor222890.40
2025-12-28SouthMechanicalGadget26611.32

One pie chart: each unique X value is a slice. The slice size is proportional to its total value. This is the clearest way to see which X category dominates.

Natural-language prompt after installing the vizb skill. The agent runs the CLI.

/vizb sales.csv as pie by region
1D pie chart showing quantity share by region with labeled slices

Two pies side-by-side: By X-Axis and By Y-Axis. Each pie breaks the total differently — the first by X category, the second by Y column. Comparing the two lets you see which axis has more evenly-distributed weight.

Natural-language prompt after installing the vizb skill. The agent runs the CLI.

/vizb sales.csv as pie by region & category
2D pie charts side by side — quantity by region and by category

Three pies in a row: By X-Axis, By Y-Axis, and By Z-Axis. Each pie slices the total along a different axis, giving you a three-way breakdown of the same dataset in a single view.

This example splits order_date into month and day slots (same grouping as the Sales by Date tabular-data dashboard) and maps category to the Z axis.

Natural-language prompt after installing the vizb skill. The agent runs the CLI.

/vizb sales.csv as pie, split order_date into month & date (skip the year), category as depth
3D pie charts in a row — quantity by date, month, and category

Pie charts expose four runtime settings — sort, labels, donut, and axis swap.

Setting CLI flag UI toggle Notes
Sort --sort asc|desc Sort control Orders slices by value
Labels --show-labels Show labels Shows name + percentage on each slice
Donut --donut Donut Cut a hole in the pie. Off (default) is a filled pie.
Swap --swap Axis switcher Reorders which axis maps to which pie

Override settings for just this chart type without affecting others:

Terminal window
# Sort slices descending and show labels
vizb pie sales.csv -g region,category -p x,y --sort desc -l -o out.html
# Filled pie is the default; --donut cuts a hole
vizb pie sales.csv -g region --donut -o donut.html