Apps

Charts

# Charts — live charts of sheet data Two data modes, four chart types (line · bar · stacked · pie): - Published cells (default) — subscribes to a spreadsheet's publish channel (`sheet/<wb>/cells`) and plots every numeric cell as a series over a rolling sample window. Scrubbing the sheet's snapshot timeline re-publishes through the same channel, so the chart follows the replayed history automatically. - Named range (`s`) — pick one of the sheet's named ranges from a list; the chart draws its current values. Data flows over RPC (`get-range`) and the sheet's `sheet/<wb>/range/<name>` topic signals every change — the chart refetches and redraws. If the name is deleted in the sheet, the panel falls back to published-cells mode. ## Selecting the sheet Several sheet panels can run at once, each with its own workbook (runtime `sheet`, `sheet2`, …; panel tag `sheet:<wb>`). `w` (or Charts ▸ Select sheet…) lists the live sheet panels as `<runtime> · <workbook>` and attaches to the pick: - the cells feed follows the picked workbook (`sheet/<wb>/cells`), so `main`, `sysmon`, … all work; - range-mode RPC (`named-ranges`, `get-range`) targets the picked runtime, and the change topics come back scoped to its workbook. With exactly one sheet panel running, charts attaches to it automatically at startup (after a short grace period so a slow-loading sibling can register); with several, it starts on the configured topic until you pick. Switching sheets clears the sample buffers and leaves named-range mode (range names belong to the old workbook). `r` resubscribes from the config keys and drops the `w` attachment. ## Chart types `line` (default), `bar`, `stacked`, and `pie` — pick from the panel menu or cycle with `t`; `charts/type` sets the startup default. - line — one line per row (rolling samples in published-cells mode). - bar — one bar per category: a row of the range is one category (its leading string cell labels it, else `R<n>`); rows with several numeric cells get `·<column>` suffixes; single-row ranges label by column letter. Bars are zero-baselined (negatives draw below). - stacked — one bar per range row, one stacked segment per column. The range's headings label it: an all-string first row of the named range heads the columns (series names → legend and colors), and each row's leading string cell labels its bar on the x-axis (else `R<n>`); without a heading row columns fall back to column letters. Positives stack above the zero baseline, negatives below. In published-cells mode it draws a single bar stacking each series' latest value. - pie — one slice per category (positive values only), same labels as bar; the legend shows each slice's share. ## Configuration - `charts/sheet-topic` — the channel to subscribe to at startup (default `sheet/main/cells`); `w` overrides it at runtime. Edit in the config app (Ctrl+S there persists). - `charts/sheet-runtime` — the sheet app's runtime name for RPC (default `sheet`; a second instance would be `sheet2`); `w` overrides it at runtime. - `charts/max-samples` — samples kept per series (published-cells mode). ## Keys | Key | Action | |-----|--------| | `w` | pick which running sheet panel to attach to | | `s` | pick a named range to chart (RPC picker dialog) | | `t` | cycle chart type: line → bar → stacked → pie | | `r` | resubscribe from the config keys (drops a `w` attachment) | | `c` | clear the sample buffers / leave named-range mode |