This is a continuation of Legends in Excel Charts – Formats, Size, Shape, and Position, which started a discussion about the legends in Excel charts. That article talked about legend formatting, and how the best legend is no legend at all: it’s more effective to put the text labels right on the data. But sometimes you just need a legend. The article also showed the default legend configurations, and showed how to change these to suit.
This article continues the discussion, showing how to use the legend components–legend entries and legend keys–to access more advanced legend functionality.
Legend entries are treated somewhat independently of each other. You can select a legend entry with two single clicks, one to select the whole legend and the other to select the entry itself.
You can format the text of the legend entry. I’ve bolded the legend entry “two” and to enhance the highlighting of this series I’ve used a thicker line in the chart.
You can selectively remove a legend entry by selecting it and deleting it, while leaving the series in the chart.
In order to restore any legend entries to the legend, you must delete the whole legend, then add the default legend back to the chart, and reapply any custom formatting.
Don’t select the legend key before pressing the Delete key . . .
. . . because you will delete the series itself, not just the legend entry.
However, you can select the legend key then format it, which in turn formats the series in the chart.
This last section does not apply to Excel 2007. You cannot select the legend entry in a chart in Excel 2007. I don’t know why this was changed, because it seemed a nice alternative way to access a series when you otherwise could not select it.
Multiple Legends in a Chart
Sometimes people want to split the legend into different parts. This is not possible. However, like many other visual effects in Excel charts, you can fake it. Here I have two charts, my working chart on the left, and a dummy chart on the right. In the working chart, I have removed the entries I don’t want in one of the legends. In the dummy chart I have removed the entries that are in the working chart’s legend.
I then used a screen capture program (I use SnagIt) to copy the legend from the dummy chart, then I selected the working chart, and pasted this image into the chart, and moved it to where I wanted it.
This is not a dynamic solution: if a label or series format changes, the static image which comprises the second legend may have to be refreshed. This is why I make a separate dummy chart as above. Both charts use the same data and series formats, so I only need to repeat the copy and paste to update my dual legend chart.
Follow up posts in the blog: Order of Legend Entries in Excel Charts, which describes some of the intricacies of legend entry order, and Double Legend in a Single Chart, which shows a dummy series trick to add multiple legends to a single chart.