[Beginners Guide] Create a Line Chart in Excel from Scratch


A line chart in Excel can be used for comparative analysis between multiple variables and for a visual representation of complex tabular data.

Also read: How to create a pie chart in Excel?

Steps to create a line chart in Excel

This article is a step-by-step tutorial on creating line charts in Excel for tabular data. Let’s get started with this beginner’s guide!

1. Prepare a data set

To begin creating a line chart, you first need tabular data. Let us take an example of tabular data below to learn to create line graphs.

Sample Database
Sample Database

We have a tabular dataset showing the number of trivia contest participation of 5 years under 3 different topics.

Note- Do not give any heading to the column with years in order to avoid getting an uncertain X-axis for the line graph.

2. Set up the line chart in Excel

Let us proceed to create a line graph of this data to understand the behavior visually. Here is how.

Selected Table
Selected Table
  • Select the entire tabular data set.
  • Go to the Insert tab.
  • Click on the Line or Area Chart icon.
  • Select the first option under 2D Line as it is relevant for this data here.
Line Graph Option
Line Graph Option

You can now find that a line chart has been created for your tabular database by Excel, like this.

Auto-generated Line Chart
Auto-generated Line Chart

We have renamed the chart title to Trivia Contest Participations to understand what information the chart delivers.

Customizing a line chart

Line charts are completely customizable in Excel. Let us begin customizing a line graph.

1. Viewing or hiding Chart Elements

To view or hide a particular chart element-

  • Select anywhere on the chart.
  • Click on the plus icon (Chart Elements) at the top right.
  • Check the elements you want to view and uncheck the ones you want to hide.
Chart Elements
Chart Elements

2. Changing legend color

To change the color of indicators or legends of the chart-

  • Double-click the legend you want to change the color for.
  • A window opens on the right called Format Legend Entry.
  • Select paint bucket icon known as Fill & Line.
  • Scroll down to Border heading.
  • Choose the color you want for that legend in Color.
Legend Color
Legend Color

Also read: 9 ways to edit legends in Excel

3. Changing style and color of the chart

To change the style and color of a line chart in Excel:

  • Click anywhere on the chart.
  • Click on the paintbrush icon to choose the style you like under the Style tab and color under the Color tab.
Chart Styles & Color
Chart Styles & Color

This is how our newly styled line graph looks like now.

Customized Line Graph
Customized Line Graph

4. Applying Chart Filters

You can choose to view or hide a particular column, row, or value of the table in the line chart. This is possible by applying Chart Filters to a chart, like this-

  • Click anywhere on the chart.
  • Click on the filter icon on the top right of the chart area.
  • To view or hide one or more legends, check the ones you want to view and uncheck the ones you want to hide.
  • To view or hide one or more axes, check the ones you want to view and uncheck the ones you want to hide.
  • Hit Apply once you’re done.
Chart Filters
Chart Filters

5. Moving a chart to a different location

In Excel, you can move your charts to a different location such as moving your chart from one sheet to another. Here is how you can move a chart.

Move Chart Window
Move Chart Window
  • Click on the chart.
  • Go to the Design Tab from the top menu bar
  • Under Location, press Move Chart.
  • A new window opens named Move Chart.
  • You can either choose to create a new sheet and move your chart to the new the sheet or select an exisiting sheet to move your chart to.
  • Press OK to move your chart.


This was all about creating, customizing, and organizing data in a line chart in Excel. Follow this step-by-step guide to be able to create a perfect line graph from scratch. If you have any doubts about line graphs in Excel, drop a comment below, and we will get back to you with an answer!