Skip to content

Commit

Permalink
reports - update tooltip, correct column group spacing
Browse files Browse the repository at this point in the history
  • Loading branch information
drKnoxy authored and vastbinderj committed Apr 7, 2016
1 parent 7c8fe42 commit 4a5d63c
Showing 1 changed file with 20 additions and 4 deletions.
24 changes: 20 additions & 4 deletions src/app/reports/product.controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,18 @@ angular.module('reportsModule')
tooltip: {
formatter: function() {
return [
this.series.name , ': ' ,
'<b>' , this.point.units_sold , ' units @ $' , this.y , '</b>'
this.series.name , '<br/>',
this.point.sku , ': <b>' , this.point.units_sold , ' units @ $' , this.y , '</b>',
].join('');
}
}
},

// Removes the dead space to the sides of the column-group
plotOptions: {
series: {
groupPadding: 0
},
},
});

return {
Expand Down Expand Up @@ -111,6 +118,11 @@ angular.module('reportsModule')
tooltip: {
headerFormat: ''
},
plotOptions: {
series: {
groupPadding: 0
}
},
series: [],
};
}
Expand All @@ -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,
}],
};
}
}
Expand Down

0 comments on commit 4a5d63c

Please sign in to comment.