Skip to content
Internals

GoFishv0.1.0

an open-source visualization library for JavaScript and Python

Simple when you want, complex when you need

Because graphics are all made of the same stuff

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()
made withat