-
Notifications
You must be signed in to change notification settings - Fork 8.5k
[PieVis] PartitionVis integration to Lens. #123937
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
[PieVis] PartitionVis integration to Lens. #123937
Conversation
# Conflicts: # src/plugins/chart_expressions/expression_pie/common/expression_functions/pie_vis_function.test.ts
…ptation # Conflicts: # src/plugins/chart_expressions/expression_pie/common/expression_functions/pie_labels_function.ts
|
Pinging @elastic/kibana-vis-editors @elastic/kibana-vis-editors-external (Team:VisEditors) |
|
@elasticmachine merge upstream |
flash1293
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested and didn't notice any problems except for the issue with changing/reordering dimensions.
@Kunzetsov I tested around a bit more and it's not only possible to run into this case on re-ordering the dimensions via drag and drop - it also happens e.g. on dragging in a new field.
I'm not feeling comfortable merging the PR this way even if we start working on a fix right away as it will break currently working behavior in subtle ways. For this PR, let's deploy a band-aid fix to be on the safe side:
In the pie expression building logic, use this piece of code to get the operations:
const operations = datasource
.getTableSpec()
.map((col) => col.columnId)
.filter((columnId) => layer.groups.includes(columnId))
.map((columnId) => ({ columnId, operation: datasource.getOperationForColumnId(columnId) }))
.filter((o): o is { columnId: string; operation: Operation } => !!o.operation);
It will ensure the order of the table is respected
As we've decided in the private conversation, I'll create the fix in a separate PR, merge it to the main, and only after that we'll come back to the current one. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
EDIT: I read Joe's comment after testing, it's the same issue, sorry for the noise I started some initial testing and noticed a bug on Lens with reordering. When reordering two dimensions, they get duplicated (in the chart, not in the dimension panel)
@mbondyra, no problem) |
|
@flash1293, @mbondyra, I'm close to finishing the fix of the current behavior at this PR: #125336 |
| export const VisualizationNoResults: FC<Props> = ({ hasNegativeValues = false, chartType }) => { | ||
| if (hasNegativeValues) { | ||
| return ( | ||
| <EuiText |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
EmptyPlaceholder component takes icon, message and dataTestSubj parameters so I think you can replace this code with using it directly (you'd have to add iconType or something like this though). What do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mbondyra, updated the code, according to your proposition. Thanks for the suggestion)
# Conflicts: # x-pack/plugins/lens/public/pie_visualization/to_expression.ts # x-pack/plugins/lens/public/pie_visualization/visualization.tsx
|
@flash1293, tested on this branch. Working as expected. Screen.Recording.2022-02-11.at.16.25.30.mov |
mbondyra
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested on Chrome and works as expected. I found some minor issues while testing with pie not related to this feature, but reproduced all on main branch so I'll just create new issues. Approved, code LGTM 👌🏼 Amazing job!
|
@elastic/security-asset-management @elastic/kibana-design, could you, please, review this PR. Thanks. |
|
@elasticmachine merge upstream |
|
@elasticmachine merge upstream |
|
@elastic/security-asset-management, could you, please, review this PR?) Thanks) |
|
@elasticmachine merge upstream |
|
@elasticmachine merge upstream |
💛 Build succeeded, but was flakyMetrics [docs]Module Count
Public APIs missing comments
Async chunks
Public APIs missing exports
Page load bundle
History
To update your PR or re-run it, just comment with: cc @Kunzetsov |
patrykkopycinski
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Asset management LGTM

Summary
Completes part of #121725 and #95902.
lens_pieexpression andlens_pie_renderer.lens_pie_renderer.lens_piewithpieVis/mosaicVis/treemapVis/waffleVisexpressions.