PlotSet LogoPlotSet

How to Create a Pie Chart

A step by step walkthrough for turning a spreadsheet into a published pie chart in PlotSet, from shaping the sheet and rolling up the long tail to exporting or embedding the finished chart.

约 6 分钟

Swap in your own numbers instead of the sample data the template loads with, and here's how to create a pie chart in PlotSet from a label column, a value column, and a total the slices actually add up to. You will upload the sheet, roll any long tail of small categories into a named group, order the slices so the biggest lands first, and publish something you can embed or hand off as an image.

With a clean two column sheet of five or six categories, this takes about six minutes end to end. Add a few more if your source is a wider report you need to trim down first, or if you are deciding what to do with a dozen tiny categories that do not deserve their own slice.

你需要的数据

Two columns, one row per category: the label first, the number second. The numbers should sum to one meaningful total, and there should be no more than six or seven rows by the time you upload.

示例 CSV
ServiceMonthly Spend ($)
Compute4200
Storage1350
Database980
Networking610
Support340
备注

The value column needs to be a plain number, not a pre-formatted percentage string like "38%". PlotSet calculates the percentage from the raw values, so let it do that math.

If your source report has fifteen or twenty rows, decide the cutoff in the spreadsheet first. Sum everything below it into one row labelled "Other" rather than uploading all of it and grouping later.

One header row only. A totals row at the bottom gets read as its own slice, usually the largest one, and it will swallow the rest of the circle.

Negative numbers and zeros do not have a sensible angle in a pie. Filter zero rows out and rethink the chart type if any value is negative.

操作步骤

PlotSet 中从空白模板到完成图表的具体点击路径。

  1. 01

    Choose the Pie Chart template

    From the PlotSet dashboard, start a new project and choose the Pie Chart template. It loads with sample data already bound to it, so you can see the two column shape it expects before you bring in your own file.

    PlotSet 的模板选择界面:左侧是图表分类列表,中间展开 Bar Charts 分类的模板网格,Bar Chart 模板卡片上显示「Select」按钮。
    每份指南都从这里开始:先选分类,再选模板,不管你要做哪种图表,用的都是同一个网格。
  2. 02

    Shape your sheet into a label and a value column

    Put the category name in the first column and its number in the second, one row per category. If the source is a pivot table or a finance export, strip out subtotal rows before you get near PlotSet.

  3. 03

    Roll the long tail into Other, before uploading

    If you are looking at more than six or seven categories, sum the smallest ones into a single row labelled "Other" in the spreadsheet itself. Doing this before upload keeps your source file honest about what the chart is actually showing.

  4. 04

    Upload your file or connect a sheet

    Use the data panel to import a CSV or .xlsx file, paste rows straight from a spreadsheet, or connect a Google Sheet if the underlying numbers change on a schedule and you want the chart to pick that up.

    PlotSet 编辑器的数据视图:表格中 Name、Value、Region 三列填着加拿大各省的数据,旁边的「Data」面板提供 CSV 上传、「Magic Import」和 Google Sheet 同步。
    这里的数据视图取自一个条形图项目。你可以上传 CSV、用「Magic Import」从图片里提取数字,或同步 Google Sheet,每种图表类型的面板都一样。
  5. 05

    Map the label and value columns

    Confirm which column feeds the slice labels and which feeds the angles. PlotSet usually gets this right when your headers are clear, but check it manually if the sheet has extra columns it might have guessed at.

    PlotSet 数据面板中高亮的列绑定:「Label/time」对应 A 列,「Values」对应 B 列,「Filter/color」对应 C 列,下方是「Auto Binding」按钮。
    绑定决定哪一列作标签、哪一列提供数值、哪一列决定颜色。「Auto Binding」(自动绑定)会根据表头推测,所以要核对一遍,别想当然。
  6. 06

    Sort the slices and turn on percentage labels

    Order slices largest to smallest starting at twelve o'clock, unless the categories carry their own order (age bands, survey scale). Then switch on percentage labels for every slice: angles alone are not precise enough for a reader to compare, the numbers are.

  7. 07

    Set a colour per slice and drop the legend if you can

    Give each slice its own distinct colour rather than shades of one hue, which read as ranked when they are not. With five slices or fewer, label each one directly on the chart and remove the legend entirely: it saves the reader a lookup.

    PlotSet 编辑器停在「Preview」标签页:画布上是做好的 Pie Chart,右侧的设置面板用红框标出。
    Pie Chart 的「Preview」标签页。所有样式设置都在红框标出的这个面板里,每个设置各自占一个标签页:外观、标题、脚注,以及这种图表类型特有的选项。
  8. 08

    Publish, embed or export the finished chart

    Publish for a live, interactive chart with hover tooltips and a shareable link, grab the embed code for a page, or export a PNG, SVG or PDF if you need a static image for a deck.

