Waffle Chart: What It Is, When to Use It and How to Build One in React
A waffle chart shows a part-to-whole relationship as a grid of squares, usually 10 by 10, where each square stands for one percent. Squares are filled in one color per part, so "64 out of 100" can literally be counted. It's also called a square pie chart or a percentage grid.
Waffle charts are popular in reports for general audiences because they turn a percentage into something concrete. A reader who struggles to judge the angle of a pie slice can still see that about two thirds of the grid is filled.
What a waffle chart is
A waffle chart has four parts:
- A grid. Most often 10 × 10 = 100 squares, so one square equals 1%. Some charts use other grids, such as 20 × 5, but 10 × 10 is the easiest to read.
- Filled squares. Each part of the whole gets a block of squares in its own color. Parts fill the grid in a fixed order, usually row by row.
- The remainder. For a single rate ("31% use the API"), the rest of the grid is drawn in a light neutral color.
- Labels. The name and value of each part, placed next to the grid or in a legend that also shows the value.
When to use a waffle chart
- A single rate for a general audience. "Two in three accounts are active every week." The filled block against the empty remainder makes the share tangible.
- Two to four parts of a whole. Plan mix, device split or survey answers with a handful of options.
- A friendlier replacement for a pie chart. Squares are easier to count and compare than angles.
- Side-by-side rates. Several small waffles, one per segment, each showing the same rate, can work as a simple form of small multiples.
When not to use a waffle chart
- Small differences matter. The resolution of a 10 × 10 grid is one percent. 41.2% and 41.6% look identical. Use a sorted horizontal bar chart with labeled values.
- More than about four parts. With six or more colors, the grid turns into a patchwork. A bar chart ranks the parts more clearly.
- The values don't add up to a whole. Waffle charts are for shares of one total. Revenue per region, or growth rates, are not parts of a whole.
- Values can be negative. A square can't be negative. Use a diverging bar chart.
- Comparing composition over time. Several waffles in a row make the reader count squares across grids. A stacked bar chart, or a mix-shift chart, shows the change directly.
- Tiny shares. A part below 0.5% gets no square at all. If tiny parts matter, use a table or a bar chart.
How to read a waffle chart
- Check the grid size. On a 10 × 10 grid, one square is 1% and one full row is 10%.
- Count rows, then squares. Six full rows and four more squares is 64%.
- Compare blocks by area. For several parts, the bigger block is the bigger share.
- Read the labels for exact values. The grid gives the feel; the label gives the number.
Design rules for honest waffle charts
Make the squares add up to the grid. Rounding each share independently can give 99 or 101 squares. Allocate squares with the largest remainder method so the total is always exactly 100, and print the true values in the labels.
Keep the part order fixed. Fill parts in a deliberate order, largest first or in a natural order such as plan tiers, and keep the same order in the legend.
Use one strong color for the part that matters. For a single rate, color the rate and draw the remainder in light grey. For several parts, use a small categorical palette and avoid red and green next to each other.
Label directly with values. "Active weekly: 64%" next to the grid, not a color-only legend.
Don't use icons unless they help. Icon grids (little people instead of squares) can work for public audiences, but they're harder to count and can imply that one icon is one person when it's actually one percent. Say what a square represents.
Say what the whole is. "Share of 12,400 accounts with any login in the last 30 days." Without the base, a percentage is hard to judge.
One grid size per page. If several waffles appear together, they all use the same grid so squares mean the same thing everywhere.
Worked example: weekly active accounts
The numbers below are invented for illustration. A product team wants to show how its customer accounts were active over the last 30 days:
| Activity | Share of accounts |
|---|---|
| Active every week | 64% |
| Active some weeks | 23% |
| Logged in once | 9% |
| Not active | 4% |
On a 10 × 10 grid, "Active every week" fills six full rows and four squares, "Active some weeks" fills the next two rows and three squares, and the last two parts take the final 13 squares.
The title states the finding: "Two in three accounts are active every week". The subtitle gives the base: "Share of accounts, last 30 days".
A second, simpler version of the same story uses a single rate. If 31% of active accounts use the API, a waffle with 31 colored squares and 69 grey ones says "31 in 100" better than a pie with one slice.
As a pie chart, the 9% and 4% slices would be thin wedges that are hard to compare. As a bar chart, the ranking would be precise but less approachable for a non-technical reader. The waffle sits in between: accurate to one percent and easy to grasp.
How to build one in React
The ChartslibraryUI waffle chart is free (MIT). With the shadcn CLI:
npx shadcn@latest add https://chartslibraryui.com/r/waffle-chart.jsonOr with the ChartslibraryUI CLI in any React project:
npx chartslibraryui add waffle-chartBoth copy waffle-chart.tsx and the shared core/ folder into components/charts/. Import the theme once in your root layout (import "@/components/charts/core/charts.css";), then render it:
import { WaffleChart } from "@/components/charts/waffle-chart";
const activity = [
{ label: "Active every week", value: 0.64 },
{ label: "Active some weeks", value: 0.23 },
{ label: "Logged in once", value: 0.09 },
{ label: "Not active", value: 0.04 },
];
export function AccountActivity() {
return (
<WaffleChart
title="Two in three accounts are active every week"
subtitle="Share of accounts, last 30 days (illustrative data)"
data={activity}
label="label"
value="value"
format={{ kind: "percent" }}
/>
);
}For a single rate, pass one row and a total; the remainder is drawn as empty squares:
<WaffleChart
title="31 in 100 accounts use the API"
data={[{ label: "Use the API", value: 0.31 }]}
label="label"
value="value"
total={1}
remainderLabel="Don't"
format={{ kind: "percent" }}
/>Squares are allocated by largest remainder so they always add up to the grid (10 × 10 by default; change it with grid). Negative values and parts that add up to more than the total show an error message instead of a misleading grid. See the waffle chart component page for live variants and props.
FAQ
What is the difference between a waffle chart and a pie chart? Both show parts of a whole. A pie uses angles, which are hard to compare; a waffle uses countable squares, which are easier to read for most people. Waffles also work better for a single rate shown against the remainder.
How many squares should a waffle chart have? 100 squares in a 10 × 10 grid is the standard, because one square equals one percent. Other grids work, but the reader then has to work out what one square means.
How do you handle rounding in a waffle chart? Use the largest remainder method: give each part its whole squares, then hand out the remaining squares to the parts with the biggest fractional parts. The squares then always add up to 100, and the labels show the exact values.
When should I use a waffle chart instead of a bar chart? When the audience is general, the shares are of one whole, and one-percent resolution is enough. For precise comparison or rankings, a bar chart is better.
Can a waffle chart show values above 100%? Not on one grid. If a value exceeds the whole, it isn't a part-to-whole comparison; use a bar chart with a reference line at 100%.