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

Partition legend width is not considering legendMaxDepth #639

Closed
wylieconlon opened this issue Apr 20, 2020 · 1 comment · Fixed by #654 or elastic/kibana#69126
Closed

Partition legend width is not considering legendMaxDepth #639

wylieconlon opened this issue Apr 20, 2020 · 1 comment · Fixed by #654 or elastic/kibana#69126
Assignees
Labels
bug Something isn't working :legend Legend related issue :partition Partition/PieChart/Donut/Sunburst/Treemap chart related released Issue released publicly

Comments

@wylieconlon
Copy link

wylieconlon commented Apr 20, 2020

I noticed this based on data that I was using in Lens, but this can be reproduced in the storybooks.

When I add a legend and legendMaxDepth={1} to to 8_sunburst_two_layers.tsx, the legend is given the exact same width as when legendMaxDepth is not set, which fits the largest country name in the list:

<Settings showLegend={true} legendMaxDepth={1} />

This wastes space, as seen in the screenshot:

Screenshot 2020-04-20 14 54 46

@wylieconlon wylieconlon added bug Something isn't working :legend Legend related issue :partition Partition/PieChart/Donut/Sunburst/Treemap chart related labels Apr 20, 2020
@markov00 markov00 self-assigned this Apr 28, 2020
markov00 added a commit to markov00/elastic-charts that referenced this issue Apr 28, 2020
On partition chart we should compute the legend size only for the elements actually rendered, so
everything below the legendMaxDepth if used

fix elastic#639
markov00 added a commit that referenced this issue May 26, 2020
The legend size in partition charts take in consideration the `legendMaxDepth` value if present.

fix #639
markov00 pushed a commit that referenced this issue May 28, 2020
# [19.4.0](v19.3.0...v19.4.0) (2020-05-28)

### Bug Fixes

* **partition:** consider legendMaxDepth on legend size ([#654](#654)) ([9429dcf](9429dcf)), closes [#639](#639)

### Features

* **partition:** enable grooves in all group layers ([#666](#666)) ([f5b4767](f5b4767))
* **partition:** linked text overflow avoidance ([#670](#670)) ([b6e5911](b6e5911)), closes [#633](#633)
* **partition:** monotonic font size scaling ([#681](#681)) ([ea2489b](ea2489b)), closes [#661](#661)
* **tooltip:** improve positioning with popperjs ([#651](#651)) ([6512950](6512950)), closes [#596](#596)
@markov00
Copy link
Member

🎉 This issue has been resolved in version 19.4.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@markov00 markov00 added the released Issue released publicly label May 28, 2020
AMoo-Miki pushed a commit to AMoo-Miki/OpenSearch-Dashboards that referenced this issue Feb 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working :legend Legend related issue :partition Partition/PieChart/Donut/Sunburst/Treemap chart related released Issue released publicly
Projects
None yet
2 participants