ant-design-charts icon indicating copy to clipboard operation
ant-design-charts copied to clipboard

🐛[BUG] colorField 中的项目如果包含“Ta”字符则会被缩略

Open sugia opened this issue 6 months ago • 0 comments

🐛 bug 描述 [详细地描述 bug,让大家都能理解]

colorField 其中一项为"Tax",因为包含有"Ta"字样,所以被缩略显示为"T...": image

📷 复现步骤 [清晰描述复现步骤,让别人也能看到问题]

请参考提供在下边第四栏的复现代码

🏞 期望结果 [描述你原本期望看到的结果]

"Tax"中的每个子母都能完整展现出来

💻 复现代码 [提供可复现的代码,仓库,或线上示例]

import { Column } from '@ant-design/plots'

function Example() {
  const dataVec = [{
      'year': '2024',
      'name': 'Tax',
      'value': 1000,
  }]

  const config = {
      data: dataVec,
      xField: 'year',
      yField: 'value',
      colorField: 'name',
      stack: true,
      axis: {
          y: { labelFormatter: '~s' },
          x: {
              labelSpacing: 4,
              style: {
                  labelTransform: 'rotate(90)',
              },
          },
      },
  }

  return (
    <Column {...config} />
  )
}

export default Example

© 版本信息

  • ant-design-charts 版本: [e.g. 0.9.0] "@ant-design/plots": "^2.2.8"

为什么是"@ant-design/plots"? 因为我们参考了官方样例:https://ant-design-charts.antgroup.com/examples/statistics/column/#stacked

  • 浏览器环境 Mozilla Firefox 129.0

  • 开发环境 [e.g. mac OS] Ubuntu 22.04.4 LTS

🚑 其他信息 [如截图等其他信息可以贴在这里]

sugia avatar Aug 12 '24 23:08 sugia