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] Fixes bug on XY charts with empty data, a breakdown and a reference layer #131922

Merged
merged 2 commits into from
May 11, 2022

Conversation

stratoula
Copy link
Contributor

@stratoula stratoula commented May 10, 2022

Summary

Closes #131793

Check the issue to replicate the bug.

Although the error is fixed when I added the ? on

const xColumnId = firstTable.columns.find((col) => col.id === dataLayers[0]?.xAccessor)?.id;

I see the No data to display message from EC.
Screenshot 2022-05-10 at 4 48 12 PM

I think that we want to render the Lens empty chart placeholder so I fixed that by changing the condition for rendering this placeholder. It used to be if (filteredLayers.length === 0) { but the filteredLayers can contain only the referenceLine layer even if the dataLayer is absent.

I think that the correct check here is the dataLayers.

So now it is displayed as:
image

Checklist

@stratoula stratoula changed the title [Lens] Fixes bug with empty data and a reference line [Lens] Fixes bug on XY charts with empty data, a breakdown and a reference layer May 10, 2022
@stratoula stratoula added Team:Visualizations Visualization editors, elastic-charts and infrastructure release_note:skip Skip the PR/issue when compiling release notes Feature:Lens backport:skip This commit does not require backporting v8.3.0 labels May 10, 2022
@stratoula stratoula marked this pull request as ready for review May 10, 2022 15:12
@stratoula stratoula requested a review from a team as a code owner May 10, 2022 15:12
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-vis-editors @elastic/kibana-vis-editors-external (Team:VisEditors)

@flash1293
Copy link
Contributor

@elasticmachine merge upstream

Copy link
Contributor

@flash1293 flash1293 left a comment

Choose a reason for hiding this comment

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

Tested all the combinations, works as expected

@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
expressionXY 55.9KB 55.9KB +10.0B

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

@stratoula stratoula merged commit 63f2d66 into elastic:main May 11, 2022
academo pushed a commit to academo/kibana that referenced this pull request May 12, 2022
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:skip This commit does not require backporting Feature:Lens release_note:skip Skip the PR/issue when compiling release notes Team:Visualizations Visualization editors, elastic-charts and infrastructure v8.3.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Lens] Empty chart with breakdown and with reference line throws an error
5 participants