-
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
[Fix] The overwritten series color from the legend is not visible when I create a visualization from a dashboard #93435
Conversation
…t visible when I create a visualization from a dashboard --no-verify
@elasticmachine merge upstream |
@elasticmachine merge upstream |
Pinging @elastic/kibana-app (Team:KibanaApp) |
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.
Glad that you covered this, thanks Stratoula!
The jest tests are looking great
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.
I tested this PR and didn't find that it solved the problem for me. Steps to reproduce:
- Open an empty dashboard
- Click "add panel" and choose area chart
- Split series using terms aggregation, then add the X axis date histogram
- Save to dashboard
- Edit one of the colors from the dashboard
- Edit the visualization
The colors aren't shown in the visualization in this case.
@wylieconlon the colors that are changed by the dashboard and not by the visualization are saved on the dashboard and not on the visualization. The uiState from the dashboard is going to be deprecated by the way. This PR solves the problem when the user changes the colors from the visualization. The behavior that you describe is intended. |
@stratoula that feels pretty unintuitive to me, but I won't block this PR for it- it definitely works from visualization to dashboard, but not the other way. cc @ThomThomson for this weird behavior |
I won't disagree on that :) it is but I assume this is one of the reasons the presentation team wants to remove it and give a better UX to the users |
@wylieconlon, this absolutely does have to be removed, and is tracked in: #88712 Unfortunately, it will be a minor breaking change because users will lose all color customizations stored in dashboards. |
@elasticmachine merge upstream |
💚 Build SucceededMetrics [docs]Async chunks
History
To update your PR or re-run it, just comment with: |
LGTM, tested on Chrome 🆗 |
…n I create a visualization from a dashboard (elastic#93435) * [Visualizations] Fixes the overwritten series color from legend is not visible when I create a visualization from a dashboard --no-verify * Remove unecessary code * Fix types Co-authored-by: Kibana Machine <[email protected]>
…n I create a visualization from a dashboard (elastic#93435) * [Visualizations] Fixes the overwritten series color from legend is not visible when I create a visualization from a dashboard --no-verify * Remove unecessary code * Fix types Co-authored-by: Kibana Machine <[email protected]>
…n I create a visualization from a dashboard (#93435) (#93905) * [Visualizations] Fixes the overwritten series color from legend is not visible when I create a visualization from a dashboard --no-verify * Remove unecessary code * Fix types Co-authored-by: Kibana Machine <[email protected]> Co-authored-by: Kibana Machine <[email protected]>
…n I create a visualization from a dashboard (#93435) (#93906) * [Visualizations] Fixes the overwritten series color from legend is not visible when I create a visualization from a dashboard --no-verify * Remove unecessary code * Fix types Co-authored-by: Kibana Machine <[email protected]> Co-authored-by: Kibana Machine <[email protected]>
Summary
Fixes #93379
This bug occurs only when the
dashboard.allowByValueEmbeddables: true
.If the user creates a visualization from the dashboard and overwrites the series color from the legend, the color is depicted on the dashboard. But when the user chooses to edit the visualization from the dashboard, the change is not depicted. It seems that while the uiState is saved correctly is not populated on the saved visualization, which results in the bug.
This PR fixes the bug, and also I have added a unit test for the
getVisualizationInstanceFromInput
method.Checklist