Skip to content

Commit

Permalink
remove data sorting for dual side bar chart
Browse files Browse the repository at this point in the history
  • Loading branch information
epicallan committed Sep 19, 2017
1 parent 8196f71 commit 322b6be
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/charts/dual-sidebar.js
Original file line number Diff line number Diff line change
Expand Up @@ -158,15 +158,14 @@ export default (element, data, config) => {
const plots = [leftPlot, rightPlot];

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);
// removing sorting, the order in which the data comes in is fine.
const groupIds = makeUnique(data.map(d => d[groupBy]));
const subGroupIds = groupIds.map(groupId => makeUnique(
data
.filter(d => d[groupBy] === groupId)
.map(d => d[subGroupBy])
.sort((a, b) => a > b ? 1 : -1)
)
);

splittingIds.slice(0, 2)
.sort((a, b) => a > b ? 1 : -1)
// Split data into split sides
Expand Down

0 comments on commit 322b6be

Please sign in to comment.