F2 icon indicating copy to clipboard operation
F2 copied to clipboard

[F2] (Text Shape) 使用多行文本布局后的坐标轴标签在图表整体布局不正确

Open HuColin opened this issue 1 month ago • 0 comments

  • [ ] I have searched the issues of this repository and believe that this is not a duplicate.

Reproduction link

Edit on CodeSandbox

Steps to reproduce

对于超长的文本标签,使用 @antv/g 中的多行文本样式后,文本内容确实出现了换行,但是条形图的坐标轴区域宽度并没有因此缩小,导致图表左侧空置

<Axis field="x" style={{
  label: {
    wordWrap: true,
    wordWrapWidth: 38,
    textOverflow: 'ellipsis',
    maxLines: 2
  }
}} />
Environment Info
f2 5.4.5
System MacOS
Browser Chrome 124

HuColin avatar May 16 '24 11:05 HuColin