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

🤔 [QUESTION] 关于扇形仪表盘FanGauge #3755

Open
well-he opened this issue Mar 25, 2024 · 0 comments
Open

🤔 [QUESTION] 关于扇形仪表盘FanGauge #3755

well-he opened this issue Mar 25, 2024 · 0 comments
Labels
Question Further information is requested

Comments

@well-he
Copy link

well-he commented Mar 25, 2024

🐛 Question description [Please make everyone to understand it]

我在文档中看到有扇形仪表盘FanGauge,在使用过程中发现 模块“"@antv/g2plot"”没有导出的成员“FanGauge”

💻 Link to minimal reproduction

Please provide a link by forking these links g2plot or GitHub repo. What is a minimal reproduction, and why is it required?

import { FanGauge } from "@antv/g2plot";    // 模块“"@antv/g2plot"”没有导出的成员“FanGauge”。

const DemoGauge: React.FC<{ value: number }> = ({ value }) => {
  const containerRef = useRef<HTMLDivElement>(null);
  useEffect(()=>{
    const container = containerRef.current;
    const config = {
      title: {
        visible: true,
        text: '扇形仪表盘',
      },
      width: 400,
      height: 400,
      value: value,
      min: 0,
      max: 100,
      range: [0, 70],
      format: (v) => {
        return v + '%';
      },
      color: ['l(0) 0:#b0d0ff 1:#5f92f9'],
    }
    const fanGauge = new FanGauge(container, config);
    fanGauge.render();

    return () => {
      fanGauge.destroy();
    }
  })

  return <div ref={containerRef} />;
};

🏞 Expected result

image

🚑 Any additional [like screenshots]

  • G2Plot Version: "@antv/g2plot": "^2.4.31",
  • Platform: window11
@well-he well-he added the Question Further information is requested label Mar 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant