Skip to content

zuzu v0.8.0

Choose a tag to compare

@kenshaw kenshaw released this 22 Nov 09:58
· 30 commits to main since this release

zuzu v0.8.0 adds the look like Excalidraw, the layouts of dagre and ELK, and the projections of vega-projection-extended. It records the answers of the maintainers of 2026-11-22 (D38 to D55) and fixes many charts and diagrams that the review page found. The output of many charts and diagrams changes, as the sections below say.

The look like Excalidraw (D39 to D43, D47, D49, D50)

  • The new options WithLook and WithLookFont draw a chart in a look. theme.LookExcalidraw draws each mark as if by hand, with the sketch of rough.js, which zuzu copies in Go. theme.LookStandard is the default.
  • The package text/excalifont holds Excalifont under the OFL. Call zuzu.WithLookFont(theme.LookExcalidraw, excalifont.Font()).
  • The key zuzu.look of the config of a spec, and look: handDrawn of Mermaid, select the look. zuzu.lookSeed and handDrawnSeed give the seed. The same source, seed and fonts give the same bytes on one architecture.
  • The SVG of a look embeds its font. svg.Write takes options, and svg.WithFont embeds a font.
  • A fill draws as a hachure over an underlay, so a mark hides what is under it. A gradient draws as a hachure over a tint of itself. A small shape wobbles less, and a shape shorter than 10 fills solid.

The layouts of dagre and ELK (D39, D44, D45)

  • The transform zuzu.dagre lays out a graph as the dagre of Mermaid 12.3 does. zuzu copies dagre in Go.
  • The new module github.com/xo/zuzu/elk holds a copy of ELK in Go, with the engine elk and its layouts, such as elk.stress. Call zuzu.WithLayoutEngine(elk.Layout()).
  • The new options WithLayoutEngine and WithLayout make an engine available and force a layout. layout: dagre and layout: elk of Mermaid select the layout.

Projections (D52)

  • zuzu draws the 18 projections of vega-projection-extended, such as airy, armadillo, berghaus, gingery, healpix, peirceQuincuncial and the interrupted projections. A projection clips to its own outline.
  • A mark can clip to a path or to the sphere of a projection, in the SVG, in the PNG and in the look.

Colors of Mermaid (D53, D54, D55)

  • A diagram whose source names no theme draws in the scheme of zuzu, with the blue of a chart and a graph of DOT, not the pink of mermaid-redux-color.
  • A node, a note and a panel fill with a solid tint of their color, with no opacity, so a node over a panel keeps its tint. This holds for every graph and for the boxes that the charts of Mermaid color by kind.
  • An agentflow diagram colors its nodes by kind and its flows in turn. Composite states draw a title band. The subgraphs and the lanes of a flowchart, and the composite states, take the colors in turn from the second.
  • A note takes the yellow of the scheme.
  • The start and the end of a state diagram, a fork bar and a junction point fill solid. A start or an end takes the color of the one state next to it.

Charts (D46, D48, D51)

  • Axes, ticks and named schemes follow Vega more closely. An axis draws the grid of Vega and labels fewer ticks where the labels crowd.
  • In the dark mode, a gray near black or white that a spec names flips its lightness.
  • A line gets a name at its end, and an area a label of its high point, only where they fit. A ranged area draws as a flat tint.
  • Many fixes to the compiler of Vega-Lite: legends of points and custom shapes, the corner radius of stacked bars, labels of normalized bars, trails, the parallel coordinates, quarters of a time axis, and the area under a layered line.

Diagrams

  • DOT: the arrows of a loop sit on the loop, the cylinder takes the shape of Graphviz, and a long edge bends around the nodes of its ranks.
  • Mermaid: the labels of shapes with a header or a side band sit where a reader expects them, markdown runs draw in bold and italic, and the state notes and composites draw as Mermaid draws them.

Dependencies

  • github.com/xo/okage v0.20.1

Full changes: v0.7.5...v0.8.0