+ Reply to Thread
Results 1 to 10 of 10

Pie Chart - Do not graph 0 values or do not include labels

  1. #1
    Registered User
    Join Date
    09-25-2015
    Location
    Toronto
    MS-Off Ver
    2010
    Posts
    29

    Pie Chart - Do not graph 0 values or do not include labels

    Hi, I have a pie graph.

    Data is like this:

    A 25%
    B 50%
    C 25%
    D 0%
    E 0%


    On the chart, instead of having a legend, I label the different sections.

    I do not want it to have labels for the 0% sections or I want it to simply not graph those sections.


    An alternative would be having the legend automatically not include 0 values.
    Last edited by LJenny; 10-13-2015 at 11:21 AM.

  2. #2
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,829

    Re: Pie Chart - Do not graph 0 values or do not include labels

    I would suggest this article: http://peltiertech.com/mind-the-gap-...g-empty-cells/
    For pie charts, Jon recommends using "" (empty string) for the "non-plotting" points instead of 0, so i would add a helper column with something like =if(b2=0,b2,""), then use this helper column as your chart series.
    Try that and see if that helps.

    Another possibility, since you have all of your 0 points at the end, is to use a dynamic named range for your data series. http://www.excel-easy.com/examples/d...med-range.html
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

  3. #3
    Registered User
    Join Date
    09-25-2015
    Location
    Toronto
    MS-Off Ver
    2010
    Posts
    29

    Re: Pie Chart - Do not graph 0 values or do not include labels

    For some reason, the #N/A is not doing anything for me. :S I am using NA()

    Neither do any other methods in the page... I tried using blanks and it is still graphing it.

    Tools > Options > Charts > Plot Empty Cells as Not Plotted is selected already.
    Last edited by LJenny; 10-13-2015 at 12:08 PM.

  4. #4
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,829

    Re: Pie Chart - Do not graph 0 values or do not include labels

    Can you upload a small sample sheet that explains your problem. When I plot your data in a pie chart, using the N/A error for 0, it does not include a data label for those points. Perhaps I am misunderstanding what you are trying to do.

  5. #5
    Registered User
    Join Date
    09-25-2015
    Location
    Toronto
    MS-Off Ver
    2010
    Posts
    29

    Re: Pie Chart - Do not graph 0 values or do not include labels

    Quote Originally Posted by MrShorty View Post
    Can you upload a small sample sheet that explains your problem. When I plot your data in a pie chart, using the N/A error for 0, it does not include a data label for those points. Perhaps I am misunderstanding what you are trying to do.
    Okay I have attached a sample.

    On the chart, it is still labeling all the sections which have 0 values despite my helper column.
    Attached Files Attached Files

  6. #6
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,731

    Re: Pie Chart - Do not graph 0 values or do not include labels

    A simple way is to apply a filter to column AD, and unselect the N/A terms in the filter drop-down.

    The drawback with this approach is that it is not dynamic - if your data changes you will have to re-apply the filter criterion.

    Hope this helps.

    Pete

  7. #7
    Registered User
    Join Date
    09-25-2015
    Location
    Toronto
    MS-Off Ver
    2010
    Posts
    29

    Re: Pie Chart - Do not graph 0 values or do not include labels

    Quote Originally Posted by Pete_UK View Post
    A simple way is to apply a filter to column AD, and unselect the N/A terms in the filter drop-down.

    The drawback with this approach is that it is not dynamic - if your data changes you will have to re-apply the filter criterion.

    Hope this helps.

    Pete
    My data is going to be changing weekly so this would be a little troublesome.

  8. #8
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,731

    Re: Pie Chart - Do not graph 0 values or do not include labels

    Well, it only takes a few seconds ...

    You could record a macro to make that filter selection and assign a button to it, so you can just click the button to update.

    Hope this helps.

    Pete

  9. #9
    Forum Contributor
    Join Date
    06-15-2014
    Location
    The great border City of Carlisle, England
    MS-Off Ver
    2010
    Posts
    123

    Re: Pie Chart - Do not graph 0 values or do not include labels

    Could you format data labels, number, custom and enter #"" then add and ok, do this on all data labels and 0 will not show. Works on bar charts. Hope this helps.

  10. #10
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,436

    Re: Pie Chart - Do not graph 0 values or do not include labels

    To have automatic legend items then you would need to rebuild the charts data range using formula
    http://www.andypope.info/charts/piezeros.htm

    If you just want to remove those leader lines then set empty data to gap rather than zero via the Select Data dialog
    Cheers
    Andy
    www.andypope.info

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Need graph to show alphanumeric values as Y axis labels with Date as Z axis labels
    By Ochimus in forum Excel Charting & Pivots
    Replies: 4
    Last Post: 06-24-2015, 08:40 PM
  2. Hide Labels with zero values in a Graph
    By Taislin in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 05-08-2013, 01:45 PM
  3. Changing pie chart data labels to include % symbol
    By mm1099 in forum Excel General
    Replies: 5
    Last Post: 09-10-2012, 10:25 PM
  4. Replies: 0
    Last Post: 06-15-2012, 03:23 PM
  5. How to make chart include only values from every 5th column?
    By salutaurs in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 10-30-2008, 05:41 AM
  6. [SOLVED] Off the chart Graph labels, that don't show up?
    By Dawn in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 06-07-2006, 10:10 PM
  7. [SOLVED] How do I not include empty cell value chart labels in pie charts?
    By JMarble in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 05-13-2005, 04:06 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1