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

Wide vs narrow bars in lens #81580

Closed
gservat opened this issue Oct 26, 2020 · 6 comments · Fixed by #83545
Closed

Wide vs narrow bars in lens #81580

gservat opened this issue Oct 26, 2020 · 6 comments · Fixed by #83545
Assignees
Labels
bug Fixes for quality problems that affect the customer experience Feature:Lens Team:Visualizations Visualization editors, elastic-charts and infrastructure

Comments

@gservat
Copy link

gservat commented Oct 26, 2020

Kibana version: 7.8.0

Description of the problem including expected versus actual behavior:

I built a couple of visualizations using Lens and they both have the same interval and time range, however one has really wide bars and the other narrow ones:

image

Any ideas why that is?

@gservat gservat added the Team:Visualizations Visualization editors, elastic-charts and infrastructure label Oct 26, 2020
@elasticmachine
Copy link
Contributor

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

@wylieconlon wylieconlon added the bug Fixes for quality problems that affect the customer experience label Oct 26, 2020
@wylieconlon
Copy link
Contributor

@gservat I have a few theories about why, but it would help to collect more information:

  • Is this an auto interval, or is there a minimum interval that you chose?
  • How does the same chart look in Visualize?
  • Can you show a screenshot or describe the full chart configuration in Lens?
  • If you can show a datatable equivalent of the same chart it would help us to reproduce the situation

@gservat
Copy link
Author

gservat commented Oct 26, 2020

Hi @wylieconlon thanks for taking a look at this.

Is this an auto interval, or is there a minimum interval that you chose?

I haven't customized the time interval, so yeah, auto.

How does the same chart look in Visualize?

Exactly the same as in the dashboard:

image

image

Can you show a screenshot or describe the full chart configuration in Lens?

It's a stacked bar chart with @timestamp on the X-axis, Count of records on the Y-axis and broken down by a keyword field. Let me know if there's anything I've missed here that you're interested in.

If you can show a datatable equivalent of the same chart it would help us to reproduce the situation

This is the data table from the one showing narrow columns:

image

This is from the wide columns:

image

@flash1293
Copy link
Contributor

How does the same chart look in Visualize?

@gservat I think what @wylieconlon meant here is how the chart looks like if the configuration is re-created using the "Vertical Bar" visualization type from the new visualization dialog:

  • Go to "Visualize" from the side bar
  • Click "Create visualization"
  • Select "Vertical Bar"

Screenshot 2020-10-27 at 08 38 28

Another possible cause: Is one of these charts built using a rollup index pattern?

@gservat
Copy link
Author

gservat commented Nov 17, 2020

Apologies for the slow response. These charts are based on filebeat data (no rollups).

Seems to look fine in vertical bar:

Lens

image

Vertical Bar

image

@flash1293
Copy link
Contributor

flash1293 commented Nov 17, 2020

Thanks @gservat

To me this looks like a problem with the auto-width detection of elastic-charts. If there are multiple values in the time series we are leaving it up to the chart to figure out the width of the column, but completely empty rows are filtered out. If there are empty rows after the first row containing a value, all empty buckets after it will be added to the width of the bars.

Since we but this logic into place we got a new way of determining the interval of a date dimension - data.search.aggs.getDateMetaByDatatableColumn.

I can put up a PR for this.

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.

4 participants