Generating a pie chart

Discuss the spreadsheet application
Post Reply
tomwatson
Posts: 6
Joined: Wed May 07, 2008 10:41 am

Generating a pie chart

Post by tomwatson »

I am trying to Generate a pie chart with the following field.

Image

It should show 3/4 as one section marked AD and 1/4 as another section marked SUP. I have tried in both Excel and OpenOffice and can't figure out how to make it do this. Any help would be appreciated.
User avatar
Hagar Delest
Moderator
Posts: 33701
Joined: Sun Oct 07, 2007 9:07 pm
Location: France

Re: Generating a pie chart

Post by Hagar Delest »

I don't think you can do that directly (but I may be wrong, I'm not a Calc user).
You may have to sum the number of each before creating the chart. That would give 3 for AD and 1 for SUP, then, create the chart based on these figures.

To count the number of entries, you can use the COUNTIF() function for example (see the help file about that function).

Thanks to add '[Solved]' at beginning of your first post title (edit button) if your issue has been fixed.
LibreOffice 25.2 on Linux Mint Debian Edition (LMDE 7 Gigi) and 25.2 portable on Windows 11.
jrkrideau
Volunteer
Posts: 3816
Joined: Sun Dec 30, 2007 10:00 pm
Location: Kingston Ontario Canada

Re: Generating a pie chart

Post by jrkrideau »

tomwatson wrote:I am trying to Generate a pie chart with the following field.

Image

It should show 3/4 as one section marked AD and 1/4 as another section marked SUP. I have tried in both Excel and OpenOffice and can't figure out how to make it do this. Any help would be appreciated.
Use the function COUNTIF() and some reference cells

Set up two cells with the codes , AD and SUP ( in my example in F2 and F3)

Assuming data is in A2:A5 then
=COUNTIF(A2:A5;F2) # Gives you the number of AD's
=COUNTIF(A3:A6;F3) # Gives you the number of SUP's

Graph these numbers.
LibreOffice 7.3.7. 2; Ubuntu 22.04
User avatar
acknak
Moderator
Posts: 22756
Joined: Mon Oct 08, 2007 1:25 am
Location: USA:NJ:E3

Re: Generating a pie chart

Post by acknak »

You can also use the Data Pilot (Data > Data Pilot) to do the counting for each value type, and then plot those results.
AOO4/LO5 • Linux • Fedora 23
Post Reply