从已加载示例数据的 Pie Chart 模板开始,再替换成你自己的数据。

打开模板

发布、嵌入或导出

最后一段路对每种图表都一样:「Share」(分享)把图表变成一个在线的公开链接和一段嵌入代码,「Export」(导出)把它输出成静态文件。

Share:公开链接与嵌入代码

打开嵌入代码和公开链接的开关,图表就发布出去了。链接可以放心发给任何人;嵌入代码以 iframe 的形式放进任意页面,悬停提示和交互效果都会保留。之后修改了图表,点「Recreate」就能把改动同步到链接和嵌入代码两边。

PlotSet 编辑器工具栏中高亮的「Share」按钮,紧挨着「Export」按钮。
点「Share」,完成的图表就会变成一个公开链接和一段嵌入代码。
PlotSet 的「Share」对话框:用于启用嵌入代码和公开链接的开关,「Link」「Embed」「Facebook」「Reddit」「Twitter」「LinkedIn」「Email」几个按钮,以及带「Copy」按钮的图表公开链接。
打开嵌入代码和公开链接的开关,然后复制链接或取用 iframe。之后再修改图表,点「Recreate」就能把改动同步给所有已拿到链接的人。

Export:SVG、PNG 或 JPG

「Export」会按你需要的尺寸输出一份静态副本。SVG 放到多大都清晰,还能在设计工具里继续编辑;幻灯片和文档用 PNG 或 JPG 最稳妥。想让图片在高分屏上够锐利,关键就是那个倍数设置。

PlotSet 编辑器工具栏中高亮的「Export」按钮。
要做成幻灯片或报告里的静态文件,就走「Export」这条路。
PlotSet 的「Export chart」对话框:倍数选择器设为 2x,宽高输入框填的是 1000 和 600,展开的格式菜单里列出 SVG、PNG 和 JPG。
SVG 放到多大都清晰,还能在设计工具里继续编辑;做幻灯片用 PNG 或 JPG 最稳妥。导出前先设好倍数,图片在高分屏上才够锐利。

Pie Chart 的样式提示

Label slices directly, skip the legend under six categories

A legend forces the reader to look away from the circle, find a colour, then look back. Direct labels on or beside each slice remove that round trip entirely, and PlotSet fits them cleanly up to about five or six slices.

Start at twelve o'clock, go clockwise, biggest first

This is the reading convention people already know, so use it rather than fighting it. The moment the largest slice starts anywhere else, readers spend a second just orienting themselves before they get to the data.

Name the Other slice in the title or a caption

"Other" on its own tells the reader nothing about what got grouped. A short caption, "Other includes eleven regions under 2% each", turns a vague catch-all into an honest summary.

Keep the palette flat, no gradients or 3D shading

A gradient or a tilted 3D slice implies an extra dimension of meaning that is not there, and it distorts the angle a flat pie relies on to be read correctly. One flat colour per slice is the whole job.

制作 Pie Chart 时的常见错误

The slices do not add up to a sensible whole

This usually means a filter or a date range excluded some rows before upload, so the circle claims completeness it does not have. Check the raw row count in PlotSet's data table against your source sheet and reconcile the difference before publishing.

Colours jump around every time you resort

If colour is assigned by row position rather than by category name, resorting the slices reshuffles the palette too. Assign colours to the category labels themselves in the style panel, not to whatever sits in row three at the time.

Too many thin, unlabeled slivers around the edge

A raw export with twenty countries or product SKUs produces a dozen slices too thin to carry a label. Go back to the spreadsheet, not the chart settings, and collapse everything under your cutoff into one Other row.

深入了解 Pie Chart

不确定 Pie Chart 是否是正确选择?查看它是什么、何时使用以及何时不使用。

关于 Pie Chart

Pie Chart:常见问题

Two columns and one header row: a category label in the first column, one plain number per category in the second. CSV and .xlsx both work, and the numbers should be raw values, not pre-formatted percentages, since PlotSet calculates the share itself.

现在制作你的 Pie Chart

免费开始,300+ 模板任选。无需信用卡。