PlotSet LogoPlotSet

How to Create a Line Chart

A step by step walkthrough for turning a spreadsheet of dates and numbers into a published line chart in PlotSet, from shaping the sheet to exporting or embedding the finished trend.

约 8 分钟

This is how to create a line chart in PlotSet that actually reads as a trend and not just a wiggly shape: your own dates in the first column, one or more series after it, styled and published the same way any real chart goes out. By the end you will have taken one time series from a raw spreadsheet to a published, embeddable chart with hover tooltips, not a copy of someone else's example with your numbers swapped in.

If your sheet already has one date column and one or two number columns in order, this takes about eight minutes. Add another five if you are converting a wide report, one column per month, into the long, one-row-per-period shape a line chart wants, or if you need to decide how a genuine gap in the series should be handled before you upload.

你需要的数据

One row per time period, already in chronological order: the date or period label first, then one numeric column for each line you want on the chart.

示例 CSV
QuarterNorth AmericaEuropeAPAC
2023-Q118200014600098000
2023-Q2191000151000104000
2023-Q3205000158000112000
2023-Q4224000167000121000
2024-Q1218000171000129000
2024-Q2233000179000138000
备注

Keep the time column consistent: real dates, or a fixed label pattern like "2024-Q1" throughout. A column that mixes "Q1 2024" with "01/2024" sorts as text, not as time, and the axis will follow whatever order the rows happen to be in.

One numeric column per line. Three columns of regional revenue, like the sample above, become three lines with no extra configuration once they are mapped.

Rows must already be sorted oldest to newest before you upload. PlotSet draws the time axis in row order, it does not resort a date column for you.

Leave a cell blank for a period a series genuinely has no reading for. A blank draws as a gap in that one line rather than dropping to zero, which is usually what you want; fill it in if it is simply a missing entry, not an absence.

操作步骤

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

  1. 01

    Open the Line Chart template

    From the PlotSet dashboard, start a new project and choose the Line Chart template. It loads with sample data already bound to it, so you can see the exact column layout, one date column followed by one or more series columns, before you touch your own file.

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

    Shape your sheet into a time column plus series columns

    Put your date or period in the first column, in order, and one number column per line after it. If your source is a wide report with a column per month, transpose it first: the upload needs one row per period, not one column per period.

  3. 03

    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 you want the chart to pick up new periods later without a re-upload. PlotSet reads the first row as your column headers.

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

    Map the time column and confirm your series

    Tell PlotSet which column is the time axis and check that every numeric column you meant to plot is picked up as a series. This is usually automatic with clean headers, but worth a manual check if your sheet carries an extra column, like a running total, you don't want plotted.

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

    Label the lines directly, skip the legend

    Turn on end-of-line labels so each series name sits at the end of its own line instead of in a separate legend box. On anything with more than one line, this removes the colour-matching step entirely and is the single biggest readability change you can make.

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

    Set the value axis range on purpose

    Decide whether the axis should start at zero or zoom into the range where the real movement happens. A line chart does not need a zero baseline the way a bar chart does, so pick a range that reflects the actual variation and say so if you are deliberately zooming in.

  7. 07

    Turn markers and gridlines on only if the data is sparse

    With monthly or quarterly data, individual point markers and background gridlines usually just add clutter to a shape that is already clear. Turn markers on only if readings are infrequent enough that each one is worth calling out on its own.

  8. 08

    Publish, embed or export

    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 or report.

从已加载示例数据的 Line 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 最稳妥。导出前先设好倍数,图片在高分屏上才够锐利。

Line Chart 的样式提示

Direct labels beat a legend almost every time

Once you have more than one line, a legend forces the reader to match colours between a box and the chart. A label at the end of each line answers the question before it gets asked, and it scales fine down to about five series.

Cap it at five lines, then split or highlight

Past roughly five series a line chart turns into a tangle nobody can trace. If you genuinely have more, either build small multiples, one line per small chart on shared axes, or colour the one line that matters and grey out the rest.

Do not mix units on one axis

Revenue in dollars and a percentage plotted on the same vertical scale will squash one of them flat. If you need to compare series in different units, index them to a common starting point (100 at the first period, for instance) or put them on separate charts.

Break the line over real gaps, do not smooth across them

If a series is missing a reading for one period, leave that cell blank so PlotSet breaks the line rather than drawing a straight guess across the gap. Curve smoothing is worth avoiding for the same reason: it can invent a peak or a dip between two points that were never actually measured.

制作 Line Chart 时的常见错误

The line zigzags instead of trending smoothly

This almost always means the source rows are not sorted chronologically before upload, so PlotSet is drawing the axis in whatever order the sheet happened to have. Sort the time column oldest to newest in your spreadsheet and re-upload.

One line sits flat along the bottom while another dominates the chart

Check whether the two series are actually in the same unit. A series in the thousands plotted against one in single digits, or dollars against a percentage, will always compress the smaller one to a flat line near zero. Normalise both to a common scale or split them into separate charts.

A period with no real reading shows as a straight diagonal jump

That happens when the missing cell was filled with a zero or an average instead of left blank. Clear the cell in the source sheet so it is genuinely empty, then re-upload: PlotSet will break the line there instead of drawing a fake slope across it.

深入了解 Line Chart

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

关于 Line Chart

Line Chart:常见问题

One row per time period, sorted oldest to newest, with the date or period label in the first column and one numeric column for each line you want. CSV, .xlsx and a pasted spreadsheet range all work, as long as the time column stays in one consistent format.

现在制作你的 Line Chart

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