Microsoft Excel helps users create meaningful charts to visualize their spreadsheet data by automatically inferring some of the chart elements. Legend names are automatically created from the contents of the cell above the row or column of data being used for the chart. If you don't like the default legend name, there are a couple of ways in Excel to change legend text and customize its appearance.
Showing Excel Legend on Chart
The legend is included on an Excel chart to explain what type of data is being displayed in a specific color. It consists of a small square showing the color and descriptive text. For example, a chart that compares sales for three different years might have a legend that shows which color in the chart represents each year.
Video of the Day
The first time you create a chart, the legend might not be displayed. You can fix this by selecting the entire chart and clicking on the plus sign button that appears to the right of the chart, then toggle on Legends from the Chart Elements menu. You can also click on the small black arrow to the right of the Legends button to see options for the location of the legend on the chart.
Edit the Legend in Excel
Say you have a column of money values in Excel, with the title "Earned" at the top of the column. If you select the entire column, including the title, when you select values for the chart, then the title text will be used for the legend for the axis that represents the column of data. If you edit the text in the cell, the Legend text will update. If text to be used for the Legend can't be found in the top cell of your column, you will see a default legend like "Series 1."
Using the Select Data Source Dialog
If you change a series name in Excel it will also change the legend. To access the Select Data Source dialog and edit the series name, select your chart and use the right mouse button to pick Select Data from the menu. The Select Data Source dialog is displayed. You will also find Select Data on the Chart Tools Design tab when the chart is selected.
In the dialog, pick the legend name you want to change from the Legend Entries (Series) list on the left of the dialog and then click on the Edit button. In the Edit Series dialog, type a new name into the Series name text box and then click OK to dismiss the box. After you click OK in the Select Data Source dialog, the legend name on the chart will update. Changing the legend name with the dialog will not change text in the column that contains your data.
Formatting an Excel Legend
After a legend is displayed on an Excel chart, there are several options available for changing its appearance. If you right-click on the legend, you can pick Font from the menu and use the Font dialog to change the font type, size, color and add text effects like underlining and strikethrough. Pick Format Legend after right-clicking to display the Format Legend task pane.
The Format Legend task pane has three sections with formatting options. The first section, Fill & Line, lets you fill the background of your legend text and add a border. The second section, Effects, lets you make the legend stand out with visual effects like shadow and glow. The third section, Legend Options, lets you control the location where the legend appears on the chart. When you change an option on the Format Legend task pane, you'll see an immediate change in your chart.