JavaScript error “Uncaught TypeError: Cannot call method 'push' of undefined” D3.js

后端 未结 1 1656
执念已碎
执念已碎 2021-01-22 19:33

I\'m using the R package d3Network to produce D3.js Forced Layout graphs. The code that d3Network produces gives me a \"Uncaught TypeError: Cannot read property \'weight\' of un

相关标签:
1条回答
  • 2021-01-22 20:11

    The numbers given as "source" and "target" links are indexes into the nodes array and should start from 0. Yours start from 1 and hence the highest number doesn't exist and gives you this error.

    0 讨论(0)
提交回复
热议问题