Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛[BUG]甜甜圈图 radius 问题 #2732

Open
Likang0122 opened this issue Oct 14, 2024 · 0 comments
Open

🐛[BUG]甜甜圈图 radius 问题 #2732

Likang0122 opened this issue Oct 14, 2024 · 0 comments

Comments

@Likang0122
Copy link

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

当数据只有两条,并且值一样的时候,会有一个 radius 不生效,一边有圆角一边没有圆角

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

data数据为两条,并且值一样

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

圆角统一

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

import React from 'react';
import ReactDOM from 'react-dom';
import { Pie } from '@ant-design/plots';

const DemoPie = () => {
  const config = {
    data: [
      {
      "name": "<5",
      "value": 19912018
      },
      {
      "name": "5-9",
      "value": 19912018
      },
    ],
    angleField: 'value',
    colorField: 'name',
    legend: false,
    innerRadius: 0.6,
    style: {
      stroke: '#fff',
      inset: 1,
      radius: 10,
      minWidth:2,
    },
    scale: {
      color: {
        palette: 'spectral',
        offset: (t) => t * 0.8 + 0.1,
      },
    },
  };
  return <Pie {...config} />;
};

ReactDOM.render(<DemoPie />, document.getElementById('container'));

© 版本信息

  • ant-design-charts 版本: [e.g. 0.9.0]
  • 浏览器环境
  • 开发环境 [e.g. mac OS]

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

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant