Open philipcdavis opened 9 years ago
Yeah, looks nice. Let me mark as enhancement and plugin candidate. Thanks!
Was this ever implemented?
Is it possible to show only the total instead of cluttering all values? Lets say my stacked bar values are [0, 1, 2, 500] and in this case text labels overlap each other for 0, 1, 2 with formatting like 'n degree' in rotated axis graph. Is it possible to sum everything and show just one at the top. While selecting label we will pass data-n id as array to consider for sum because graph wont know for which stacked bar it has to show sum, in case of multiple stacked bars.
Bump...
Some news about this?
+1 showing the total on top of the stacked bar chart would be very useful
Any updates on showing total on the top?
Any news about the optional display text label center in the bar? I got same problem.
Here a quick solution on how to get totals on stacked bar charts:
You can make a stacked bar chart a combination chart by adding a line into the chart which has as data the totals. Because the line represents the totals, it sits exactly on top of the bars, because the stack size is the sum=total. Now we use CSS to remove the line, because you want only see the labels and in order to avoid overlapping labels, we move the labels of the total line a little bit up via CSS. That's it.
Here is a fiddle, which shows the result: https://jsfiddle.net/thomasw/t2aj7xsL/20/
Any updates on showing total on the top, I also need this feature urgently?
sorry to dig out such an old subject but any news about it ? i do need this feature.
While this does not get implemented, the person that made this fiddle hacked their way to make it work, might be useful for someone else as it was for me: https://jsfiddle.net/Dimmy/d5sxjng2/6/
It would be nice to be able to add totals as a data label to stacked bar charts and to their corresponding tool tips. Something like this.
This might require additional design decisions like exposing the ability to center data labels within bars charts as well.