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.
Describe the feature:
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.