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

Inconsistent placement of fillLabel #599

Open
Tracked by #1902
cchaos opened this issue Mar 23, 2020 · 3 comments
Open
Tracked by #1902

Inconsistent placement of fillLabel #599

cchaos opened this issue Mar 23, 2020 · 3 comments
Labels
enhancement New feature or request :partition Partition/PieChart/Donut/Sunburst/Treemap chart related

Comments

@cchaos
Copy link
Contributor

cchaos commented Mar 23, 2020

Describe the issue
There doesn't seem to be a consistent placement of labels inside of pie, donut, treemap charts.

Desired behavior
I'd expect them all to appear to be in a consistent place with the consumer able to specify a region like "center", "top left", etc...

Screenshots
Screen Shot on 2020-03-23 at 16:29:50

@cchaos cchaos added the bug Something isn't working label Mar 23, 2020
@monfera
Copy link
Contributor

monfera commented Mar 23, 2020

There are two kinds of sectors: horizontal for better readability in wider sectors, and radial in case of narrow sectors. There's an iteration that tries to maximize readability via largest fitting font size, up to the maximum allowed font size which is relatively small here.

As your examples show, there's plenty of room for improvement, we should circle back to this. Unfortunately, increasing the consistency of the location, while keeping to the possible font maximization logic is not a quick fix: here the layout is a bit underconstrained as the maximum font size is fairly small, so it's kinda loose in the shape, it'll need a bit of thinking and refinement.

@monfera
Copy link
Contributor

monfera commented Mar 23, 2020

Also, maybe it's possible to classify it as an improvement opportunity rather than a bug, especially that fill text for sunburst, and treemaps in general are new features and our text layout is more refined than what's available in other tools, so the above placement inconsistencies don't feel like a blocker.

@monfera monfera self-assigned this Mar 23, 2020
@markov00 markov00 changed the title Inconsistent placement of fillLabels Inconsistent placement of fillLabel Mar 26, 2020
@markov00 markov00 added enhancement New feature or request and removed bug Something isn't working labels Mar 26, 2020
@markov00 markov00 added the :partition Partition/PieChart/Donut/Sunburst/Treemap chart related label Mar 26, 2020
monfera added a commit that referenced this issue Apr 30, 2020
Puts treemap text for groups into top grooves. Treemap texts are left-aligned and brought to top (groove texts are on the bottom). Also, font min/max sizes can be configured per Layer. 
Addresses the treemap part of #599 and contributes to solving a few items in #612

fix #611
@monfera
Copy link
Contributor

monfera commented Apr 30, 2020

Hi @cchaos #652 should address the treemap part of this issue. Having said that, there's opportunity for improvement, maye slightly more or configurable text padding is needed, the current one maxes out the rectangular area for text.

The sunburst part is also not that trivial to do - I think many or most of what you suggest there are fairly straightforward, but need time to implement properly, so it should be subject to planning and prioritization so we work through issues in the best sequence.

AMoo-Miki pushed a commit to AMoo-Miki/OpenSearch-Dashboards that referenced this issue Feb 10, 2022
Puts treemap text for groups into top grooves. Treemap texts are left-aligned and brought to top (groove texts are on the bottom). Also, font min/max sizes can be configured per Layer. 
Addresses the treemap part of elastic/elastic-charts#599 and contributes to solving a few items in elastic/elastic-charts#612

fix elastic/elastic-charts#611
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request :partition Partition/PieChart/Donut/Sunburst/Treemap chart related
Projects
None yet
Development

No branches or pull requests

3 participants