Skip to content

[legend] remove legend current values for categorical chart #2050

@markov00

Description

@markov00

Legend in cartesian charts can show the last value and the current hovered value at the right of the series name.
The concept of the last value is a bit blurry and needs to be fixed by #2044.
The concept of current is also good but needs to be explicitly configured in the chart and not mixed with the last one.

Both concepts can coexist but the legend clearly needs a title that specifies what value is currently shown there as specified here #2049.

In the meantime, after an investigation in Kibana, we come to the conclusion that we can safely remove the visibility of the current hovered value for categorical charts: all the usage of the extra value is correlated to the use of linear or time chart, and we are going to keep it even without the title label and is now an existing feature (will be improved with the title).
For categorical charts is not clear why there is no value by default (the "last" value doesn't actually exists, there can be an order, but is not explicit) but it is only shown when hovering over the chart.
This also create an empty white space in the legend to keep the space for the hovered chart, that in some case is not ideal.

We can reenable the current value in the legend for the categorical chart when both a title and the relative configuration are available and when can clearly describe an alternative "default" value when not hovering.

Notes:
The 24/05/2023 a decision was made by the Kibana Visualization Team (@markov00 , @stratoula) to disable representing current hovered values if the X scale is Ordinal. at Elastic this feature wasn't used and the the information was redundant because it was alredy available in the tooltip. A possible enhancement will probably update this configuration to allow current values if explicitly configured.

Metadata

Metadata

Assignees

No one assigned

    Labels

    :legendLegend related issueenhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions