Skip to content

Commit

Permalink
Sort scalars for the plots correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
jungomi committed Feb 7, 2020
1 parent 9ffc7a1 commit e6cfd3b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions js/Scalars.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,10 @@ function createPlot(category: string, categoryData: Array<ScalarEntry>) {
continue;
}
const enumeratedSeries = [];
for (const key of Object.keys(steps).sort()) {
const i = Number.parseInt(key);
const sortedSteps = Object.keys(steps)
.map(s => Number.parseInt(s))
.sort((a, b) => a - b);
for (const i of sortedSteps) {
const step = steps[i];
if (step === undefined || step.value === undefined) {
continue;
Expand Down

0 comments on commit e6cfd3b

Please sign in to comment.