Skip to content

Commit d945968

Browse files
committed
chore: add changeset for radar axis label clipping fix
1 parent 648e3ad commit d945968

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
'mermaid': patch
3+
---
4+
5+
fix(radar): align axis labels based on angular position to prevent clipping
6+
7+
Radar chart axis labels now set `text-anchor` and `dominant-baseline` dynamically based on each label's angular position around the chart. Labels on the left use `text-anchor: end`, labels on the right use `start`, and top/bottom labels use `middle`. This prevents long labels from extending past the SVG viewBox boundary and being clipped.
8+
9+
Also removed the hard-coded `text-anchor: middle` and `dominant-baseline: middle` from the `.radarAxisLabel` CSS class in `styles.ts`, since CSS rules override SVG presentation attributes and were silently defeating the per-label alignment fix. Added `overflow: visible` on the SVG element as a safety net, and a small pixel offset (`labelPad`) for extra breathing room.

0 commit comments

Comments
 (0)