Skip to content

Conversation

@stormpython
Copy link
Contributor

Closes #1903.

Currently, when a terms aggregation is applied to a number field (x axis values), vertical bars are not ordered by count. Instead they are ordered lexicographically. This only occurs for number fields.

This pull request removes the sortBy of index positions from ordered_x_keys module which is causing the issue.

@rashidkpc
Copy link
Contributor

Is this ready for review? If so, label it and assign someone.

…arch sends them. That is, in descending order with the biggest values first. Changed the index which is recorded from the highest to the lowest. So the lowest index position is taken for an x value instead of the highest. In addition, we were not actually sorting by indexed position before, so this fixes that bug.
@stormpython
Copy link
Contributor Author

Tests were added in the last commit.

@rashidkpc
Copy link
Contributor

LGTM. merge it.

@rashidkpc rashidkpc removed the review label Dec 1, 2014
@rashidkpc rashidkpc assigned stormpython and unassigned rashidkpc Dec 1, 2014
stormpython added a commit that referenced this pull request Dec 1, 2014
Allow ordering of bars by count on term aggregation when x axis values are numbers
@stormpython stormpython merged commit 0f133a7 into elastic:master Dec 1, 2014
@stormpython stormpython deleted the fix/#1903 branch December 10, 2014 12:37
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.

Bar ordering

2 participants