Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Preserve x-axis order in vislib. #31533

Merged
merged 5 commits into from
Feb 25, 2019

Conversation

lukeelmers
Copy link
Member

@lukeelmers lukeelmers commented Feb 19, 2019

Closes #31534.

Summary

This resolves an issue where the original x values sort order sent back
by ES was lost for point series / vislib visualizations. This
was due to the way the point series agg response handler generated
series data, only filling in series values as it encountered them
bucket-by-bucket, rather than first looking at all x-values and ordering
them consistently within each series.

With this change, the ordered x values are preserved and stored with the
chart, so they can be accessed later in vislib/components/zero_injection.

QA

  1. Create a stacked bar chart using kibana_sample_data_logs
  2. Set time range to today
  3. Metrics:
    • Y-Axis: Count
  4. Buckets:
    • X-Axis: terms on extension.keyword, order: alphabetical ascending, size: 5
    • Split Series: terms on machine.os.keyword, order: count descending, size: 3
  5. The values along the x-axis should be in alphabetical order (they will appear out of order if you test against master).

Checklist

Use strikethroughs to remove checklist items you don't feel are applicable to this PR.

- [ ] This was checked for cross-browser compatibility, including a check against IE11
- [ ] Any text added follows EUI's writing guidelines, uses sentence case text and includes i18n support
- [ ] Documentation was added for features that require explanation or tutorials
- [ ] This was checked for keyboard-only and screenreader accessibility

@lukeelmers lukeelmers changed the title Fix/xaxis ordering Preserve x-axis order in vislib. Feb 19, 2019
@elasticmachine

This comment has been minimized.

@elasticmachine

This comment has been minimized.

@lukeelmers lukeelmers added Feature:Vislib Vislib chart implementation Feature:Aggregations Aggregation infrastructure (AggConfig, esaggs, ...) Feature:XYAxis XY-Axis charts (bar, area, line) app-stabilizing and removed Feature:Aggregations Aggregation infrastructure (AggConfig, esaggs, ...) labels Feb 20, 2019
@lukeelmers lukeelmers added the Team:Visualizations Visualization editors, elastic-charts and infrastructure label Feb 20, 2019
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-app

@elasticmachine

This comment has been minimized.

@elasticmachine

This comment has been minimized.

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Copy link
Member

@ppisljar ppisljar left a comment

Choose a reason for hiding this comment

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

works on chrome linux
i have some minor comments/questions around code

@lukeelmers lukeelmers requested a review from ppisljar February 22, 2019 00:20
@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Copy link
Member

@markov00 markov00 left a comment

Choose a reason for hiding this comment

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

Code LGTM, tested locally together with Peter and fix the ordering

Copy link
Member

@ppisljar ppisljar left a comment

Choose a reason for hiding this comment

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

LGTM

@lukeelmers lukeelmers merged commit e69d94b into elastic:master Feb 25, 2019
@lukeelmers lukeelmers deleted the fix/xaxis-ordering branch February 25, 2019 15:22
lukeelmers added a commit to lukeelmers/kibana that referenced this pull request Feb 25, 2019
lukeelmers added a commit to lukeelmers/kibana that referenced this pull request Feb 25, 2019
lukeelmers added a commit to lukeelmers/kibana that referenced this pull request Feb 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Vislib Vislib chart implementation Feature:XYAxis XY-Axis charts (bar, area, line) Team:Visualizations Visualization editors, elastic-charts and infrastructure v6.7.0 v7.0.0 v7.2.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

x-axis order not preserved in split series vislib charts
4 participants