AI Assistant
Help Center AI Assistant is now available
Got questions about Lark? Use our AI chat to find the answers.
00:00
Click and hold to drag
Got It
Try Now
Use line charts in Sheets

Use line charts in Sheets

4 min read
I. Intro
🔖
Platform requirement: These steps can only be performed on the desktop app or web version. The mobile app supports viewing of charts only.
Line charts are a type of chart formed by connecting data points with lines, which can be used to show changes over time. In the line chart, category data is plotted along the x-axis, and series data is plotted along the y-axis. For example, in a chart showing population growth, the dates will go on the x-axis and the population size will go on the y-axis.
II. Steps
Insert a line chart
Open the spreadsheet, click Insert from the toolbar, and select Chart. In the chart editor pane that pops up on the right, select a line chart.
Types of line chart:
  • Line chart: Suitable for large amounts of data and relatively stable changes, such as temperature change.
250px|700px|reset
  • Smooth line chart: Suitable for scenarios where data accuracy is not high, short-term fluctuations can be ignored, and the overall trend is emphasized, such as changes in product demand.
250px|700px|reset
  • Step line chart: Suitable for scenarios where data changes dramatically and irregularly, and it is necessary to show sudden changes at specific points in time, such as abnormal fluctuations caused by big events.
250px|700px|reset
Set the theme color and chart options
In Setup > Themes, select the theme color for the chart.
In Setup > Options, select whether the title, legend, data labels, axis, and gridline should be displayed.
250px|700px|reset
Select the data range
In Setup > Range, click the Grid icon, and enter the data range in the pop-up window, or select it on the sheet. Click Add another range to add more data ranges as needed.
In the data range, the text or date data in the first row or column will be used as the chart's x-axis (category) and y-axis (series). The data in other rows or columns are the values of the chart, and the data type must be numeric. For example, in the images below, the date in the first row is plotted on the x-axis, and the sales volume is plotted on the y-axis.
Note: The chart will automatically determine the x- and y-axis based on the number of rows and columns in the data range. You can click Switch rows/columns to adjust as needed.
250px|700px|reset
250px|700px|reset
Add horizontal and vertical axes
Click Setup, then click the fields under X-axis (category) or Y-axis (series) to select the x-axis and y-axis labels. You can also click the Grid icon to customize the name and data range of the x-axis and y-axis. If you want to use the chart to show change over time, you can set the row or column with the time to date format, and the date will be plotted on the x-axis. For more details, see Edit the x- and y-axis of charts.
250px|700px|reset
250px|700px|reset
You can also perform summary calculations on data of the same category. Under X-axis (category), select Aggregate, and the data of the same category in the chart will be aggregated. You can also select summary calculation methods such as average, sum, count, max, min, and median under Y-axis (series).
250px|700px|reset
If you want to display the data of the x-axis on the y-axis, or display the data of the y-axis on the x-axis, you can click Switch rows/columns to switch the x-axis and y-axis.
250px|700px|reset
Configure more settings
In Setup > More settings, you can set how empty cells in the data range are displayed. For example, you can set empty cells to appear as 0.
If the source data is not displayed because it is hidden or filtered, you can select Show hidden and filtered Data to display the data in the chart.
250px|700px|reset
250px|700px|reset
Customize chart style
Click the Customize tab to set the background and font, the chart title and subtitle, the style of different series, the text format of the axes and legend, and the gridline style. For more details, see Edit the x- and y-axis of charts.
250px|700px|reset
Other actions
  • Paste the chart into a document: You can paste the chart into the document and keep the link with the source spreadsheet, which syncs updates in real-time. For more details, see Paste Sheets charts into a document.
  • Move and resize: Select the chart and drag to move it. You can also hover over the edge of the chart and drag to adjust its size.
  • Copy, delete or download: Select the chart and click the Chart icon in the upper-right corner to edit, copy, delete, or download the chart as an image.
250px|700px|reset
III. FAQs
Can the x-axis (horizontal axis) of the line chart be automatically sorted?
No. The order of the data on the x-axis follows the sort order of the data in the spreadsheet. For example, in the following image, the order of the x-axis of the chart is the same as the order of column A in the spreadsheet.
250px|700px|reset
To sort the data, you can select the data range in the spreadsheet, right-click, and select Sort. Select a sort option and the chart will be updated.
250px|700px|reset
Written by: Lark Help Center
Updated on 2024-12-09
How satisfied are you with this content?
Thank you for your feedback!
Need more help? Please contact Support.
0
rangeDom
rangeDom