About Pie Chart Generator
This pie chart generator uses Apache ECharts to render CSV data as pie and donut charts locally in your browser. The first row is a header; each following row is "Category,Value", and edits redraw immediately. You can set a title, toggle the donut style, and export PNG (2× pixels) or SVG. It accepts CSV only and does not parse JSON. Colors, legend position (bottom) and label styling are fixed — there are no per-item customization controls. Labels always show the category name, while values and percentages appear in the hover tooltip; exported images do not include tooltips, so convert values to percentages beforehand if the image itself must show them. Slices keep the input order, so sort the CSV descending if that is what you need. Keep to 6–7 categories: slice angles are harder to compare than lengths, and beyond that readers only see the largest slice, so merge the tail or switch to a bar chart. Negative, non-numeric and all-zero data are excluded with a message (nothing is drawn when the total is zero), because ECharts renders all-zero data as equal slices and flattens negatives to zero area — both look perfectly normal while showing something other than your data.
How It Works Internally
A pie maps values onto slice angles, and human discrimination of angle is weaker than of length, so comparisons break down as categories multiply. Keep it to six categories or fewer, sort descending and label the percentages; beyond that, switch to a horizontal bar chart, or readers can only see which slice is largest.
Twelve categories of shareThe angles are no longer comparable and only the largest is readable — use a sorted bar chart or merge the tailMeasured on This Page
| Geometry matches | 40/30/20/10 measured .403/.302/.200/.095 and 60/40 measured .602/.398 — slice angles follow the values |
|---|---|
| Zero value | In A50/B0/C50 the zero slice has essentially no area (.002 is anti-aliasing), not an equal share |
| Fixed: negative | Old build drew negatives as zero-area slices with no error (data silently vanished); now excluded with a row count in the message |
| Fixed: all zero | ECharts renders all-zero data as equal slices (0/0/0 became three equal sectors); now an error and no sectors |
| Fixed: non-numeric | abc used to become 0; now excluded with a message naming the rows |
| Header only | Reports that at least one valid row is needed and draws nothing |
For a pie chart, correctness is not whether something was drawn: all-zero data renders as equal slices in ECharts and negatives are flattened to zero area — both look perfectly normal while showing something other than the user's data. All three dirty-data classes are now excluded with an explicit message. Note that CSV quoting is not supported: "A,B",50 is split on the comma, the value becomes "B" and the row is reported as non-numeric, so avoid commas in category names.
How to Use
- Open "Pie Chart Generator"
- Paste "Category,Value" CSV on the left
- Set the title and toggle the donut style
- The slices update live in the preview
- Download as PNG or SVG
Use Cases
- Budget allocation — Visualize budget amounts by department or project as pie charts to intuitively show fund allocation proportions.
- Market share analysis — Plot brand market share data as pie charts to compare competitive landscape and market distribution.
- Demographics — Render age group or gender population data as pie charts to show population structure composition.
- Spending breakdown — Plot personal or corporate expenses by category as pie charts to analyze spending structure and proportions.
- Voting results — Visualize vote counts for each option as pie charts to clearly show support rate proportions.
- Traffic source mix — Draw website traffic by channel (organic, direct, referral, social) as a donut chart and hover to read each channel's value and share.
FAQ
What is the difference between pie and donut charts?
A pie chart is a solid circle; a donut chart has a hollow centre. Toggle the donut button at the top to switch; the inner radius is fixed at 45%–70% and there is no numeric radius input here.
Can it show percentages?
Not as a direct choice. Labels always show the category name; hovering over a slice shows "Category: value (percentage)". Exported images carry no tooltip, so convert values to percentages first if the percentage must be visible in the image.
Can sector colors be customized?
No. The palette is fixed, the legend sits at the bottom and label font size is fixed; this tool exposes no per-sector colors, legend position or font-size settings.
What if I have too many categories?
Beyond about seven or eight sectors the chart becomes hard to read; fold the smallest shares into an "Other" slice and rely on the legend and tooltip for detail.
Is a pie chart good for comparing sizes?
Not really. Pie charts emphasize proportion, and people judge length far better than angle or area; for strict magnitude comparison use a bar chart instead.
What data formats are supported?
CSV only: a header row, then "Category,Value" per line separated by commas. Quoted commas are not supported ("A,B",50 is split incorrectly), and JSON is not parsed.
Is my data uploaded?
No. Everything renders locally via ECharts and is never sent to a server, safe for unreleased financial or operations composition data.
Too many categories make the pie chart unreadable?
Pie charts top out around 6–7 slices. Merge small shares into "Other" or switch to a sorted horizontal bar chart. This tool keeps input order, so sort the CSV descending first; when shares are close, humans cannot compare slice angles and bars win.