Skip to content

1.21.0 (Desk and Room)

Latest

Choose a tag to compare

@shergin shergin released this 07 Sep 17:14
· 1 commit to main since this release

The table release: the summary that usually precedes any chart, rendered by
the grammar that renders the charts. A table is text on band scales — not a
ninth mark, not a widget — and a table column is an axis you read instead
of see.

  • Raster is the encoded cell grid of one render — glyphs and colors, chrome
    included — as a plain value. Plot::raster / try_raster produce it;
    Raster::encode is the string half, so a TUI host that paints cells and a
    caller that wants a String share one grid. Continuation cells (columns == 0) sit to the right of a wide glyph. This is the host-neutral snapshot
    Ink (and any future cell-buffer host) consumes; the ratatui adapter may
    keep its private path in 1.x.
  • The JS rim (js/, npm malevich) is public. 0.3 covers the eight-mark
    grammar, shared goldens against this crate, Mapping/Viewport as JS values,
    npx malevich, and pixel encoding (Plot.renderPixels) with detection in
    JS. See js/CHANGELOG.md and js/README.md.
    cargo run --example js_goldens --features serde -- --check is the shared
    oracle gate.
  • With serde, a series may deserialize from { "col": N } inside
    data::with_columns, so a render request can keep large buffers out of
    the JSON document. Stored documents still encode series as arrays of
    numbers (gaps as null); a column reference without a bind is an error.
  • describe(names, groups) renders the first-look summary — count mean sd min p25 p50 p75 max, one row per group — from Moments and the box
    plot's type-7 quantiles; table(rows, columns, values) (and try_table)
    lays out any numeric matrix the same way. Row labels ride the y band
    axis, column headers the x band axis; each column is padded to its own
    width so numbers meet at the decimal point and centered on its band by
    the same rule the header uses, so a column and its header land in
    lockstep. A table is tightest when the plot rows equal its row count
    (frame height rows + 2, one more with a title). Both presets are proven
    byte-identical to their grammar expansions, like every preset.
  • table_with takes a TableOptions colormap: each value colored at its
    position within its own column's finite extent — the heatmap reading,
    column by column; a diverging map centered at zero splits sign. The
    digits still carry the value, so a colored table survives a colorless
    pipe undamaged.
  • Text gains the align channel (Align::Left, the unchanged default;
    Center; Right). On a bands x axis the band nearest the anchor is the
    box, with chrome's own header geometry — the rounded band center, a
    step-wide budget — and aligned text also snaps its row the way chrome
    snaps a band label's, so cell text never drifts a line or a column from
    its labels. Text wider than the box clips to it, ending with a truncation
    . — a number is shortened visibly, never garbled by a neighbor's
    digits. Centered text over Cells on band axes annotates heatmaps:
    confusion matrices with counts, from the grammar, no preset. In pixel
    panes the same anchors shift the ink by its own width and center it
    vertically in its row, so a table's values sit on their labels' lines in
    the image exactly as in cells. Serialized specs omit the default
    alignment, so existing documents decode and render unchanged.
  • Annotations keep the field they land on: a Text glyph over filled patch
    ink — a heatmap band, a bar body, a class region — takes the underlying
    color as its background instead of punching a hole in it; two-sample
    cells blend their halves. Pixel panes already composited ink over the
    field; plain output still lets the glyph replace the shade, so nothing is
    lost in a pipe. The gallery's correlation matrix shows the pattern —
    every coefficient printed in its cell, ink picked from the luminance
    underneath.
  • The resolution ladder is content-aware: render_best and the
    capability-context paths keep a text-only plot — a stat table — on
    cells even when pixels are offered. For pure text the terminal's own
    font is the best tier, and the glyphs stay selectable; an explicit
    render_pixels call is still honored.
  • scale::NumberFormat is an axis's label discipline for any value set:
    one fraction width, one SI prefix, exact decimals, whole labels for
    whole-number sets, for gaps. It formats every table column and is
    public for any readout.