elastic-charts
elastic-charts copied to clipboard
Hide labels that do not fit into treemap partition than truncate them
Mosaic can be configured to show many categories at once, sometimes leading to short "slices" that cannot fit the entire label:
In these cases I think it makes sense to apply the same hiding logic used for XY labels.
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.
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.
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)