Skip to content

Commit 4a5d63c

Browse files
drKnoxyvastbinderj
authored andcommitted
reports - update tooltip, correct column group spacing
1 parent 7c8fe42 commit 4a5d63c

File tree

1 file changed

+20
-4
lines changed

1 file changed

+20
-4
lines changed

src/app/reports/product.controller.js

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,11 +73,18 @@ angular.module('reportsModule')
7373
tooltip: {
7474
formatter: function() {
7575
return [
76-
this.series.name , ': ' ,
77-
'<b>' , this.point.units_sold , ' units @ $' , this.y , '</b>'
76+
this.series.name , '<br/>',
77+
this.point.sku , ': <b>' , this.point.units_sold , ' units @ $' , this.y , '</b>',
7878
].join('');
7979
}
80-
}
80+
},
81+
82+
// Removes the dead space to the sides of the column-group
83+
plotOptions: {
84+
series: {
85+
groupPadding: 0
86+
},
87+
},
8188
});
8289

8390
return {
@@ -111,6 +118,11 @@ angular.module('reportsModule')
111118
tooltip: {
112119
headerFormat: ''
113120
},
121+
plotOptions: {
122+
series: {
123+
groupPadding: 0
124+
}
125+
},
114126
series: [],
115127
};
116128
}
@@ -122,7 +134,11 @@ angular.module('reportsModule')
122134
return {
123135
// sku, units_sold
124136
name: product.name,
125-
data: [{y: product.gross_sales, units_sold: product.units_sold}]
137+
data: [{
138+
y: product.gross_sales,
139+
units_sold: product.units_sold,
140+
sku: product.sku,
141+
}],
126142
};
127143
}
128144
}

0 commit comments

Comments
 (0)