antvis / F2

📱📈An elegant, interactive and flexible charting library for mobile.

Home Page:https://f2.antv.vision/zh

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

HuColin opened this issue · 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