Skip to content

[Lens] New legend inside chart can be more smart in terms of layout #106372

@dej611

Description

@dej611

Describe the feature:

The new Legend "inside chart" option in Lens ( #105571 ) offers a new Number of columns control which has been currently limited to 5 columns, preventing the user to create legends overflow for their values.

Screenshot 2021-07-21 at 11 50 35

While the current feature works, it strongly depends on the width of the category label, which can be relatively long, and the user has to manually check what is the best number to fit in there.

For instance in this case of IP values 5 columns is too much:

Screenshot 2021-07-21 at 11 49 00

I would propose a "smart" option for this case, where instead of Number of columns, the user can decide whether the legend should better use either the "Vertical space", or the "Horizontal space": this means that the chart library has to workout the best number of columns in order to display the values and make it harder to have it overflow, even for resized panels.

For instance in the case above with the IP addresses adopting the Horizontal space option should lead to a 4 column in that particular panel size. Resizing the panel should adjust it and probably reduce the columns to 3 and increase the number of rows to 3 as well.

What do you think @stratoula ? cc @markov00 @monfera

Metadata

Metadata

Assignees

No one assigned

    Labels

    Feature:LensTeam:VisualizationsTeam label for Lens, elastic-charts, Graph, legacy editors (TSVB, Visualize, Timelion) t//enhancementNew value added to drive a business resultimpact:mediumAddressing this issue will have a medium level of impact on the quality/strength of our product.

    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