elastic / elastic-charts

:bar_chart: Elastic Charts library
https://elastic.github.io/elastic-charts/storybook
Other
363 stars 115 forks source link

[Legend] Align bottom of legend to the zero axis #2442

Open mbondyra opened 1 month ago

mbondyra commented 1 month ago

The legend and legend table that is longer than the chart looks a bit weird going below the chart. We instead want to align it to zero axis.

Zight 2024-06-03 at 10 53 14 AM

_Originally posted by @gvnmagni in https://github.com/elastic/elastic-charts/pull/2426#discussion_r1617177549_

nickofthyme commented 1 month ago

Personally, I think this is a very low priority/impact.

Even if we did do this I'm sure it would be split between people liking it and others asking why the legend height is being truncated. Then you have to question what the top condition is like to match the bottom.

Besides the axis/legend sizing logic being very complex as it is.

We could revisit this idea when/if we move towards composable legends that are entirely separate from the chart and can be common across many charts, as mentioned in https://github.com/elastic/elastic-charts/issues/682.