Skip to content

Commit

Permalink
added sort to dual sibebar groups and subgroups
Browse files Browse the repository at this point in the history
  • Loading branch information
ernest-okot committed Jul 31, 2017
1 parent 83c948d commit 928e24f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/charts/dual-sidebar.js
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,8 @@ export default (element, data, config) => {

const plots = [leftPlot, rightPlot];

const splittingIds = makeUnique(data.map(d => d[splitBy]));
const groupIds = makeUnique(data.map(d => d[groupBy]));
const splittingIds = makeUnique(data.map(d => d[splitBy])).sort((a, b) => a > b ? 1 : -1);
const groupIds = makeUnique(data.map(d => d[groupBy])).sort((a, b) => a > b ? 1 : -1);
const subGroupIds = groupIds.map(groupId => makeUnique(
data
.filter(d => d[groupBy] === groupId)
Expand Down

0 comments on commit 928e24f

Please sign in to comment.