Skip to content
This repository has been archived by the owner on Jul 6, 2023. It is now read-only.

Commit

Permalink
fix: Sort data supplied to chart ascendingly
Browse files Browse the repository at this point in the history
  • Loading branch information
ahmadalfy committed Feb 1, 2020
1 parent 992ee69 commit 16650f0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/charts.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class Charts {
} else {
const datedStack = stack.data.find(item => event.creation_day === item[0]);
if (!datedStack) {
stack.data.push([ event.creation_day, 1 ]);
stack.data.unshift([ event.creation_day, 1 ]);
} else {
datedStack[1] += 1;
}
Expand Down

0 comments on commit 16650f0

Please sign in to comment.