Fold
A wide table made long: each row repeated once per chosen column, with that column's name and value.
Static preview; loading the interactive plot
<script>
import { Plot, Fold, Points } from "hmplot";
const data = { name: ["a", "b", "c"], before: [1, 3, 2], after: [2, 4, 1] };
</script>
<Plot {data} height={300} axes2d>
<Fold fields={["before", "after"]}>
<Points x="key" y="value" />
</Fold>
</Plot>
Usage
Outputs key and value plus retained source columns and identities. as can rename key and value. Fold expands each observation once per requested field; it does not aggregate. Use a categorical X scale for the key channel.
To let the viewer change a setting, read an input in it: fields={input("fields")} (Python fields=hm.input.fields), where fields is a Select with multiple=true of column names.