Skip to content

Commit

Permalink
Fix ordering option for the barChart.
Browse files Browse the repository at this point in the history
  • Loading branch information
mhodorogea committed Nov 17, 2014
1 parent ebcd708 commit a016cbb
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/stack-mixin.js
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,13 @@ dc.stackMixin = function (_chart) {
};

function flattenStack() {
return _chart.data().reduce(function (all, layer) {
var groups = _chart.data();

if(groups.length){
groups[0].values = _chart._computeOrderedGroups(groups[0].values);
}

return groups.reduce(function (all, layer) {
return all.concat(layer.values);
}, []);
}
Expand Down

0 comments on commit a016cbb

Please sign in to comment.