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] Tiny.ring config类型未引入 #2486

Open
Dawn1Ocean opened this issue Apr 6, 2024 · 1 comment
Open

🐛[BUG] Tiny.ring config类型未引入 #2486

Dawn1Ocean opened this issue Apr 6, 2024 · 1 comment

Comments

@Dawn1Ocean
Copy link

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

image

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

image
image

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

image

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

import { Tiny } from '@ant-design/charts';
import { PageContainer, ProCard, StatisticCard } from '@ant-design/pro-components';
import { Card, Statistic } from 'antd';
import RcResizeObserver from 'rc-resize-observer';
import { useState } from 'react';

const percentRing = (percent: number, frontColor: string): React.JSX.Element => {
  const config = {
    percent: percent / 100,
    width: 120,
    height: 120,
    color: ['#E8EFF5', frontColor],
    annotations: [
      {
        type: 'text',
        style: {
          text: `${percent}%`,
          x: '50%',
          y: '50%',
          textAlign: 'center',
          fontSize: 16,
          fontStyle: 'bold',
        },
      },
    ],
  };

  return <Tiny.Ring {...config} />;
};

© 版本信息

  • ant-design-charts 版本: [2.0.3]
  • 浏览器环境
  • 开发环境 [Arch Linux]

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

@lxfu1
Copy link
Member

lxfu1 commented May 7, 2024

感觉是TS解析的问题,可以 // @ts-ignore 先忽略一下

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

2 participants