title: Adding data labels above geom_col() chart with ggplot2
body: <p>I have tried to add data labels that show the sum of y values for a given x category.  Here is the code I used:</p>
  
  <pre><code>library(ggplot2)
  gg &lt;- ggplot(vgsales, aes(x = Genre, y = Global_Sales, fill = Genre)) + 
  geom_col() + 
  geom_text(aes(x = Genre, y = Global_Sales, label = Global_Sales), stat = "sum")
  print(gg)
  </code></pre>
  
  <p>This is the result I get: <a href="https://i.stack.imgur.com/LSMQv.png" rel="noreferrer"><img src="https://i.stack.imgur.com/LSMQv.png" alt="enter image description here"></a></p>
  
  <p>I would like to position the labels above each bar and show only the sum of all y values for a given x.  How do I accomplish this?</p>
  
  <p>Edit: I've attempted to use some of the guides mentioned and the result is this:</p>
  
  <p><a href="https://i.stack.imgur.com/ZHZuY.png" rel="noreferrer"><img src="https://i.stack.imgur.com/ZHZuY.png" alt="enter image description here"></a></p>
  
  <p>So the labels appear to be overlapping each other and reporting individual Global_Sales sums.  Is there a way just to report the total Global_Sales by genre as a label?</p>