-
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
[TSVB] Integrates the color service #93749
Conversation
@elasticmachine merge upstream |
@elasticmachine merge upstream |
@elasticmachine merge upstream |
@elasticmachine merge upstream |
@elasticmachine merge upstream |
@elasticmachine merge upstream |
|
||
const handlePaletteChange = (val) => { | ||
props.onChange({ | ||
split_color_mode: null, |
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.
In order to be backwards compatible I haven't removed the split_color_mode
. Otherwise, I had to write a migration script to get its value and use it as the palette name. I preferred to skip the migration script.
@elasticmachine merge upstream |
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.
src/plugins/vis_type_timeseries/public/application/visualizations/views/timeseries/index.js
Outdated
Show resolved
Hide resolved
@elasticmachine merge upstream |
@flash1293 thanx a lot for the review, I will look into your comments soonish. About the Old implementation New implementation I just saw that the mapping is not exactly the same - I will look into this - but I think that the current one is correct as I have created the same chart on the xy axis plugin and the color mapping is the same. |
Yeah, that's what I meant. I'm realizing this just now, but it looks like it's shifted by one and otherwise the same. |
@elasticmachine merge upstream |
@flash1293 I am fetching the palettes on the renderer as you proposed. About the other issues:
|
After syncing offline with Joe, we decided that we want the advanced setting |
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'm fine with that as well. If you do, could you leave a note here #68060 so this doesn't break once we clean up the handling in Lens? |
of course :) |
💚 Build Succeeded
Metrics [docs]Module Count
Async chunks
Page load bundle
History
To update your PR or re-run it, just comment with: |
* [TSVB] Integrates the color service * Fix i18n failure * Sync colors :) * Fix unit tests * Apply the multiple colors also for gauge * Fix * More unit tests * Cleanup * Be backwards compatible * Fetch palettesService on vis renderer * Fix eslint * Fix jest test * Fix color mapping for empty labels Co-authored-by: Kibana Machine <[email protected]>
* [TSVB] Integrates the color service * Fix i18n failure * Sync colors :) * Fix unit tests * Apply the multiple colors also for gauge * Fix * More unit tests * Cleanup * Be backwards compatible * Fetch palettesService on vis renderer * Fix eslint * Fix jest test * Fix color mapping for empty labels Co-authored-by: Kibana Machine <[email protected]> Co-authored-by: Kibana Machine <[email protected]>
Summary
Closes #93407
This PR integrates the new palette service to TSVB. TSVB uses three palettes to color the series when a user split the series by Terms. If the user changes the palette dropdown without having split the series by terms this setting is not applied. I kept the same logic in order to not introduce breaking changes.
The integration with the new service provides us the following advantages:
Note: I tried to be backwards compatible and avoid writing a migration script so the old key
split_color_mode
is kept and used to distinguish between the new and the old visualizations.TSVB with an EUI Palette:
Palette Picker with the existing gradient and rainbow palettes
Color sync on dashboard (TSVB and Lens charts):
Checklist
Delete any items that are not applicable to this PR.