To edit a legend in an Excel line chart, select the chart and go to Chart Design > Select Data. Under Legend Entries (Series), choose a series and select Edit to change its name; use Chart Design > Add Chart Element > Legend to move the legend. You can also change the chart’s source headings, reorder series, or format the legend to make the chart easier to interpret.
What a legend represents in a line chart
A chart legend identifies the data series shown in the chart. In a line chart, each series is usually one line, such as a product, region, or measurement. The legend pairs a label with a sample of that series’ line color and style. It is different from the horizontal axis, which commonly shows dates or categories, and from the vertical axis, which shows values.
For example, a monthly sales chart might use the months January through June along the horizontal axis and show separate lines for East and West region sales. East and West are series, so those names appear in the legend. January through June are category labels, so changing the legend does not rename them.
Excel often builds legend labels from the header cells in the chart’s source data. If a heading is blank or the data is arranged in an unexpected way, Excel may display a default label such as Series1. You can edit a name in the chart settings or fix the source heading, depending on whether you want a one-off chart label or a label that stays connected to the data.
Rename a legend entry in Excel
In Excel for Microsoft 365 on Windows, use the Select Data Source dialog to edit an individual series name:
- Select the line chart. The contextual Chart Design tab appears on the ribbon.
- Choose Chart Design > Select Data.
- In Legend Entries (Series), select the entry you want to rename, then choose Edit.
- In the Series name box, enter a name or select the worksheet cell containing the name.
- Select OK, then select OK again to close the data-source dialog.
If the series is called Series1, for example, you could replace it with East Region. Selecting a heading cell is useful when the chart should reflect later edits to that cell. Typing a name directly is convenient for a chart-specific label, but it does not make the label follow a different worksheet heading automatically.
The dialog edits the chart’s series label, not the underlying numbers or worksheet data. Renaming a legend entry will not change a line’s values. If you only want to clarify what an existing series means, this is usually the right place to make the change.
Use worksheet headings for labels that stay in sync
When a chart is based on a simple data range, the most maintainable approach is often to put the desired names in the source column or row headings. Suppose column A contains months, column B contains East Region, and column C contains West Region. A chart made from this range can use the headings in B1 and C1 as its legend labels.
To update a label throughout a chart that uses those headings, edit the appropriate heading cell on the worksheet. Excel generally updates the chart label because it is linked to the source. If it does not, open Chart Design > Select Data and check that the series name points to the intended cell. This is also a good way to diagnose a heading that appears blank or unexpectedly abbreviated.
Keep headings concise but specific. For instance, East and West may be clear in a small internal report, while East Region and West Region are more helpful when the chart is shared on its own. A legend can become difficult to scan if its entries are long, so consider a short label and explain any necessary detail in a chart title, note, or nearby text.
Change the order of legend entries
The legend normally follows the order of the series in the chart’s data-source list. To change it, select the chart and open Chart Design > Select Data. In Legend Entries (Series), select a series and use the up or down arrow controls to move it, then confirm the change.
Reordering series can affect more than the legend. It can change the order in which lines are drawn, which may matter when two lines overlap: a line drawn later may appear on top of one drawn earlier. Review the plotted lines after changing the order, especially when the chart uses similar colors or several series cross one another.
Do not confuse series order with category order. The legend lists the lines; it does not control whether dates on the horizontal axis run from oldest to newest. If the dates or categories are reversed, adjust the source data or the horizontal-axis settings instead. Likewise, Chart Design > Switch Row/Column changes which data groups Excel treats as series, and therefore can change the legend entries themselves.
Move or remove the legend
To choose a built-in position, select the chart and go to Chart Design > Add Chart Element > Legend. Choose Right, Top, Left, Bottom, or More Legend Options, depending on the layout you want. Position names and available choices can vary slightly across Excel versions.
A legend on the right is a common choice when there are only a few series and the chart has room beside it. A legend at the bottom can work better when the chart is wide or when you want the plotting area to retain more horizontal space. A top legend may suit a compact dashboard. Check that the labels remain readable and that the legend does not crowd the lines or axis labels.
If the chart labels make the legend unnecessary, choose Chart Design > Add Chart Element > Legend > None to remove it. Removing the legend does not remove the data series. Before doing so, make sure each line can still be identified—for example, by adding direct labels or explaining the line colors in a note.
Format the legend’s text and appearance
Select the legend to apply formatting such as a larger font, bold text, or a different font color. With the legend selected, use the font controls on the Home tab. This changes the legend text’s appearance; it does not rename the entries or change the lines’ data. If the chart is small, increasing the legend font may improve readability, but it can also take space away from the plot.
To adjust legend-specific options, right-click the legend and choose Format Legend. The formatting pane provides options related to legend placement and layout. The exact controls shown depend on the selected chart and Excel build. To change a series’ line color or dash pattern, select the line itself and format that data series; the matching legend key reflects the series formatting.
For example, if the East Region entry is difficult to distinguish from West Region, changing only the legend text color will not change the plotted line. Format the East Region line to use a distinct color or line style, then confirm that the legend key makes the same distinction. Use colors and styles that remain clear when the chart is printed in grayscale or viewed by someone with color-vision differences.
Fix common legend problems
- The legend says Series1 or Series2: Open Chart Design > Select Data and edit the series name, or add a useful heading to the corresponding source-data row or column.
- A series is missing: In Select Data, check whether it appears under Legend Entries (Series). If needed, use Add to specify its name and values, or correct the chart’s data range. Adding a series changes the chart, not the worksheet values.
- The legend lists months instead of products: Excel may have interpreted rows as series when you intended columns, or the reverse. Try Chart Design > Switch Row/Column, then verify that the lines and labels match your intended layout.
- A renamed label changes back or is not reflected elsewhere: Check whether the chart name is linked to a source heading. Updating the heading is appropriate when it should be the shared label; edit the series name in the chart dialog when you want a chart-specific label.
- The legend is cut off or too crowded: Move it to another position, enlarge the chart, reduce the font slightly, or shorten the series names. Avoid shrinking text until it is difficult to read.
When adding a missing series, the dialog asks for a series name and a series values range. Make sure the values include the intended observations and that the category labels cover the same number of points. A mismatched range can make a line appear incomplete or associate values with the wrong dates. If the source range has changed substantially, selecting the correct chart data range may be simpler than repairing each series separately.
PivotCharts, Excel for Mac, and Excel for the web
A PivotChart gets its series and categories from its associated PivotTable fields. Its legend entries are therefore usually controlled by the field names and PivotTable layout, rather than by treating the chart like a standard chart. If a PivotChart label is wrong, check the relevant field name or PivotTable setup first. Some chart-level options can be restricted for PivotCharts.
In Excel for Mac, select the chart and look for the contextual Chart Design tab; the Select Data and chart-element controls are generally available there, though ribbon layout and dialog details may differ from Windows. In Excel for the web, chart editing is available, but some advanced options and controls may be more limited or arranged differently. If a needed option is missing, open the workbook in the desktop Excel app.
Frequently Asked Questions
Can I change a legend name without changing the worksheet heading?
Yes. Select the chart, open Chart Design > Select Data, choose the series, and select Edit. Enter the chart-specific name in the Series name box. If you instead select a heading cell, the chart label stays linked to that cell.
Why does my line chart legend show Series1?
Excel may not have found a usable heading for that series. Add a heading to the source data or edit the series name in the Select Data Source dialog. Also check that the chart’s data range includes the heading row or column.
How do I change the color shown beside a legend label?
Format the corresponding data series, not just the legend text. Select its line and use the series formatting controls to change its line color or style; the legend key updates to match.
Can I move just one legend entry?
Not as an independent item in the standard Excel legend. Reorder the chart series in Chart Design > Select Data to change the legend order. That may also change the series drawing order.
Does deleting a legend delete the lines?
No. Removing the legend hides the key that identifies the series; it does not remove the data or lines from the chart. Use the chart’s data-selection controls if you intend to remove a series from the chart.
Related
- Build an Enum from Excel Data: Practical Guide and Checks
- Import Emails From Outlook: PST and Account Options
- Examples of Ratings in Excel: Scores, Stars, and Rules
Try it: the Percentage Formula Generator: percent of, percent change, increase and decrease, with the formula.
More in Charts & pivot tables
- Excel Pivot Chart: Hide Zero Values the Right WayYes. In Excel for Microsoft 365 on Windows, hide zero-value categories in a PivotChart by applying a value…
- Proper Excel Chart Creation: A Step-by-Step GuideTo create a proper chart in Excel for Microsoft 365 on Windows, arrange your data in a clear…
- How to Make a Line Graph in Google Sheets: A Clear GuideTo make a line graph in Google Sheets, arrange your data in columns with time or category labels…
- Excel Graph With Dates on the X-Axis: Setup and FixesTo make an Excel graph with dates on the x-axis, put real Excel dates in one column and…
- How to Flip a Stacked Bar Chart in Excel: Axes and SeriesTo flip a stacked bar chart in Excel, first decide what you want to change: use Chart Design…
- Can You Make a Stacked Waterfall Chart in Excel?Yes—but Excel does not provide a native chart type that combines stacked components with waterfall steps. In Microsoft…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.