antvis/G2


The issue has been closed
使用 chart.options() 声明图表,chart.getScale() 失效 #5182
pearmini posted onGitHub
- 版本:5.0.12
import { Chart } from "@antv/g2";
const chart = new Chart({ container: "container" });
chart.options({
type: "interval",
theme: "classic",
autoFit: true,
data: {
type: "fetch",
value:
"https://gw.alipayobjects.com/os/bmw-prod/fb9db6b7-23a5-4c23-bbef-c54a55fee580.csv",
},
encode: { x: "letter", y: "frequency" },
axis: { y: { labelFormatter: ".0%" } },
});
chart.render();
chart.getScale(); // undefined