You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug] [Treemap] Label vertical alignment is broken when style.height is set by beforeUpdate with lineOverflow: 'truncate' #21673
Suggested fix
The core issue is that style.height serves dual purposes:
Truncation boundary (intended)
outerHeight for vertical alignment (unintended side effect)
Possible approaches:
In parseRichText, use contentHeight (actual text height) for outerHeight instead of style.height, and only use style.height for truncation
Or: provide the truncated labelRect.height to the labelLayout callback (compute it after beforeUpdate)
Or: in TreemapView.beforeUpdate, don't set style.height — use a separate property for truncation boundary
small blocks are significantly misaligned — they appear near the top of the block or offset, not centered.
It seems this is by design, same in current v.6. Label legibility is given priority over positioning. It's better to see partial labels of small blocks than not see them at all if centered. Demo - t2 is a small block with a vertically truncated label; clicking on t11 or t66 above will give more space to t2 block and show the entire label.
The root cause is in zrender's — was using (the truncation boundary) instead of the actual rendered text height. Fixed in ecomfe/zrender#1166 — / is now used for , while continues to serve only as the truncation boundary.
Activity
helgasoft commentedon Jul 4, 2026
It seems this is by design, same in current v.6. Label legibility is given priority over positioning. It's better to see partial labels of small blocks than not see them at all if centered.
Demo - t2 is a small block with a vertically truncated label; clicking on t11 or t66 above will give more space to t2 block and show the entire label.
waterWang commentedon Aug 11, 2026
The root cause is in zrender's — was using (the truncation boundary) instead of the actual rendered text height. Fixed in ecomfe/zrender#1166 — / is now used for , while continues to serve only as the truncation boundary.