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

Palette by terms #119735

Closed
wants to merge 32 commits into from
Closed

Palette by terms #119735

wants to merge 32 commits into from

Conversation

stratoula
Copy link
Contributor

@stratoula stratoula commented Nov 25, 2021

Summary

Investigation for #119137 and #101942

This PR tries to address two features:

  • Give the users the ability to create custom palettes by applying a specific color to a specific term
  • Save their custom palettes (either terms or stops palettes) and reuse them

Color terms palettes

The UI follows the Color stops UI. The user has a list of the terms being displayed to the chart and can give whatever color they want. The changes are immediately being displayed in the chart.
image

  • if there are some terms in common, it will color the same terms with the predefined colors and will give random colors of the same palette to the rest
  • If there is no term in common, it will color the terms with random colors of the user-created palette
    image

Save palettes

There are cases that the user would like to save a palette to reuse it either on the same visualization or in another. For example. creating a color stops ui might take some time and if the user wants to apply the same configuration to other visualizations, this means that she has to re-apply everything.
This PR creates a new SO type, the palette. In my PoC, I have two types of palettes, the terms and the stops palettes. The stops palettes are created/used by table and heatmap while the terms palettes by xy and partition charts.

image

After being said a palette can be used to another chart.
image

Checklist

@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

@kibana-ci
Copy link
Collaborator

kibana-ci commented Dec 16, 2021

💔 Build Failed

Failed CI Steps

Test Failures

  • [job] [logs] Default CI Group #4 / lens app lens color palette tests should allow to pick color palette in xy chart
  • [job] [logs] Default CI Group #4 / lens app lens color palette tests should allow to pick color palette in xy chart
  • [job] [logs] OSS Misc Functional Tests / runPipeline basic visualize loader pipeline expression tests reusing partial results does some screenshot comparisons
  • [job] [logs] OSS Misc Functional Tests / runPipeline basic visualize loader pipeline expression tests reusing partial results does some screenshot comparisons

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
lens 708 713 +5

Public APIs missing comments

Total count of every public API that lacks a comment. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats comments for more detailed information.

id before after diff
charts 282 288 +6
lens 245 252 +7
total +13

Async chunks

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

id before after diff
charts 41.8KB 42.0KB +207.0B
lens 1018.4KB 1.0MB +16.9KB
total +17.1KB

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
charts 58.0KB 58.4KB +357.0B
lens 40.9KB 41.0KB +61.0B
total +418.0B

Saved Objects .kibana field count

Every field in each saved object type adds overhead to Elasticsearch. Kibana needs to keep the total field count below Elasticsearch's default limit of 1000 fields. Only specify field mappings for the fields you wish to search on or query. See https://www.elastic.co/guide/en/kibana/master/development-plugin-saved-objects.html#_mappings

id before after diff
palette - 4 +4
Unknown metric groups

API count

id before after diff
charts 314 320 +6
lens 262 269 +7
total +13

History

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants