BlyxDocumentation
Browse chapters
Documentation / Framework projects

Bunting · Publish a support-queue report

Publish a distribution as a standalone HTML table with interval labels, counts and meters. Reuse the same bin definitions in reports and tests.

The developer problem

A colored chart alone can hide values from people navigating with assistive technology. W3C’s table guidance pairs data cells with headers. Bunting emits row and column headers and prints the count alongside every meter.

Run the project locally

Group eight first-reply waits at 5, 10 and 20 minutes. The resulting HTML page opens offline and exposes intervals, counts and shares as a table. Every observation contributes to one row. Install Blyx 0.2.1, Rust and a host linker, then run these commands.

git clone --depth 1 --branch v0.1.0 https://github.com/Rahulchaube1/blyx-bunting.git
cd blyx-bunting
blyxc native-run project.blyx

Use the API

Supply finite strictly increasing boundaries. A value exactly on a boundary belongs to the bucket above it. Bucket −1 counts missing or non-finite values. An empty boundary vector represents all finite values. The table generator validates boundaries before writing any markup. The caller supplies the HTML document around the table.

FunctionBehavior
bu_valid(edges), bu_bucket(edges, value)Check boundaries and locate the value by binary search.
bu_count(data, edges, bucket)Count observations in one bucket. An invalid request returns −1.
bu_table(data, edges)Write a captioned HTML table with explicit counts and meter values. Returns false for invalid boundaries.

Verify a change

Run the package checks from its release directory. Compare the browser example with its expected output, then change the input in the exercise below.

blyxc native-run tests.blyx

Try the program

Output Ready
Expected output
2
2
2
Open in the full playground →

Practice

Change the cut points to 4 and 12. Where do the exact boundary observations go?

Hint

Change only the worked example’s input. The API table describes the output.

Worked solution

Values 4 and 12 move into the buckets beginning at those cut points.

Find

let edges = [5, 10];

Replace with

let edges = [4, 12];

Output after the change

1
4
1