{
const chart = new G2.Chart({
width: FW + P * 2,
height: FH + P * 2,
padding: P
});
chart.legend(false);
chart.shape().style("x", "0%").style("y", "0%").style("render", point);
chart
.rect()
.data({
type: "fetch",
value:
"https://mdn.alipayobjects.com/afts/file/A*FCRjT4NGENEAAAAAAAAAAAAADrd2AQ/messi.json"
})
.transform({
type: "bin",
opacity: "count",
thresholdsX: 15,
thresholdsY: 15
})
.encode("x", (d) => Number(d.X))
.encode("y", (d) => Number(d.Y))
.scale("x", { domain: [0, 1] })
.scale("y", { domain: [0, 1] })
.axis(false);
await chart.render();
return chart.getContainer();
}