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

[Lens] Terms aggregation keeps the numeric formatter for non-numeric data #82771

Closed
wylieconlon opened this issue Nov 5, 2020 · 1 comment · Fixed by #82776
Closed

[Lens] Terms aggregation keeps the numeric formatter for non-numeric data #82771

wylieconlon opened this issue Nov 5, 2020 · 1 comment · Fixed by #82776
Assignees
Labels
bug Fixes for quality problems that affect the customer experience Feature:Lens Team:Visualizations Visualization editors, elastic-charts and infrastructure

Comments

@wylieconlon
Copy link
Contributor

wylieconlon commented Nov 5, 2020

This is a bug on master and 7.10. The user-facing effect of the bug is that labels for their data might not be correct.

Steps to reproduce:

  1. Create an initial XY chart
  2. Drag a numeric field onto the horizontal axis, which will create an Intervals aggregation
  3. Switch the horizontal axis to Top Values
  4. Choose a number formatter, anything but Default
  5. Switch the field to any non-numeric field, and the chart will show incorrect data because it's not numeric
  6. To work around the bug, switch back to the Default formatter.

The main source of this bug is that the state of the terms aggregation is not being fully updated when the field is switched. If the initial field is a number, the terms aggregation will report that it is always a number. So the solution is to write a more complete onFieldChange function for the Terms aggregation.

This PR might have merge conflicts due to my work on #82550, so I will work on both. If needed this will end up as two PRs.

@wylieconlon wylieconlon added bug Fixes for quality problems that affect the customer experience Team:Visualizations Visualization editors, elastic-charts and infrastructure Feature:Lens labels Nov 5, 2020
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-app (Team:KibanaApp)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixes for quality problems that affect the customer experience Feature:Lens Team:Visualizations Visualization editors, elastic-charts and infrastructure
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants