Blog
Charts from data

CSV to donut chart online

A donut is a pie chart with the centre cut out. That hole is not decoration: it removes the part of the disc where slices are thinnest and least informative, and it frees the middle for the number that matters most — the total.

Your data never leaves this device

Your data

Paste a table straight from Excel or Google Sheets, or drop a CSV file. Nothing is uploaded anywhere — the whole calculation runs inside this browser tab.

CSV, TSV or plain text. Files saved in windows-1251 are detected and re-read automatically, so Cyrillic headers do not turn into garbage.

Parsing options

Columns

Result

The drawing library is downloaded only when you press the button, and only on this page.

This page has no server side at all. The table you paste is parsed by JavaScript inside your own browser, the chart is drawn on a canvas element on your machine, and the export file is assembled locally. Nothing is uploaded, stored or written to any log. You can disconnect from the network after the page has loaded and everything will still work — which is the simplest way to verify the claim yourself.

Facts and limits of this method

Best for One total split into a handful of parts, shown once
Slice limit Twelve; anything beyond is folded into an "Other" slice automatically
Ideal count 2 to 6 slices
Negative values Ignored — a share of a whole cannot be negative
Centre hole 58% of the radius, freeing the middle for the total
Sorting Slices are sorted largest first, which is the only order a reader can follow
Output PNG at 2× scale, plus CSV and JSON with values and percentages

When it misleads you

How it is calculated

The construction is identical to the pie chart — same sorting, same twelve-slice ceiling with automatic folding into "Other", same handling of empty and negative values. The only difference is the cutout, fixed at 58% of the radius.

That 58% is chosen so the ring stays thick enough to carry colour and thin enough to leave a usable hole. Much thinner and small slices become slivers; much thicker and the chart is a pie with a dot in the middle.

The total appears above the chart rather than inside the hole. Text rendered inside a canvas cannot be selected, translated or read by a screen reader, so it lives in the page instead — the hole stays empty and the number stays useful.

Percentages in the export are computed against the sum of the drawn slices, which after folding is still the full total: the "Other" slice carries the sum of everything merged into it.

Questions and answers

Is a donut better or worse than a pie?

Practically equivalent. The hole makes the chart slightly more compact and gives you somewhere to put the total. Neither is as accurate as a bar chart when the reader needs to compare parts precisely.

Can I put text in the middle?

Not on the canvas, deliberately. Text drawn inside a chart image cannot be copied, translated or read aloud by assistive technology. The total is printed above the chart where it stays real text.

How many slices before it stops working?

The same twelve as the pie, and even that is generous. Between two and six is where the format actually communicates.

Why does my smallest category not appear?

Either it was zero or empty and skipped, or it was folded into "Other" along with the rest of the tail. The note under the chart tells you which.

Does anything get uploaded?

No. The page has no server side at all.

The opposite tool

Need it the other way round? CSV to pie chart One total split into a handful of parts

Related tools

All tools