Skip to content

zuzu v0.7.2

Choose a tag to compare

@kenshaw kenshaw released this 15 Nov 10:48
· 54 commits to main since this release

zuzu v0.7.2 embeds IBM Plex Sans as one font file in WOFF2, which makes a program that imports zuzu 958 KB smaller. It also fixes the marks and the layout of Vega and Vega-Lite that a new review page showed, and adds a tool that draws each source beside its original.

Changed

  • IBM Plex Sans in WOFF2. The six faces of IBM Plex Sans are now one TrueType collection, compressed in WOFF2: 277 KB in place of 1.2 MB of TTF files (D34). text.Fonts decodes it once, in about 8 ms, and gives fonts/IBMPlexSans.ttc beside the license, in place of six .ttf files. A program that reads a face by the name of its file must read the collection now. Noto Color Emoji stays in TrueType.
  • Fallbacks in a web format. text.NewFallback accepts a font in TrueType, OpenType, WOFF, WOFF2 or EOT, and Fallback.Data gives the TrueType or OpenType bytes.

Fixed

  • Vega marks. The pointRadius of a geoshape runs on each object. An axis offset reads a value reference, and a field reference can name a field that is itself a reference. The root group keeps the x and the y of its encode. An area takes a width or a height in place of x2 or y2. A continuous scale spreads a scheme over a domain of any length.
  • Labels of guides. A number format with no precision takes the precision that tells two ticks apart, as d3-scale does, and the format "s" writes each label with the prefix of the largest end. A log axis labels only the ticks that d3 labels. The encode of an axis applies to its labels, title, grid and domain.
  • Colors. merge of a color keeps a color in the space of the last color, as vega.js does. An axis reads config.axis.domain.
  • Vega-Lite marks. A bar on a continuous scale with no x2 gets a center and a width, so the bodies of a candlestick draw. The outliers of a boxplot sit at the middle of the band. A channel keeps every condition of a list. The offsets of a mark add to its position.
  • Vega-Lite layout. A nominal or ordinal y with a fixed height puts its first category at the top. A mark that is not an arc reads theta and radius. A facet in a concatenation keeps its title, and the spacing of a facet and of a concatenation is read. A dashed line whose gaps are no longer than its width has flat caps. A mark that sets clip is clipped to its group in SVG and in an image.

Added

  • Review page. test/cmd/review draws each spec and each diagram of the corpus with its original renderer and with zuzu, and writes a page that shows the two side by side.
  • Survey. docs/survey/compare.html draws zuzu in its first column, beside 14 other chart and diagram libraries.
  • Logo. The README shows the logo of zuzu.

Dependencies

  • github.com/xo/okage v0.8.0

Full changes: v0.7.1...v0.7.2