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.
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) |
Examples
Section titled “Examples”Basic pipeline
Section titled “Basic pipeline”# Step 1: Convert dataset to JSONvizb bench.txt -o data.json
# Step 2: Generate HTML from JSONvizb ui data.json -o report.htmlAfter merging
Section titled “After merging”# Merge multiple JSON filesvizb merge v1.json v2.json -o merged.json
# Render the merged result as HTMLvizb ui merged.json -o report.htmlReduce output size with --charts
Section titled “Reduce output size with --charts”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 |
# 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 onlyvizb ui data.json -o report.html -c bar,line
# Pie only via remote datavizb ui --data-url https://example.com/bench.json -o report.html -c pie // 375KRemote data via --data-url
Section titled “Remote data via --data-url”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.
vizb ui --data-url https://example.com/bench.json -o report.htmlUpload 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:
# Remote data might have a z-axis — opt in to the 3D chunkvizb ui --data-url https://example.com/bench.json --3d -o report.htmlWith an embedded JSON file, 3D is still detected automatically from the data (no --3d needed).