elastic / kibana

Your window into the Elastic Stack
https://www.elastic.co/products/kibana
Other
19.76k stars 8.16k forks source link

[ES|QL] [Discover] Initialize the histogram breakdown with a contextual field #194549

Open stratoula opened 2 hours ago

stratoula commented 2 hours ago

Describe the feature:

Image

The Discover ES|QL mode allows the grouping of the histogram with a field. We would like to group by default for specific datasets. This breakdown field should come from an extension point. Right now it is hardcoded in Discover dataview mode and in my PoC here. In my PoC I initialize the breakdown with log.level if it exists. This needs to come from an extension point instead. So I am sharing this PoC mostly of giving an idea on how we can pass colorMapping information to the Lens embeddable and for the idea of the implementation. We should rely on this code though.

This is partially blocked by the custom sorting of xy charts https://github.com/elastic/elastic-charts/pull/2524 but there is an open PR for this already.

elasticmachine commented 2 hours ago

Pinging @elastic/kibana-data-discovery (Team:DataDiscovery)

stratoula commented 2 hours ago

I didnt add the blocked label because there is an open PR already and we can def start working on it without this feature.