antvis / G6VP

G6VP is an online visual analysis tool for graphs and a low-code platform for building graph applications.
https://insight.antv.antgroup.com
Apache License 2.0
797 stars 109 forks source link

fix: fix issue that cannot import pattern #560

Closed Aarebecca closed 9 months ago

Aarebecca commented 9 months ago

之前的模式匹配导出模式数据有问题,导入数据也没做处理,因此无法导入导出模式

修复之后,导出的数据格式:

{
  "nodes": [
    {
      "id": "Tom",
      "nodeType": "user",
      "data": { "id": "Tom", "nodeType": "user" }
    },
    {
      "id": "Gina",
      "nodeType": "user",
      "data": { "id": "Gina", "nodeType": "user" }
    }
  ],
  "edges": [
    {
      "id": "Tom-Gina-4",
      "edgeType": "Friends_With",
      "label": "Friends_With-0",
      "source": "Tom",
      "target": "Gina"
    }
  ]
}

导入模式后进行匹配:

image