ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Charts and Charting in Excel (https://www.excelbanter.com/charts-charting-excel/)
-   -   Ignore a Blank Data Series in the Legend (https://www.excelbanter.com/charts-charting-excel/221153-ignore-blank-data-series-legend.html)

Stormy

Ignore a Blank Data Series in the Legend
 
Hi,

I'm creating Pie Charts based on data from 10 data series fields. Some of
the data fields are blank, and so I've managed to create data labels that
only show on the Pie Chart if there is a value (otherwise the Chart was too
hard to read due to lots of blank labels).

However, if I show the Legend, the blank data series field still appear, so
I have say, 4 labels with the correct data series names but 6 which are
blank. Can I make the Legend ignore blank fields, and just show the 4 that
have values?

Thanks

ExcelBanter AI

Answer: Ignore a Blank Data Series in the Legend
 
Yes, you can make the legend ignore blank data series fields in your Pie Chart. Here's how:
  1. Select the Pie Chart by clicking on it.
  2. Click on the "Chart Elements" button (plus sign icon) that appears next to the chart.
  3. Check the box next to "Legend" to add the legend to your chart if it's not already there.
  4. Right-click on the legend and select "Format Legend" from the drop-down menu.
  5. In the "Format Legend" pane that appears on the right-hand side of the screen, click on the "Legend Options" tab.
  6. Under "Label Contains", select "Value From Cells" from the drop-down menu.
  7. Click on the "Select Data..." button.
  8. In the "Select Data Source" dialog box that appears, click on the "Hidden and Empty Cells" button.
  9. In the "Hidden and Empty Cell Settings" dialog box, select the "Show data in hidden rows and columns" option.
  10. Click "OK" to close all the dialog boxes.

Now, the legend in your Pie Chart will only show the data series names that have values, and will ignore the blank data series fields.

Jon Peltier

Ignore a Blank Data Series in the Legend
 
You can manually remove individual legend entries. Click on the legend, then
on the label of the entry you want to remove, then click Delete. Repeat as
needed. To retrieve deleted entries you have to delete the entire legend and
then add it back to the chart. This isn't dynamic.

You can apply a filter to your data, so rows containing zero or missing
values are hidden. Charts by default do not show data in hidden cells. This
also isn't dynamic, but it is easier to change.

If you have data labels on your chart, isn't the legend redundant? In any
case, the legend is separated from the data points, causing the viewer to
look back and forth in order to decode the chart.

Here's another suggestion:

Make a horizontal bar chart. The labels sit to the left of the bars, and you
can put value labels on the bars. Everyone thinks you need to use a pie
chart to show how all the individual pieces add up to the whole, but
research shows that pie charts aren't very good at this, especially if a
viewer wants to make comparisons between different segments. The segments
are badly oriented for this purpose, and people cannot judge areas or angles
as well as linear dimensions, such as the lengths of the bars. If there are
more than about five wedges, the pie chart becomes completely useless
because of cluttered labels and too much misalignment.

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Peltier Technical Services, Inc.
http://PeltierTech.com/WordPress/
_______


"Stormy" wrote in message
...
Hi,

I'm creating Pie Charts based on data from 10 data series fields. Some of
the data fields are blank, and so I've managed to create data labels that
only show on the Pie Chart if there is a value (otherwise the Chart was
too
hard to read due to lots of blank labels).

However, if I show the Legend, the blank data series field still appear,
so
I have say, 4 labels with the correct data series names but 6 which are
blank. Can I make the Legend ignore blank fields, and just show the 4 that
have values?

Thanks





All times are GMT +1. The time now is 03:22 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com