FEATURE: add total on stacked-chart tooltip (#6917)

FEATURE: add total on stacked-chart tooltip (#6917)

diff --git a/app/assets/javascripts/admin/components/admin-report-stacked-chart.js.es6 b/app/assets/javascripts/admin/components/admin-report-stacked-chart.js.es6
index fc9d7da..9b9d27e 100644
--- a/app/assets/javascripts/admin/components/admin-report-stacked-chart.js.es6
+++ b/app/assets/javascripts/admin/components/admin-report-stacked-chart.js.es6
@@ -76,6 +76,13 @@ export default Ember.Component.extend({
           mode: "index",
           intersect: false,
           callbacks: {
+            beforeFooter: tooltipItem => {
+              let total = 0;
+              tooltipItem.forEach(
+                item => (total += parseInt(item.yLabel || 0, 10))
+              );
+              return `= ${total}`;
+            },
             title: tooltipItem =>
               moment(tooltipItem[0].xLabel, "YYYY-MM-DD").format("LL")
           }

GitHub sha: b1b27d9f