You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
Currently, our legend can be configured to show a value. We internally call it extra and a hardcoded logic picks that value from the dataset only if that value coincides with the domain max.
This logic works well if the X domain is computed automatically from the dataset itself, but instead, if the domain is passed through the xDomain property of the Settings and the max doesn't correspond to the last value in your dataset then this value is not represented in the legend.
This is particularly evident in Kibana, where the time window is configured by the user in Lens and, due to the way time-picker works there are cases where the domain max will not coincide with the latest datapoint (see elastic/kibana#153079
There are a few problems here:
there is no proper definition of "last value", or "extra" and how it works
the semantic meaning of this "last value" is not clear to the user and to the consumer (we call it extra, we "internally" know that this represents an "elusive" last value but this is not explicit and is hard to understand).
There is no visual description in the Legend about the meaning of that value
This value can change meaning: when you are not hovering over a chart, the value represents this "last value" but when hovering over the chart it represents the current one. This behavior was inherited from TSVB. Its usage was to allow hovering over a chart and show the value in the legends of every cursor-synchronized chart without showing a tooltip for each chart.
renaming the legend extra to something more meaningful
refactor the logic to provide a way to customize this value through hardcoded functions and/or external functions.
design a way to describe that value in the legend (column title or something similar)
define and redesign, if necessary, the way the value is changed when hovering over the chart (probably we can disable that behavior when hovering over the chart owner of the legend)
Describe alternatives you've considered
There is already the possibility to fully customize the legend, by externalizing the rendering. This is a valid approach but includes additional steps for the developer
Exposing the legend as a set of composable components is a viable option too. This anyway doesn't fix the immediate needs of having a configurable value and a clean and meaningful API
Is your feature request related to a problem? Please describe.
Currently, our legend can be configured to show a value. We internally call it
extraand a hardcoded logic picks that value from the dataset only if that value coincides with the domain max.This logic works well if the X domain is computed automatically from the dataset itself, but instead, if the domain is passed through the
xDomainproperty of theSettingsand the max doesn't correspond to the last value in your dataset then this value is not represented in the legend.This is particularly evident in Kibana, where the time window is configured by the user in Lens and, due to the way time-picker works there are cases where the domain max will not coincide with the latest datapoint (see elastic/kibana#153079
There are a few problems here:
Describe the solution you'd like
Describe alternatives you've considered
Kibana Cross Issues
elastic/kibana#153079