an open-source visualization library for JavaScript and Python
import { chart, layer, selectAll, field } from "gofish-graphics"; layer({ h: 400 }, [ chart(seafood) .flow( spread({ by: "lake", dir: "x", spacing: 64 }), stack({ by: field("species").sort("count"), dir: "y" }) ) .mark(rect({ h: "count", fill: "species" }).name("bars")), chart(selectAll("bars")) .flow(group({ by: "species" })) .mark(ribbon({ opacity: 0.8 })), ]).render(el);
from gofish import chart, layer, select_all, field layer([ chart(seafood) .flow( spread(by="lake", dir="x", spacing=64), stack(by=field("species").sort("count"), dir="y"), ) .mark(rect(h="count", fill="species").name("bars")), chart(select_all("bars")) .flow(group(by="species")) .mark(ribbon(opacity=0.8)), ], h=400).render()