Open MichaelMarcialis opened 2 months ago
Pinging @elastic/kibana-visualizations (Team:Visualizations)
@stratoula is this chart only for ES|QL or also for the dataview mode?
Both! right @davismcphee ?
Scope for this issue: we need a bit more investigation to figure out how to solve this problem so we are repurposing this as a spike and time-boxing it to < 1 week
@stratoula correct! This is needed for both data view and ES|QL mode.
This functionality will be available in kibana when https://github.com/elastic/kibana/pull/195447 is merged.
https://github.com/elastic/kibana/pull/195447 is merged but this can be achieved today only through Lens override functions, that are not persisted into Lens nor into a Dashboard. I'd like to propose adding this feature in Lens by reusing the sorting order of the color mapping for rendering purposes too. The sorting order of the data is inherently connected to the breakdown. This should be part of the breakdown configuration, where you can specify the data sorting (not the ranking): usually you can specify it with asc/desc/numerical/alphabetical but you can also specify it via in a list/index of terms/values to follow. For now, we can probably also consider using the color mapping for that functionality, because it aligns with that concept. This can be applied on a request basis via a switch in the color mapping like the following example:
In the long run, probably these operations should be described in the "data processing" part of Lens and not connected to the data styling.
I'd like to propose adding this feature in Lens by reusing the sorting order of the color mapping for rendering purposes too.
@markov00: I agree that we should provide configuration controls for users to apply a custom order to their visualization breakdowns. However, I do have a few concerns about relegating that control to the color mapping interface:
Also, this related issue from Wylie seemed to indicate that there were use cases beyond just breakdowns.
Personally, my initial instinct is to add any sort of sorting controls at the global visualization level (i.e. toolbar menus), if we need to account for that multi-layer example I describe above. If we don't have to account for the multi-layer example, then at the root-level of the appropriate layer dimension's configuration flyout (i.e. not within the deeper color mapping configuration) would be my preference. Thoughts?
@MichaelMarcialis let's discuss this offline and understand what/where we can go
As part of the One Discover contextual logs effort, we would like to present a histogram of documents broken down by the
log.level
field. To make this information easier to interpret, it would be ideal if we could have greater control over the breakdown presentation order, allowing us to order the legend and breakdown stacking bylog.level
severity (see example in mockup below). As I understand it, this is currently not possible on either the Lens and Elastic Charts side.Related issue: https://github.com/elastic/kibana/issues/86184
CCing @stratoula, @teresaalvarezsoler, @nickofthyme.