A pie chart is the easiest chart to fake and the easiest to get subtly wrong. The fake version: render to a 500×500 canvas, call toDataURL(), stuff the result into the SVG as <image xlink:href="data:image/png;base64,…">. The file is named .svg, it opens, and it is a bitmap that turns to mush the moment someone enlarges it or tries to recolour a slice.
The real version is three lines of trigonometry per slice, and that is what this page does.
How a pie slice becomes a path
Each slice is one <path> with an arc command. Take the centre point, walk the radius out at the slice's start angle, sweep along the circle to the end angle, and close the shape back through the centre:
Two details decide whether the output looks right. largeArc must flip to 1 once the slice passes 180°, otherwise the renderer takes the short way round and the big slice swallows its neighbours. And a slice of an exact full turn cannot be expressed as a single arc at all — start and end points coincide, so it becomes two half-turn arcs. Both cases are handled for you; a 100% pie is the test that catches most home-made exporters.
The donut option is the same geometry with the centre replaced by an inner arc drawn in reverse, which leaves the hole transparent instead of painting it white. Slice labels sit at (R + innerR) / 2 along the mid angle — half the thickness of the ring, which is where the eye expects them.
What the export actually contains
A four-slice chart with a title and a legend comes out as one <svg> with a viewBox, a title <text>, one <path> per slice, one <path> for the legend swatches, and <text> for each label. Coordinates are rounded to two decimals and trailing zeros are dropped: enough precision that the arcs look smooth at A2 print size, and no more, because path data is the bulk of the file.
Measured on this page's default chart: 3,204 bytes in total, 22 nodes, 13 of them text, and only 190 bytes of arc geometry. The same chart rasterised at 2× for comparison is 74,116 bytes — the preview panel prints both numbers live, so the figure you see is your data, not a claim from a blog post.

Percentages are recomputed, never typed
You enter raw values — units sold, budget in thousands, survey counts — and the tool divides by the sum. That is deliberate: typing percentages invites a chart whose slices add up to 97% or 104%, which is the single most common error in hand-built decks. The legend prints the computed percentage next to each value so the two can be checked against each other.
Choosing between pie, donut and bar
A pie answers "what share of the whole" for a handful of categories. A donut answers the same question and buys you a hole for a headline number. Neither is good at comparing similar values — two slices at 23% and 25% are indistinguishable by angle, while the same numbers as bars differ by a visible step. If the reader's question is "which is bigger", use the bar chart view instead; if the question is "does this look like a healthy split", a pie is the right shape.
Where the SVG goes next
Because the output is markup rather than a bitmap, it survives the rest of the pipeline: paste it into a SVG editor to move the legend, run it through the optimizer before shipping, or hand it to SVG to Code if the chart has to become a React component. For colour decisions made before drawing, start from the palette generator.
Frequently asked questions
Does this export a real SVG or a picture inside an SVG?
A real one: circular arcs written as <path> elements. Nothing is drawn to a canvas and wrapped in an <image>.
Why does a 100% slice become two arcs?
An arc whose start and end points coincide has nothing to draw. A full turn is emitted as two 180° arcs instead.
Can I keep editing the file afterwards?
Yes — fills are plain hex attributes and labels are ordinary text nodes, so both are editable in any editor that reads SVG.
How many slices is too many?
Past six the narrow slices stop being readable. Group the tail into Other, or switch to bars.
Is anything uploaded?
No. Geometry, preview and export all run in the tab; the page makes no request after the document loads.