Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TreeGraph在微信小程序上如果数据层级超过2似乎会报错,无法绘制 #169

Open
zjwmiao opened this issue Feb 4, 2024 · 1 comment

Comments

@zjwmiao
Copy link

zjwmiao commented Feb 4, 2024

我是用的uniapp来开发微信小程序

当我给graph传入这样的数据时,可以成功绘制

graph = new F6.TreeGraph({/*...*/})
// ...
// rootNode, deviceNode是我自己定义的节点类型,用的F6.registerNode()
graph.data({
  id: 'root',
  type: 'rootNode',
  children: [
    {
      id: '111',
      type: 'deviceNode',
    },{
      id: '222',
      type: 'deviceNode',
    }
  ]
})

当我给graph传入这样的数据时,会出现TypeError: Cannot read property 'index' of null,无法绘制树图

graph = new F6.TreeGraph({/*...*/})
// ...
graph.data({
  id: 'root',
  type: 'rootNode',
  children: [
    {
      id: '111',
      type: 'deviceNode',
      children: [
        {
          id: '333',
          type: 'deviceNode'
        }
      ]
    },{
      id: '222',
      type: 'deviceNode',
    }
  ]
})

请问是不是我哪里写的有问题

@Mangomilkhh
Copy link

Mangomilkhh commented Aug 19, 2024

好像遇到很多问题,这个库都没有人维护和答疑了🥀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants