8000 [Bug] load gauge chart on-demand has error thrown · Issue #3836 · VisActor/VChart · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
[Bug] load gauge chart on-demand has error thrown #3836
Closed
@xiaoluoHe

Description

@xiaoluoHe

Version

latest

Link to Minimal Reproduction

none

Steps to Reproduce

import * as React from "react";

import {
  VChart,
  registerGaugeChart,
} from "@visactor/vchart";

VChart.useRegisters([registerGaugeChart]);

const spec = {
  type: "gauge",
  data: [
    {
      id: "id0",
      values: [
        {
          type: "目标A",
          value: 0.6,
        },
      ],
    },
  ],
  categoryField: "type",
  valueField: "value",
  outerRadius: 0.8,
  innerRadius: 0.5,
  startAngle: -180,
  endAngle: 0,
};
const App = () => {
  React.useEffect(() => {
    const chart = new VChart(spec, {
      dom: "chart",
    });
    chart.renderSync();
    return () => {
      chart.release();
    };
  }, []);

  return (
    <div className="app">
      <h1>Hello World!</h1>
      <p>Foo to the barz</p>
      <div id="chart" />
    </div>
  );
};

export default App;

Current Behavior

Image

Expected Behavior

正常绘制仪表盘图

Environment

- OS:
- Browser:
- Framework:

Any additional comments?

No response

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    0