From 4a5d63c41f3d095f85f39e1f7b3ffa540d69c7e6 Mon Sep 17 00:00:00 2001 From: Adam Knox Date: Thu, 7 Apr 2016 11:02:10 -0400 Subject: [PATCH] reports - update tooltip, correct column group spacing --- src/app/reports/product.controller.js | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/src/app/reports/product.controller.js b/src/app/reports/product.controller.js index d6badd37..9ff872ae 100644 --- a/src/app/reports/product.controller.js +++ b/src/app/reports/product.controller.js @@ -73,11 +73,18 @@ angular.module('reportsModule') tooltip: { formatter: function() { return [ - this.series.name , ': ' , - '' , this.point.units_sold , ' units @ $' , this.y , '' + this.series.name , '
', + this.point.sku , ': ' , this.point.units_sold , ' units @ $' , this.y , '', ].join(''); } - } + }, + + // Removes the dead space to the sides of the column-group + plotOptions: { + series: { + groupPadding: 0 + }, + }, }); return { @@ -111,6 +118,11 @@ angular.module('reportsModule') tooltip: { headerFormat: '' }, + plotOptions: { + series: { + groupPadding: 0 + } + }, series: [], }; } @@ -122,7 +134,11 @@ angular.module('reportsModule') return { // sku, units_sold name: product.name, - data: [{y: product.gross_sales, units_sold: product.units_sold}] + data: [{ + y: product.gross_sales, + units_sold: product.units_sold, + sku: product.sku, + }], }; } }