GitHub

Pie chart

A pie shows how a whole splits into parts. Each row of the table is one slice.

The chart this block draws
```s-chart
type: pie
title: Visits by channel
---
| Channel | Visits |
| ------- | ------ |
| Search  | 5200   |
| Social  | 3100   |
| Email   | 1900   |
| Direct  | 1400   |
```

When to use it

Use a pie for a handful of parts that add up to something: visits by channel, budget by category. Past six or seven slices it gets hard to read, and a bar chart compares the parts better.

Options

OptionOn a pie chart
type: pieRequired.
titleText above the chart.
legendLists the slices. top by default, or bottom or none.
heightChart height in pixels, 120 to 1200. The pie fits the height.
colorsOne colour per slice, in row order.
paletteA palette from settings. Slices take its colours in order.
source, x, yDraw from note properties: one slice per note.

stacked, horizontal, x-label and y-label have no effect on a pie.

One series only

A pie draws the first number column. If the table has more, the chart says "Pie charts show the first series only" and names the column it used. Move the column you want to the second position.

Legend at the bottom

The chart this block draws
```s-chart
type: pie
title: Visits by channel
legend: bottom
height: 360
---
| Channel | Visits |
| ------- | ------ |
| Search  | 5200   |
| Social  | 3100   |
| Email   | 1900   |
| Direct  | 1400   |
```