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] Sparse histogram data leads to overly wide bars in xy chart #85924

Closed
flash1293 opened this issue Dec 15, 2020 · 2 comments · Fixed by #91370
Closed

[Lens] Sparse histogram data leads to overly wide bars in xy chart #85924

flash1293 opened this issue Dec 15, 2020 · 2 comments · Fixed by #91370
Assignees
Labels
bug Fixes for quality problems that affect the customer experience Feature:Lens Team:Visualizations Visualization editors, elastic-charts and infrastructure

Comments

@flash1293
Copy link
Contributor

Kibana version: master

Describe the bug: If the "intervals" function is used, completely empty buckets are dropped and not part of the table passed to the visualization. For sparse data, this causes a problem because the used interval can't be inferred from the data, leading to elastic-charts guessing. This is very similar to #81580 (for date histograms)

Steps to reproduce:

  1. Go to Lens with logs sample data with a small time range
  2. Use intervals of bytes on the x axis and count on the y axis
  3. Observe the bars to be much wider than the underlying interval used

Screenshot 2020-12-15 at 10 37 26

Screenshot 2020-12-15 at 10 37 39

In both of these, the used interval is 100, but it looks like 900

Expected behavior:

Bars should show the correct width of 100

Any additional context:

There are a few options what to do:

  • Implement a solution to pass the used interval as part of the meta data similar to the date histogram. I recommend this solution even if it's a bit more complex because it will allow us to leverage this information in other places as well (like in the config UI) and right now there's no way to determine the currently used interval
  • Just leave it as it is right now - the chart is not technically wrong, it could just provide higher granularity information
  • Fetch empty buckets as well so elastic-charts can infer the actual interval from the empty buckets

cc @ppisljar what do you think about option 1 here? This case is very similar to the date histogram "auto" interval used, so IMHO it would make sense to use the same solution.

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

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

@ppisljar
Copy link
Member

i agree option 1 makes sense

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.

3 participants