折線圖
折線圖把資料點依序連成線,通常是依時間排列,讓人一眼看出數值的起伏。同一張圖放多條線,就能比較不同數列的走勢,是呈現「隨時間變化」最常用的圖表。
makechart.io 是免費的線上做圖工具:貼上表格或上傳 CSV / Excel 檔,對應好 X 軸與數值欄位,在「樣式」面板調整線條、資料點與座標軸,就能下載 SVG、PNG 或分享連結,快速完成資料視覺化。
設定資料
貼上、上傳資料,或用範例資料開始製作這張圖表。
資料格式
每一列是 X 軸上的一個點,例如某一年或某個月,依照想畫的順序排列。每一個數值欄位會畫成一條線。X 軸欄位若是數字,會依數值大小定位;若是文字,則照表格的列順序排列。
| 欄位 | 型態 |
|---|
x axis必填 | 順序(數字或文字) 橫軸上的位置,例如年份、月份或步驟。文字標籤會保留表格中的列順序。 |
y axis必填 | 數值(可一或多欄) 每條線的數值。對應多個欄位,就會在同一張圖上畫出多條線。 |
範例
| 年份 | 台北 | 台中 | 高雄 |
|---|
| 2020 | 23.6 | 23.9 | 25.8 |
| 2021 | 23.9 | 24.1 | 26.0 |
| 2022 | 23.4 | 23.8 | 25.7 |
| 2023 | 24.2 | 24.5 | 26.3 |
適合的使用時機
- 呈現隨時間變化的趨勢,例如每月營收、氣溫或網站流量。
- 比較幾組數列在同一段期間內的變化。
- X 軸上的資料點很多,用長條會太擁擠的時候。
- 想讓讀者看出高峰、低谷與轉折,而不是精確數字。
不適合的情況
- 類別之間沒有先後順序,例如產品或國家,這時長條圖比較清楚。
- 同一張圖超過八條左右的線:線會糾纏在一起,建議只強調幾條,或拆成多張圖。
- 想呈現總量由哪些部分組成,改用堆積面積圖或堆積柱狀圖比較合適。
使用技巧
- 在「樣式」面板把 line 的 mode 改成 curve 會變成平滑曲線;關掉 dot 的 show 可以隱藏資料點。
- 把 mode 改成 area、bump 或 streamgraph,同一份資料就能變成面積圖、凹凸圖或河流圖。
相關圖表
Line Chart
A line chart connects data points in order, usually over time, so the eye follows how values rise and fall. Several lines on the same axes make it easy to compare trends between series, which is why it is the go-to way to create a graph of anything measured repeatedly.
makechart.io is a free online chart maker for this kind of data visualization: paste a table or upload a CSV / Excel file, bind the x axis and the value columns, tune line style, dots and axes in the Style panel, then download SVG / PNG or share a link.
Set up data
Paste, upload or pick sample data to make this chart.
Data format
One row per point on the x axis, such as a year or a month, in the order you want them drawn. Each numeric column becomes one line. If the x axis column holds numbers, points are placed by their value; otherwise rows are drawn in table order.
| Field | Type |
|---|
x axisrequired | Order (number or text) Position along the horizontal axis, such as year, month or step. Text labels keep the row order of your table. |
y axisrequired | Number (one or more columns) Values of each line. Bind several columns to draw several lines on the same chart. |
Example
| year | Taipei | Taichung | Kaohsiung |
|---|
| 2020 | 23.6 | 23.9 | 25.8 |
| 2021 | 23.9 | 24.1 | 26.0 |
| 2022 | 23.4 | 23.8 | 25.7 |
| 2023 | 24.2 | 24.5 | 26.3 |
When to use
- Showing a trend over time, such as monthly revenue, temperature or website traffic.
- Comparing how a few series change over the same period.
- Data with many points along the x axis, where bars would be too crowded.
- Spotting peaks, dips and turning points rather than exact values.
When not to use
- Categories with no natural order, such as products or countries; a bar chart is clearer.
- More than about eight lines on one chart; the lines tangle. Highlight a few or split them into separate charts.
- Showing how a total is made up of parts; use a stacked area or stacked column chart instead.
Tips
- In the Style panel, set line mode to curve for smooth lines, or turn off dot show to hide the data points.
- Change mode to area, bump or streamgraph to turn the same data into an area chart, a bump chart or a streamgraph.
Related charts