How To Insert Line Graph In Excel

In this article, I will tell you how to insert a line graph in excel step by step. The line graph is based on a sales report table. It will also tell you how to change the line chart data range, trendline, color, and axis type.

1. Create The Sales Report Table.

1.1 Create Sales Report Table Title.

  1. The first thing is to create a sales report table and input or import the sales data.
  2. Open a worksheet, and select cells range A1:D1.
  3. Right-click the above cells range A1:D1, then click Format Cells… menu item in the popup menu list.
  4. Click the Alignment tab in the popup Format Cells dialog window.
  5. Check the checkbox Merge cells to merge the 4 cells.
  6. Click the Font tab, select Bold in the Font style list, and select the text color (yellow) from the Color drop-down list.
  7. Click the Fill tab, and select the color green to fill the cell range background.
  8. Click the OK button to save the cells’ formatting.
  9. Input the text Mobile Phone Sales Report in the merged cells.

1.2 Create The Sales Report Data Table.

  1. Input the category title Apple in cell B2, Android in cell C2, and Windows in cell D2.
  2. Input the text 2022-1 in cell A3, click the Home tab, and select the item Short Date from the Number Format drop-down list in the Number group.
  3. Click the small square at the bottom right corner of cell A3 and drag the mouse pointer down to cell A14.
  4. Then it will insert the year-month value in the next 11 cells automatically.
  5. Now input the mobile phone sales data for Apple, Android, and Windows as below table.

2. How To Insert Line Graph In Excel Based On The Above Table Data.

2.1 How To Create The Line Chart.

  1. Select the cell range A2:D14.
  2. Click the Insert tab —> Insert Line or Area Chart icon in the Charts group.
  3. Then you can click the Line button in the 2-D Line section to create the below line chart.
  4. You may wonder how can I add the marker, data label, and data table in the above chart, I will tell you how to do it later in this article.
  5. There are 6 2-D line charts and 1 3-D line chart in the menu list, you can try to select them to see the results.

 2.2 How To Change The Chart Data Range.

  1. Click to select the line chart, then it will display a Chart Design tab on excel top menu bar.
  2. Click the Chart Design tab, then click the Select Data icon in the Data group.
  3. Then it will pop up the Select Data Source dialog window.
  4. There are 2 lists in the dialog.
  5. The left list is the Legend Entries(Series) which contain the legend items in the line chart.
  6. And the right list is the Horizontal(Category) Axis Labels which contain category items that will be shown on the horizontal axis.
  7. You can check or uncheck the checkboxes before the list items to show or hide them from the line chart.
  8. In the Legend Entries(Series) list, there are 3 buttons which are Add, Edit, and Remove.
  9. You can click the button to add, edit, or remove the legend entries.
  10. You can also click the Switch Row/Column button to switch the Legend Entries(Series) and the Horizontal(Category) Axis Labels list items.

2.3 How To Add Trendline In Line Chart.

  1. Click to select a line in the line chart.
  2. Then click the plus icon ( + ) on the top right corner of the chart.
  3. It will show the Chart Elements menu list.
  4. Click the arrow after the Trendline item in the menu list.
  5. Then select one trendline type such as Linear Forecast.
  6. If you find the trendline types are not enough, you can click the More Options… item to open the Format Trendline pane in Excel right side.
  7. Click the Trendline Options item ( the third item ) in the pane.
  8. Then you can configure the trendline type and other options.

2.4 How To Change The Line & Markers Color In Line Chart.

  1. Right-click a line in the line chart.
  2. Click the item Format Data Series… in the pop-up menu list to open the Format Data Series pane on the Excel right side.
  3. Click the Fill & Line icon in the Series Options section.
  4. Click the Line icon to show the Line options.
  5. Then you can change the line color by selecting the color from the Outline color drop-down list.
  6. Click the Marker icon to show the Marker options.
  7. Click the Fill item to expand it, and then you can select the Marker‘s color from the Fill Color drop-down list.

2.5 How To Change Line Chart Axis Type.

  1. Right-click the Horizontal(Category) Axis in the line chart.
  2. Click the Format Axis… item in the popup menu list.
  3. It will open the Format Axis pane on excel’s right side.
  4. Click the Axis Options icon ( the fourth icon ), then you can change the Axis Type by selecting the related radio button.
  5. There are 3 axis types, Text axis, Date axis, and Automatically select based on data.

2.6 How To Add Data Label To Line Chart Marker.

  1. Select the line chart, then click the plus icon ( + ) on the top right corner of the chart.
  2. Then click the arrow after the Data Labels item and then select the data label position on the chart marker.
  3. Make sure the checkbox before the Data Labels item is checked, then you can see the data number value for each marker in the line chart.

2.7 How To Add Data Table To Line Chart.

  1. Select the line chart, then click the plus icon ( + ) on the top right corner of the chart.
  2. Check the checkbox before the Data Table item.

Leave a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.