New
sunburst-chart gains total-angle and start-angle
Sunbursts no longer have to be full circles. total-angle sets how far the rings sweep and start-angle where the first segment begins, so a chart can open a gap, fan out over a half circle, or start anywhere on the dial.
#sunburst-chart(data, start-angle: 315deg, total-angle: 270deg)Thanks to @apcamargo for contributing this in #25.
Fixes
Labels were being painted over by shapes drawn after them
Placed content paints in order, and three charts emitted a shape and its label in the same pass — so a shape drawn later covered a label drawn earlier.
sunburst-chart — segments are collected depth-first, so an outer ring was placed after the label of the ring beneath it. Labels near 3 and 9 o'clock extend radially, cross the ring wall, and lost their tail: Proteobacteria rendered as Proteobacteri.
pie-chart — the donut hole was placed after every percentage label and painted over them. Labels also sat at a fixed 0.75 of the radius, which falls inside the hole once donut-ratio passes it, so a thin donut lost its percentages entirely. They now sit in the middle of the ring band whatever the hole takes out of it.
heatmap / correlation-matrix — cells sit flush against each other, so a value wider than its cell overflowed into the neighbour and lost the tail to the next cell's fill.
Each of these charts now resolves its geometry once and draws shapes and labels in separate passes, the pattern rings, chord, sankey and gauge already used.
Heatmap values are sized to their cell
heatmap and correlation-matrix drew values at a fixed size regardless of how much room the cell had, so longer numbers ran into their neighbours. Values are now sized to the widest number in the grid — one size for the whole matrix, chosen so it fits.
Visible change: grids with long values render smaller, legible numbers instead of overlapping ones. Grids whose values already fit are unchanged.
Label width budget no longer depends on the chart's sweep
The 360 in sunburst-chart's arc-length estimate is the degrees-to-radians conversion constant, not the chart's angular sweep. Dividing by total-angle inflated the label width budget by 360 / total — 1.33× at 270° — so labels were sized larger than the segment could hold.
Compatibility
No breaking changes. Both new parameters default to the previous behaviour (total-angle: 360deg, start-angle: 0deg).
Across all 21 demos, the showcase and the full test suite — 132 rendered pages — only 3 changed, all donut percentages moving to the band centre.
Compiler floor remains Typst 0.13.0, verified against the 0.13.0 compiler.
Full changelog: v0.9.1...v0.10.0