Repository navigation
zuzu v0.8.0
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
WithLookandWithLookFontdraw a chart in a look.theme.LookExcalidrawdraws each mark as if by hand, with the sketch of rough.js, which zuzu copies in Go.theme.LookStandardis the default. - The package
text/excalifontholds Excalifont under the OFL. Callzuzu.WithLookFont(theme.LookExcalidraw, excalifont.Font()). - The key
zuzu.lookof the config of a spec, andlook: handDrawnof Mermaid, select the look.zuzu.lookSeedandhandDrawnSeedgive the seed. The same source, seed and fonts give the same bytes on one architecture. - The SVG of a look embeds its font.
svg.Writetakes options, andsvg.WithFontembeds 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.dagrelays out a graph as the dagre of Mermaid 12.3 does. zuzu copies dagre in Go. - The new module
github.com/xo/zuzu/elkholds a copy of ELK in Go, with the engineelkand its layouts, such aselk.stress. Callzuzu.WithLayoutEngine(elk.Layout()). - The new options
WithLayoutEngineandWithLayoutmake an engine available and force a layout.layout: dagreandlayout: elkof Mermaid select the layout.
Projections (D52)
- zuzu draws the 18 projections of vega-projection-extended, such as
airy,armadillo,berghaus,gingery,healpix,peirceQuincuncialand 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