-
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
[Lens][Agg based XY] Convert to Lens Agg based XY. #142936
[Lens][Agg based XY] Convert to Lens Agg based XY. #142936
Conversation
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.
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.
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.
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.
@stratoula I've checked this. We get color from uiState by series name and this logic is located in chart-expressions/expression-xy. cc @flash1293 |
@stratoula Also we should check the mode because each metric can has its own mode (normal/stacked). Only if chart type and mode is the same theoretically we can put in in one layer. In addition we should not forget about these conditions too:
it means - metric with line stacked and metric with area stacked should be converted in one layer? @flash1293 what do you think about that? |
All these comments are things that I find weird as a user or that I expect to work differently.
|
Thanks for discussing these points. My takes:
|
@flash1293 It's not so easy we don't just use series name from vis params. We generate it based on accessors and titles. |
…the same chart type and mode
Done
Done @flash1293 , @stratoula Could you please check it? |
@VladLasitsa about the color. I get that you don't have the information needed by the getSeriesName to find the color as we do on the data layers file. But maybe you can find the color with the data we already have. I was playing with it and I see the following pattern: The name can be
I think it is possible to find the color with the above information. |
Thank you, I got it, Done. Could you please review? |
Thanx Vlad, the fixes look awesome. Can you also fix the issue mentioned by Joe here? #142936 (comment) |
@stratoula, It's a that block case: |
Personally I would still allow the transition and order the breakdown by the metric. @flash1293 wdyt? I am also fine on blocking this for this scenario but we should def allow it in case of the same layer. |
@stratoula Now we can convert terms with order by existing metric if all metrics in the same layer. cc @flash1293 |
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.
This looks good to me now. LGTM
💚 Build Succeeded
Metrics [docs]Module Count
Public APIs missing comments
Async chunks
Page load bundle
Unknown metric groupsAPI count
async chunk count
History
To update your PR or re-run it, just comment with: cc @VladLasitsa |
## Summary Adds the 8.6 for the following: - #140878, #143946 and #142187 [Doc preview](https://kibana_146471.docs-preview.app.elstc.co/guide/en/kibana/master/tsvb.html#edit-visualizations-in-lens) - #142936, #142561, #143820, and #142838 [Doc preview](https://kibana_146471.docs-preview.app.elstc.co/guide/en/kibana/master/add-aggregation-based-visualization-panels.html#edit-agg-based-visualizations-in-lens) - #138732 [Doc preview](https://kibana_146471.docs-preview.app.elstc.co/guide/en/kibana/master/lens.html#change-the-fields) - #141626 and #141615 [Doc preview](https://kibana_146471.docs-preview.app.elstc.co/guide/en/kibana/master/lens.html#add-annotations) Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> Co-authored-by: Stratoula Kalafateli <stratoula1@gmail.com>
## Summary Adds the 8.6 for the following: - elastic#140878, elastic#143946 and elastic#142187 [Doc preview](https://kibana_146471.docs-preview.app.elstc.co/guide/en/kibana/master/tsvb.html#edit-visualizations-in-lens) - elastic#142936, elastic#142561, elastic#143820, and elastic#142838 [Doc preview](https://kibana_146471.docs-preview.app.elstc.co/guide/en/kibana/master/add-aggregation-based-visualization-panels.html#edit-agg-based-visualizations-in-lens) - elastic#138732 [Doc preview](https://kibana_146471.docs-preview.app.elstc.co/guide/en/kibana/master/lens.html#change-the-fields) - elastic#141626 and elastic#141615 [Doc preview](https://kibana_146471.docs-preview.app.elstc.co/guide/en/kibana/master/lens.html#add-annotations) Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> Co-authored-by: Stratoula Kalafateli <stratoula1@gmail.com> (cherry picked from commit f918a37)
# Backport This will backport the following commits from `main` to `8.6`: - [Adds the VisEditor docs for 8.6 (#146471)](#146471) <!--- Backport version: 8.9.7 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Kaarina Tungseth","email":"kaarina.tungseth@elastic.co"},"sourceCommit":{"committedDate":"2022-12-08T20:18:03Z","message":"Adds the VisEditor docs for 8.6 (#146471)\n\n## Summary\r\n\r\nAdds the 8.6 for the following:\r\n\r\n- #140878, #143946 and #142187\r\n\r\n[Doc\r\npreview](https://kibana_146471.docs-preview.app.elstc.co/guide/en/kibana/master/tsvb.html#edit-visualizations-in-lens)\r\n\r\n- #142936, #142561, #143820, and #142838\r\n\r\n[Doc\r\npreview](https://kibana_146471.docs-preview.app.elstc.co/guide/en/kibana/master/add-aggregation-based-visualization-panels.html#edit-agg-based-visualizations-in-lens)\r\n\r\n- #138732\r\n \r\n[Doc\r\npreview](https://kibana_146471.docs-preview.app.elstc.co/guide/en/kibana/master/lens.html#change-the-fields)\r\n\r\n- #141626 and #141615\r\n \r\n[Doc\r\npreview](https://kibana_146471.docs-preview.app.elstc.co/guide/en/kibana/master/lens.html#add-annotations)\r\n\r\nCo-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>\r\nCo-authored-by: Stratoula Kalafateli <stratoula1@gmail.com>","sha":"f918a3745be3badff9cf05950db61d7f47877961","branchLabelMapping":{"^v8.7.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Team:Docs","release_note:skip","v8.6.0","v8.7.0"],"number":146471,"url":"https://github.com/elastic/kibana/pull/146471","mergeCommit":{"message":"Adds the VisEditor docs for 8.6 (#146471)\n\n## Summary\r\n\r\nAdds the 8.6 for the following:\r\n\r\n- #140878, #143946 and #142187\r\n\r\n[Doc\r\npreview](https://kibana_146471.docs-preview.app.elstc.co/guide/en/kibana/master/tsvb.html#edit-visualizations-in-lens)\r\n\r\n- #142936, #142561, #143820, and #142838\r\n\r\n[Doc\r\npreview](https://kibana_146471.docs-preview.app.elstc.co/guide/en/kibana/master/add-aggregation-based-visualization-panels.html#edit-agg-based-visualizations-in-lens)\r\n\r\n- #138732\r\n \r\n[Doc\r\npreview](https://kibana_146471.docs-preview.app.elstc.co/guide/en/kibana/master/lens.html#change-the-fields)\r\n\r\n- #141626 and #141615\r\n \r\n[Doc\r\npreview](https://kibana_146471.docs-preview.app.elstc.co/guide/en/kibana/master/lens.html#add-annotations)\r\n\r\nCo-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>\r\nCo-authored-by: Stratoula Kalafateli <stratoula1@gmail.com>","sha":"f918a3745be3badff9cf05950db61d7f47877961"}},"sourceBranch":"main","suggestedTargetBranches":["8.6"],"targetPullRequestStates":[{"branch":"8.6","label":"v8.6.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.7.0","labelRegex":"^v8.7.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/146471","number":146471,"mergeCommit":{"message":"Adds the VisEditor docs for 8.6 (#146471)\n\n## Summary\r\n\r\nAdds the 8.6 for the following:\r\n\r\n- #140878, #143946 and #142187\r\n\r\n[Doc\r\npreview](https://kibana_146471.docs-preview.app.elstc.co/guide/en/kibana/master/tsvb.html#edit-visualizations-in-lens)\r\n\r\n- #142936, #142561, #143820, and #142838\r\n\r\n[Doc\r\npreview](https://kibana_146471.docs-preview.app.elstc.co/guide/en/kibana/master/add-aggregation-based-visualization-panels.html#edit-agg-based-visualizations-in-lens)\r\n\r\n- #138732\r\n \r\n[Doc\r\npreview](https://kibana_146471.docs-preview.app.elstc.co/guide/en/kibana/master/lens.html#change-the-fields)\r\n\r\n- #141626 and #141615\r\n \r\n[Doc\r\npreview](https://kibana_146471.docs-preview.app.elstc.co/guide/en/kibana/master/lens.html#add-annotations)\r\n\r\nCo-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>\r\nCo-authored-by: Stratoula Kalafateli <stratoula1@gmail.com>","sha":"f918a3745be3badff9cf05950db61d7f47877961"}}]}] BACKPORT--> Co-authored-by: Kaarina Tungseth <kaarina.tungseth@elastic.co>
Completes part of #138236
Summary
As part of phasing out TSVB and Visualize all Legacy agg based visulizations should support "open in lens" functionality.
In that PR converter for Agg based XY was added.
Some conversion remarks:
Some block cases:
y
andterms
aggregation uses one of them asorder by