Skip to content

vizb ui

Generate an interactive HTML chart from a vizb dataset JSON file. This is the second step in the JSON pipeline — useful when you want to generate HTML from previously merged or processed data.

Terminal window
vizb ui [file] [flags]

[file] is optional when --data-url is set.

A single JSON file containing a vizb dataset object or array. This must be JSON generated by vizb <target-file> -o file.json or vizb merge ... -o file.json.

Flag Short Default Description
--output -o (stdout) Output file path (HTML)
--data-url -U (none) URL to fetch dataset JSON from at runtime (no input file needed)
--charts -c bar,line,pie Chart types to bundle into the HTML (bar, line, scatter, pie, heatmap, radar)
--3d false Bundle the 3D renderer when using --data-url (remote z-axis shape is unknown at build time)
Terminal window
# Step 1: Convert dataset to JSON
vizb bench.txt -o data.json
# Step 2: Generate HTML from JSON
vizb ui data.json -o report.html
Terminal window
# Merge multiple JSON files
vizb merge v1.json v2.json -o merged.json
# Render the merged result as HTML
vizb ui merged.json -o report.html

By default bar, line, and pie are bundled. Pass --charts to add heatmap or radar, or to ship fewer renderers — unused chart chunks are stripped at generation time.

Selection Approx. size
bar,line,pie (default, 2D data) ~400 kB
bar,line,pie,heatmap,radar ~445 kB
bar or line with z-axis data (embedded JSON) ~570 kB
Terminal window
# Bar-only report — smallest possible output (~400 KB vs ~570 KB with 3D)
vizb ui data.json -o report.html -c bar
# Bar and line only
vizb ui data.json -o report.html -c bar,line
# Pie only via remote data
vizb ui --data-url https://example.com/bench.json -o report.html -c pie // 375K

The default embed mode inlines the dataset JSON directly into the HTML file. For small datasets this is ideal — one file, works offline, no dependencies. But as dataset history grows (many merged runs, many benchmarks), the JSON can exceed 10 MB and the output file becomes unwieldy to share or store.

Use --data-url to decouple the UI layer from the data layer: the HTML stays a lean dashboard shell and fetches the JSON from a URL at load time. The JSON file is hosted separately and can be updated without regenerating the HTML.

Instead of embedding the JSON inside the HTML, point the dashboard at a hosted URL. dataset is fetched at load time; only the chart renderers you select are bundled.

Terminal window
vizb ui --data-url https://example.com/bench.json -o report.html

Upload bench.json to the URL separately (GitHub raw, S3, GitHub Pages, etc.), then open report.html in any browser.

The remote JSON may list more chart types in settings than were bundled — the UI intersects against VIZB_CHARTS at load time, so only shipped renderers appear as tabs.

Because the remote data shape is unknown at build time, the 3D engine is not bundled unless you pass --3d:

Terminal window
# Remote data might have a z-axis — opt in to the 3D chunk
vizb ui --data-url https://example.com/bench.json --3d -o report.html

With an embedded JSON file, 3D is still detected automatically from the data (no --3d needed).