Forum Discussion

kkb_IHC's avatar
kkb_IHC
Brass Contributor
Oct 21, 2019
Solved

Pie Chart - legend missing one category (edited to include spreadsheet)

I have set of pie charts and when I add data to some of them, there is one category name that is missing in the legend (it is also missing in the "Horizontal (category) Axis Labels," see below) even though I have selected it a million times! 

The data for this category does show up in the pie chart and the color for the category also shows up in the legend (see below). I tried putting the category name on the data label to see if it would show up, and it did not show up there either. I've also tried making the category name short, removing the legend & adding it back, and making the legend larger. None of these fixed it. I also deleted all the category labels, selected all new ones, and all 3 did show up. When I selected the real ones again, that one does not show up.

This is driving me crazy.

Please help.

thanks!

  • Excel is getting confused by your merged cells. If possible, unmerge the cells, and link the label to a single cell.
    If you don't want to unmerge, then change the label refs in the series formula for the chart.
    Click on the pie chart, and in the formula bar, change the merged cell refs to a single cell ref:
    -- instead of: $O$21:$S$21 put $O$21
    -- instead of: $O$20:$S$20 put $O$20
  • Excel is getting confused by your merged cells. If possible, unmerge the cells, and link the label to a single cell.
    If you don't want to unmerge, then change the label refs in the series formula for the chart.
    Click on the pie chart, and in the formula bar, change the merged cell refs to a single cell ref:
    -- instead of: $O$21:$S$21 put $O$21
    -- instead of: $O$20:$S$20 put $O$20
    • kkb_IHC's avatar
      kkb_IHC
      Brass Contributor

      Debra Dalgleish 

      Thank you. I did try un-merging them to see if that was the problem and it did not fix the issue, but I see now that the ones I un-merged were not the ones having the issue. Your suggestion has fixed the problem. I can't thank you enough!

  • Riny_van_Eekelen's avatar
    Riny_van_Eekelen
    Platinum Contributor

    kkb_IHC 

    Managed to recreate your issue and suspect that you only copied the data into the graph but not the label. Please have a look at the attached screenshot. In the first graph I only added the yellow cell and created the issue that you describe. In the second graph I added the yellow cells and all looks how you want it to be.

     

    Right click in the chart and press "Select data source". Make sure that the range for "Horizontal (category) axis labels" includes all the labels you want to be included.

     

    PS: I'm working on a Mac, so your screens may look a bit different. But you should be able to find the horizontal axis settings as describe above.

    • kkb_IHC's avatar
      kkb_IHC
      Brass Contributor

      Riny_van_Eekelen 

      Thank you. I am selecting the cell. My data and their related categories are all over the worksheet, so I used CTRL and pick each one separately. My other pie charts are working fine, as far as this issue goes, other than one that has the same issue. I will probably just need to delete those two and start over. I had started from one chart initially, got it the size I wanted, etc., and then copied it a bunch of times.

      • Riny_van_Eekelen's avatar
        Riny_van_Eekelen
        Platinum Contributor

        kkb_IHC 

         

        Okay. Upload your chart if you can't get it to work. Than I (or someone else) can hav a look at it.

         

Resources