← Back to Work

FLOURISH · CHART ENGINEERING

Making room for the data

I led the design and engineering of external labels for Flourish pie and donut charts, giving chart makers a way to label slices that were too small to hold text.

My roleFeature lead, working with product designers
Built withD3 and SVG
ReleasedOctober 2026

Labels had to fit inside the slice

Before this release, labels inside the slices were the only placement option in Flourish pie and donut charts. When a slice was too small to hold its label, readers had to look elsewhere for the category name. External labels gave those names room outside the pie, with leader lines showing which slice each label belonged to.

Before and after

Switch between the original layout and the new default using the same UK electricity data. Look for small slices that gain a label, especially in the grid and at mobile widths.

Single chart

Desktop

Mobile

Grid of charts

Desktop

Mobile

How the layout works

Labels form columns on either side of the chart. Elbow leader lines connect each label to its slice. The layout adjusts vertical spacing to reduce overlaps and can wrap or truncate long labels. When space runs out, it hides labels it cannot place while favouring placements close to their segments.

Segment count, text length, font size and available space all affect what fits. A legend can still give readers a way to identify categories whose labels are hidden.

Designing for more than one chart

I worked with product designers through review and a substantial rework. We needed a default chart makers could override, with behaviour that held up when the chart resized, appeared in a grid or transitioned between label states.

Several small slices on the same side can fill one column even when the other has room. A zero-value category also needs consideration because it has no visible slice for a leader line to point to.

Shipping a new default

In October 2026, we made external labels the default for new charts and kept internal labels available as an option. A new major template version let existing charts keep their appearance. The team also updated starter examples to show the new default.