antvis/G2

The issue has been closed
[Bug]: treemap 在 NodeJS ssr 下出现报错 #6698
hustcc posted onGitHub
Describe the bug / 问题描述
DEMO 代码:https://g2.antv.antgroup.com/examples/graph/hierarchy/#treemap
使用 @antv/g2-ssr 改成之后,出现报错。
import { createChart } from '@antv/g2-ssr';
createChart({
type: "treemap",
width,
height,
data,
layout: {
path: (d) => d.name.replace(/\\./g, "/"),
tile: "treemapBinary",
paddingInner: 1,
},
encode: { value: "size" },
style: {
labelText: (d) =>
d.data.name
.split(".")
.pop()
.split(/(?=[A-Z][a-z])/g)[0],
labelFill: "#000",
labelPosition: "top-left",
fillOpacity: 0.7,
},
});
Reproduction link / 复现链接
No response
Steps to Reproduce the Bug or Issue / 重现步骤
No response
Version / 版本
Please select / 请选择
OS / 操作系统
- macOS
- Windows
- Linux
- Others / 其他
Browser / 浏览器
- Chrome
- Edge
- Firefox
- Safari (Limited support / 有限支持)
- IE (Nonsupport / 不支持)
- Others / 其他