In a chart or graph in a spreadsheet program such as Microsoft Excel, the legend is often located on the right side of the chart or graph and sometimes surrounded by a box. The legend is linked to the graphical representation of data in the plot area. Each individual item in the legend contains a legend key to reference the data.
The information in this article applies to Excel 2019, 2016, 2013, Excel for Mac, and Excel Online.
- What are legend keys?
- Editing Legends and Legend Keys
- Show Legend in Excel
What are legend keys?
To add to the confusion between legends and keys, Microsoft refers to each individual legend item as a legend key. Legend key is a single color or patterned marker in the legend. To the right of each legend key is a name that identifies the data represented by that particular key.
Depending on the chart type, the legend keys represent different groups of data on the corresponding worksheet:
- Line chart, histogram or column chart † Each legend key represents one data series. For example, a bar chart might have a blue legend button that says “Favorite Snacks” next to it. The blue colors in the chart refer to the votes for each entry in the snack series.
- Pie chart or pie chart † Each legend key represents only part of one data series. To use the same example from above, but for a pie chart, each piece of the pie has a different color representing each “Snacks” item. Each piece of the pie has a different whole circle size to reflect the differences in voices from the “Voices” series.
Editing Legends and Legend Keys
In Excel, legend keys are associated with the data in the plot area, so changing the color of the legend key changes the color of the data in the plot area. You can right click or hold the legend key and select Input Format Legend to change the color, image, or image used to display the data.
To change options that apply to the entire legend, not just a specific item, right-click or hold to find the option Legend Format † To change the text fill, text path, text effect, and text box.
Show Legend in Excel
After you create a chart in Excel, the legend may not appear automatically. You can enable the legend by simply turning it on. Here’s how:
Choose an existing one scheme †
Select Design †
Select Add chart element †
Select Legend †
Select where to place the legend – right, top, left, or bottom.
If the option to add a legend is greyed out, it means you need to select the data first. Right click on the new blank chart and select Select data and follow the on-screen instructions to select the data you want to display in the chart.