Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Limit the automatic legend size to a set of static values #1616

Open
markov00 opened this issue Mar 2, 2022 · 0 comments
Open

Limit the automatic legend size to a set of static values #1616

markov00 opened this issue Mar 2, 2022 · 0 comments
Labels
:all Applies to all chart types enhancement New feature or request kibana cross issue Has a Kibana issue counterpart :legend Legend related issue

Comments

@markov00
Copy link
Member

markov00 commented Mar 2, 2022

Is your feature request related to a problem? Please describe.
When showing multiple charts in a dashboard, it's hard to align the charts together due to various factors:

  • the legend size depends on the content
  • the chart area depends on the axes contents

Due to this content dependency, a nice alignment is hard to achieve. We already have add the ability to manually configure the legend width/height but we can improve it.

Describe the solution you'd like
The theme should support adding a set of values to which the legend should snap when computing its size automatically.
If we consider something like: [50, 100, 150, 200] in pixels, the resulting legend width should be the minimum value in this array that can contain the labels, or the biggest value if overflows it.

This is similar to this feature but for legend

Kibana Cross Issues
elastic/kibana#126018

@markov00 markov00 added enhancement New feature or request kibana cross issue Has a Kibana issue counterpart :legend Legend related issue :all Applies to all chart types labels Mar 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:all Applies to all chart types enhancement New feature or request kibana cross issue Has a Kibana issue counterpart :legend Legend related issue
Projects
None yet
Development

No branches or pull requests

1 participant