you need to summarise your data first
If you know your categories type them in a list
apples
bananas
oranges
pears
If the above list in in cells a1:a4, and your categories are in c1:c100 and the vlaues in d1:d1000 in cell b1 type (sumif($c$1:$c$1000,a1,$d$1:$d$1000)
and then copy it down to the 3 cells below, use this range to plot the graph
Else if you do not know the categories use a pivot table and then plot the graph from a pivot table. Data_pivot table report
Regards
Dav
Bookmarks