Create and Format a Line Graph in Excel in 5 Steps

When you just need a line, there are simple tips to use

Line graphs are a great way to visualize data in Excel.

In Microsoft Excel, adding a line graph to a sheet or workbook creates a visual representation of the data. In some instances, that picture of the data could reveal trends and changes that might otherwise go unnoticed when the data is buried in rows and columns. 

Making a Line Graph - The Short Version

Creating line graphs in Excel is as easy as clicking a few buttons.

The steps to adding a basic line graph or line chart to an Excel worksheet are:

  1. Enter the data you want to graph.
  2. Highlight that data, including row and column headings.
  3. Click on the Insert tab of the ribbon.
  4. In the Charts section of the ribbon, click on the Insert Line Chart icon to open the drop-down list of available chart/graph types.
  5. Hover your mouse pointer over a chart type to read a description of the chart/graph.
  6. Click on the desired graph.

These steps will add a simple, unformatted graph – one that displays only the lines representing the selected series of data, a default chart title, a legend, and axes values – will be added to the current worksheet.

Version Differences

The steps in this tutorial use the formatting and layout options available in Excel 2013. These differ from those found in early versions of the program. Use the following links for line graph tutorials for other versions of Excel.

Excel, like all of Microsoft Office programs, uses themes to set the look of its documents. Your worksheet will look different from the examples in this article, but that will not affect the overall functionality of the spreadsheet.

 

Making a Line Graph - The Long Version

To begin creating a line graph, enter the data into your Excel spreadsheet.
  1. Enter the data in cells A1 to C6 as shown in the image above.
  2. Once entered, highlight the range of cells from A2 to C6.

Even if you select the title at the top of the data table, you still need to add the title to the graph manually.

Creating the Basic Line Graph

The following steps will create a basic line graph that displays the selected data series and axes. You can then use formatting tools to design the graph to your liking.

  1. Click the Insert tab of the ribbon.
  2. In the Charts section of the ribbon menu, click the Insert Line Chart icon to open the drop-down list of available graph/chart types.
  3. Hover your mouse pointer over a graph type to read a description of the graph.
  4. Click the 2-D line graph icon in the list to select it.
  5. A basic line graph is created and placed on your worksheet as shown below.

Formatting the Basic Line Graph: Adding the Chart Title

Change the title of your line graph in Excel.

Next, you can edit the chart title from the default.

  1. Click once on the default chart title to select it – a box should appear around the words Chart Title.
  2. Click a second time to put Excel in edit mode, which places the cursor inside the title box.
  3. Delete the default text using the Delete or Backspace keys on the keyboard.
  4. Enter the chart title – Average Precipitation (mm) – into the title box.

Avoid Clicking on the Wrong Part of the Chart

There are many different parts to a chart in Excel – such as the chart title and labels, the plot area that contains the lines representing the selected data, the horizontal and vertical axes, and the horizontal gridlines.

All of these parts are considered separate objects by the program, so that you can format them separately. You tell Excel which part of the graph you want to format by clicking on it with the mouse pointer to select it.

If your graph doesn't look like those pictured in this article, it is likely that you did not have the right part of the chart selected when you applied the formatting option.

The most common mistake is clicking on the plot area in the center of the graph when the intention is to select the entire chart.

The easiest way to select the entire graph is to click in the top left or right corner away from the chart title.

If you make a mistake, it can be quickly corrected using Excel's undo feature. Then, click the correct part of the chart and try again.

Changing the Graph's Colors Using The Chart Tools Tabs

Use the formatting tools in Excel to change the colors on your line graph.

When you create a chart or graph in Excel or click on an existing graph, two tabs are added to the ribbon as shown in the image above.

These Chart Tools tabs – Design and Format – contain formatting and layout options specifically for charts, and you can use them to change the background and text color of the graph.

Changing the Graph's Background Color

For this graph, formatting the background is a two-step process because a gradient is added to show slight changes in color horizontally across the graph.

  1. Click next to the chart title to select the entire graph.
  2. Click the Format tab of the ribbon.
  3. Click the Shape Fill option, identified in the image above, to open the Fill Colors drop-down panel.
  4. Choose Black, Text 1, Lighter 35% from the Theme Colors section of the list. (Hover over the palette colors to see the description.)
  5. Click the Shape Fill option a second time to open the Colors drop-down menu.
  6. Hover the mouse pointer over the Gradient option near the bottom of the list to open the Gradient panel.
  7. In the Dark Variations section of the panel, click the Linear left option to add a gradient that gets progressively darker from left to right across the graph.

Changing the Text Color

Now that the background is black, the default black text is no longer visible. This next section changes the color of all text in the graph to white

  1. Click on the background to select the entire graph.
  2. Click the Format tab of the ribbon if necessary.
  3. Click the Text Fill option to open the Text Colors drop-down list.
  4. Choose White, Background 1 from the Theme Colors section of the list.
  5. All the text in the title, x- and y-axes, and legend should change to white.

Changing the Line Colors: Formatting in The Task Pane

Use the formatting task pane to change the color of your line graph.

The last two steps of the tutorial make use of the formatting task pane, which contains most of the formatting options available for charts.

In Excel 2013, when activated, the pane appears on the right-hand side of the Excel screen as shown in the image above. The heading and options in the pane change depending upon the area of the chart that is selected.

Changing the Line Color for Acapulco

  1. In the graph, click once on the orange line for Acapulco to select it – small highlights should appear along the length of the line.
  2. Click on the Format tab of the ribbon if necessary.
  3. On the far left side of the ribbon, click on the Format Selection option to open the Formatting Task pane.
  4. Since the line for Acapulco was previously selected, the title in the pane should read Format Data Series.
  5. In the pane, click on the Fill icon (the paint can) to open the Line options list.
  6. In the list of options, click on the Fill icon next to the label Color to open the Line Colors drop-down list.
  7. Choose Green, Accent 6, Lighter 40% from the Theme Colors section of the list – the line for Acapulco should change to a light green color.

Changing Amsterdam

  1. In the graph, click once on the blue line for Amsterdam to select it.
  2. In the Formatting task pane, the color of the current Fill displayed beneath the icon should change from green to blue showing that the pane is now displaying options for Amsterdam.
  3. Click on the Fill icon to open the Line Colors drop-down list.
  4. Choose Blue, Accent 1, Lighter 40% from the Theme Colors section of the list – the line for Amsterdam should change to a light blue color.

Fading Out the Gridlines

Finally, you can also change the formatting of the gridlines that run horizontally across the graph.

The basic line graph includes these gridlines to make it easier to read the values for specific points on the data lines.

They do not, however, need to be quite so prominently displayed. One easy way to tone them down is to adjust their transparency using the Formatting Task pane.

By default, their transparency level is 0%, but by increasing that, the gridlines will fade into the background where they belong.

  1. Click on the Format Selection option on the Format tab of the ribbon if necessary to open the Formatting Task pane.
  2. In the graph, click once on the 150 mm gridline running through the middle of the graph – all the gridlines should be highlighted (blue dots at the end of each gridline).
  3. In the pane change the transparency level to 75% – the gridlines on the graph should fade significantly.