Closed
Description
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
Expected Behavior
正常绘制仪表盘图
Environment
- OS:
- Browser:
- Framework:
Any additional comments?
No response