elastic-charts icon indicating copy to clipboard operation
elastic-charts copied to clipboard

Hide labels that do not fit into treemap partition than truncate them

Open dej611 opened this issue 10 months ago • 3 comments

Mosaic can be configured to show many categories at once, sometimes leading to short "slices" that cannot fit the entire label:

Screenshot 2024-03-27 at 14 49 15

In these cases I think it makes sense to apply the same hiding logic used for XY labels.

dej611 avatar Mar 27 '24 13:03 dej611

What would be the benefit if I hide some labels? in XY the labels overlaps on other categories (that is something we are also going to replace with wrap/multi-line). Here I kindly suggest not to make labels protrude onto other groups to avoid misunderstanding.

The example charts can definitely be revisited as a horizontal bar chart that for sure improves the data readability. Mosaic is not meant for such a high number of categories, probably 3/4 max 5 columns are the max to have a good understanding of the underlying data.

markov00 avatar Mar 29 '24 14:03 markov00

Horizontal bar require a vertical layout which is not always available. I see a heatmap-like visualization to be something that overlaps this specific scenario, but in heatmap case the legend is showing already values-color coding mapping.

dej611 avatar Mar 29 '24 14:03 dej611

One little concern that I have is that if we only rely on the legend we could potentially have multiple series with the same color since we are looping colors. I know that it is clearly not ideal to have label that are so little that are unreadable, but that should be a clue for the user that the chart might have some issues.

I am afraid that legend alone might be unclear (two identical greens for example)

gvnmagni avatar Apr 04 '24 12:04 gvnmagni