antvis/G2

使用Spec API 设置title不生效 #5141

mcdyzg posted onGitHub

问题:使用Spec API的时候,设置title不生效。

代码示例:

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%" } },
  title: "图表标题",
});

chart.render();

Fund this Issue

$0.00
Funded

Pull requests