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

[XY] Fixes percentage mode behavior when multiple metrics are placed on the same axis #121610

Merged
merged 12 commits into from
Jan 10, 2022

Conversation

stratoula
Copy link
Contributor

@stratoula stratoula commented Dec 20, 2021

Summary

Closes #121508
Closes #122496
This PR fixes the ratios that are computed for the percentage mode if multiple metrics are placed on the same axis.

image

With small multiples
image

With split series
image

Checklist

@stratoula stratoula changed the title Fix percentage xy [XY] Fixes percentage mode behavior when multiple metrics are placed on the same axis Dec 20, 2021
@stratoula stratoula added Feature:XYAxis XY-Axis charts (bar, area, line) release_note:fix v7.17.0 v8.0.0 v8.1.0 Team:Visualizations Visualization editors, elastic-charts and infrastructure labels Dec 20, 2021
@stratoula stratoula marked this pull request as ready for review December 21, 2021 18:05
@stratoula stratoula requested a review from a team as a code owner December 21, 2021 18:05
@elasticmachine
Copy link
Contributor

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

@stratoula
Copy link
Contributor Author

@elasticmachine merge upstream

Copy link
Contributor

@dej611 dej611 left a comment

Choose a reason for hiding this comment

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

Tested the PR against the previous 7.15.1 version and it's now fixed 👍

@stratoula
Copy link
Contributor Author

@elasticmachine merge upstream

@stratoula
Copy link
Contributor Author

@elasticmachine merge upstream

@stratoula
Copy link
Contributor Author

@elasticmachine merge upstream

@stratoula
Copy link
Contributor Author

@elasticmachine merge upstream

@stratoula
Copy link
Contributor Author

@elasticmachine merge upstream

@flash1293
Copy link
Contributor

@elasticmachine merge upstream

@flash1293
Copy link
Contributor

@stratoula Not sure whether that's a new bug or not, but in case of percentiles the percentage formatting is dropped (low priority issue):
Screenshot 2022-01-05 at 11 45 40
Screenshot 2022-01-05 at 11 45 29

@flash1293
Copy link
Contributor

@stratoula That would be great, thanks. Besides that it seems to work just fine 👍

@stratoula
Copy link
Contributor Author

@elasticmachine merge upstream

@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
visTypeXy 93 94 +1

Async chunks

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

id before after diff
visTypeXy 60.6KB 61.4KB +787.0B

History

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

@stratoula stratoula added the auto-backport Deprecated - use backport:version if exact versions are needed label Jan 10, 2022
@stratoula stratoula merged commit 2d41a34 into elastic:main Jan 10, 2022
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Jan 10, 2022
…on the same axis (elastic#121610)

* Fixes the stacked part for percentage mode

* Fixes the percentages mode

* Add unit tests

* Address performance related comment

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
(cherry picked from commit 2d41a34)
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Jan 10, 2022
…on the same axis (elastic#121610)

* Fixes the stacked part for percentage mode

* Fixes the percentages mode

* Add unit tests

* Address performance related comment

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
(cherry picked from commit 2d41a34)
@kibanamachine
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
8.0
7.17

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

kibanamachine added a commit that referenced this pull request Jan 10, 2022
…on the same axis (#121610) (#122546)

* Fixes the stacked part for percentage mode

* Fixes the percentages mode

* Add unit tests

* Address performance related comment

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
(cherry picked from commit 2d41a34)

Co-authored-by: Stratoula Kalafateli <efstratia.kalafateli@elastic.co>
kibanamachine added a commit that referenced this pull request Jan 10, 2022
…on the same axis (#121610) (#122547)

* Fixes the stacked part for percentage mode

* Fixes the percentages mode

* Add unit tests

* Address performance related comment

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
(cherry picked from commit 2d41a34)

Co-authored-by: Stratoula Kalafateli <efstratia.kalafateli@elastic.co>
gbamparop pushed a commit to gbamparop/kibana that referenced this pull request Jan 12, 2022
…on the same axis (elastic#121610)

* Fixes the stacked part for percentage mode

* Fixes the percentages mode

* Add unit tests

* Address performance related comment

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
auto-backport Deprecated - use backport:version if exact versions are needed Feature:XYAxis XY-Axis charts (bar, area, line) release_note:fix Team:Visualizations Visualization editors, elastic-charts and infrastructure v7.17.0 v8.0.0 v8.1.0
Projects
None yet
6 participants