Skip to content

Update to BarChart.js to resolve sorting issue#8

Open
toridenney wants to merge 1 commit intobchao1:masterfrom
toridenney:patch-2
Open

Update to BarChart.js to resolve sorting issue#8
toridenney wants to merge 1 commit intobchao1:masterfrom
toridenney:patch-2

Conversation

@toridenney
Copy link

No description provided.

// Sorted list of results based on the axis
return [toSort.reduce((ret, item, idx) => ({
...ret, ...{ [item.name]: idx }
}), {}), minVal, maxVal]

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In lines 22 and 56 the return value at index 1 is interpreted as maxVal, not minVal. So you should either change the order here or in the mentioned lines (or not return minVal at all, as it does not seem to be needed).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants