Skip to content

Pie chart

Slices that add up to a whole, with a legend of values and percentages. As a donut (the default) the middle shows the total, or the value of the slice under the pointer. Click a slice (or select it with the keyboard and press Enter) to send it to your flow.

Property Type Default Description
label string Pie chart Title at the top
icon string Lucide icon before the title
unit string Shown with the total and in the accessible labels
decimals number 0 Decimals of values
donut boolean true A ring with the total in the middle; off for a full pie
labels percent · value · none percent Text on the slices (only where it fits)

On a wide tile the legend goes beside the chart; on a tall or narrow one, below it. The legend never shows half a row: it shows as many whole rows as fit and the rest scroll (with the mouse wheel, by touch, or with the arrow keys once the legend has focus) while the chart stays in place. While there are more rows in that direction, a soft fade at the top or bottom edge of the legend says so (it goes away at the end of the list, and there is none when every row fits).

msg.payload = { Changeover: 42, Breakdown: 27, Cleaning: 18 }; // replaces every slice
msg.payload = [{ label: 'Changeover', value: 42 }, …]; // same, as a list
msg.payload = []; // clear (also null)

Zero and negative values are left out. msg.topic doesn’t matter: a pie has one series.

{ payload: { label: 'Breakdown', series: 'value', value: 27 }, topic: '', _client: { id: 'c7f…' } }