-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[ES|QL] No data displays in ES|QL charts when user switches from table to a bar chart #184744
Comments
Pinging @elastic/kibana-visualizations (Team:Visualizations) |
Pinging @elastic/kibana-esql (Team:ESQL) |
This is not a bug although I do understand the confusion. If you see what is going on it adds the @timestamp in the horizontal axis but it the raw value (no date_truck or bucket used) so EC do not render the bars correectly ![]() @nickofthyme maybe you can explain why this happens. I think a warning in ase of raw timestamps is a good idea. We are already exploring this idea here #184205 Not sure if we need 2 issues to track this but I will let this to the viz team to decide |
@stratoula I believe this error on rendering is related to the fact that the The other problem, as linked by Stratoula relates to the fact that, to render bars we need to understand what is the bar width. We internally compute it as the minimum distance between consecutive time buckets (to avoid overlaps) but in this case it seems that the bar width is too small to be even visible. |
Interesting. Have you checked that or you are assuming from seeing the chart? |
@markov00 no, it remains a date field, something else is going wrong here. I guess it what I mention above but is better to check it too. But the field type is correct, I checked |
oh strange, so there is something else wrong because the axis style is definitely wrong |
From my tests the bug affects only non-stacked versions of the bar chart. kibana/src/plugins/chart_expressions/expression_xy/public/components/xy_chart.tsx Lines 672 to 675 in ab6ecdb
So the new time axis mode is not enabled, leaving to "simple" dates to render on the X-axis: kibana/src/plugins/chart_expressions/expression_xy/public/components/xy_chart.tsx Lines 677 to 678 in ab6ecdb
|
The root problem is this check: kibana/src/plugins/chart_expressions/expression_xy/public/components/xy_chart.tsx Lines 396 to 401 in ab6ecdb
When transitioning from table to Vertical Bar a breakdown dimension is automatically added to the Lens configuration, and that disables the new time axis. It's the equivalent for form-based configuration, the granularity of the date histogram here makes it just worse, where a bar is less than a pixel. |
@dej611 well done 👏 So this happens in DSL charts too, correct? |
I believe with a timestamp and a breakdown by a bar chart should always be shown as stacked bar, where instead a line/area chart can also be non-stacked by default. |
We never suggest it, Bhavya selected it from the chart switcher here |
I've created elastic/elastic-charts#2461 to handle that on chart side by rendering at least 1px wide bars |
Let's find a way to catch this before rendering and provide a suggestion to edit the query |
Why trying to suggest in the Lens level and not fix this elastic/elastic-charts#2461 which seems to me a better solution as it will apply to all charts? (this is not ES|QL specific case) |
Kibana version: 8.14.0 BC7
Browser version: chrome latest
Browser OS version: OS X
Original install method (e.g. download page, yum, from source, etc.): from staging
Describe the bug: If user switches from table to one of the bar charts on Create ES|QL visualization on a simple query like from kibana_sample_data_logs | limit 1000, Kibana displays empty panel.
Steps to reproduce:
Screenshots (if relevant):
no_data.mp4
The text was updated successfully, but these errors were encountered: