Repository navigation
zuzu v0.9.0
zuzu v0.9.0 finishes phase 3, the runtime of Vega, and works through much of phase 7, the diagrams, with compatibility and visible differences first. It adds the expression functions that zuzu did not have, lays out a grid as Vega does, draws more of the guides of Vega, compiles more of Vega-Lite as vega-lite.js does, and draws more of DOT and Mermaid. The README now shows the code of its examples and the charts and diagrams that they draw. The output of many charts and diagrams changes, as the sections below say.
Conformance
- Vega: 538 of 540 specs match vega.js, up from 536. Only
density-heatmapsandflight-passengersdiffer. - Vega-Lite: 464 of 470 specs match, up from 461, and every one of the 1193 scales.
Vega
- The expression functions
gradient,copy,geoShape,treePath,treeAncestors,vlSelectionTest,vlSelectionIdTestandvlSelectionResolvework, andgeoArea,geoBoundsandgeoCentroidmeasure on the sphere with no projection. vega.js agrees on 377 oracle cases. - The grid layout of a facet and of a concatenation reads
align,bounds,center,columns,padding,offset,headerBand,footerBand,titleBandandtitleAnchor, as the documents of Vega say. - A domain that mixes strings and numbers sorts as V8 sorts it.
- An axis draws
tickBand,tickOffset,tickRoundandtickExtra, and readsbandPositionfromconfig.axisBand. - A legend draws the properties of its title, its frame, its labels, its symbols, its ticks and its gradient that it only reported before.
- A text of more lines puts its first line on its baseline and the other lines below it, as vega.js does.
- A spec that paints its own light background draws in the light mode, so its guides read on it. A group title follows the config of a title and of its style.
formatwrites an infinite number as ∞.- The diverging ramp of the theme runs through
muted, so a mark near its middle shows.
Vega-Lite
- The config of each kind of mark, and
config.mark, pass on as a style that wins over the look, sodx,dyand a color of the config draw. config.numberFormatformats each quantitative field, and the title of the config of the axes applies.customFormatTypesis an issue.- A condition on a property of an axis, such as the
gridDashof each tick, draws, with a test that is an expression or a predicate of a field. tooltipandhrefbecome encodings of Vega. An image and a sized rect center on their point. A datum ofy2and of a text, the valuewidthofx2, and the offsets of an arc compile as vega-lite.js compiles them.- A title that a layer gives wins over the titles of the other layers. A rect with an end keeps zero in its scale. A bar on a scale without zero starts at the bottom of its domain. A legend of a time unit draws symbols. A hollow point draws in its color. A legend of
strokeWidthdraws, with the range 1 to 4 of Vega-Lite.
Diagrams
- DOT: a group of a record lies the other way from the fields around it,
\land\ralign their lines, the ranks balance as dot balances them, an edge with a list of colors draws a line in each, and a table or a cell of an HTML label keeps its link. An unknownrankdiris an issue. - Mermaid:
- The shape
personand the shapes of BPMN draw their figures and put their labels under them. - A node lies in the first subgraph to end that names it, and properties can follow the brackets of a node and run over more lines.
- The box of a subgraph holds its title, and subgraphs side by side in LR keep a gap.
- The ends of the edges spread on a side of a node, and each kind cuts its comments by its own rule.
- The gantt draws its title, the marker of today and the tasks that end before they start as Mermaid does.
- The start and the end of a state diagram take the color of the one state next to them. A note and a box title of a sequence stay in their boxes. The label of a document and of a block arrow centers where a reader expects it.
- The shape
- Layouts: the engine of ELK takes the passes that Mermaid adds, the order of the states and the notes, the algorithm of a subgraph and the ports of an edge. The mean error of the places of the nodes against mmdc fell from 0.022 to 0.008 for ELK and from 0.016 to 0.010 for dagre.
API
zuzu.WithFunctioncan add a function under a new name.expr.Compiletakes the optionexpr.Knownfor it.Chart.Imagepasses the logger of the render, or else of the parse, to okage.- The packages
zuzu,themeandvegalitehave examples of their API.
Decisions
- D57: zuzu draws no look like xkcd, phases 0 and 3 are done, and vega.js copies the rows that a transform changes, which corrects D32 part 14.
Dependencies
- github.com/xo/okage v0.20.1
Full changes: v0.8.3...v0.9.0