Hi,
I am trying to create a force-directed graph based on some csv-data. I tried to follow the scatterplot example (https://www.youtube.com/watch?v=xkBheRZTkaw&t=37528s), but this seems not to work properly.
My code: Force-Directed Graph V4 (vizhub.com)
the error message
Uncaught TypeError: r.map is not a function
at h (d3.min.js:2:222110)
at l.initialize (d3.min.js:2:222706)
at p (d3.min.js:2:225815)
at Object.force (d3.min.js:2:226461)
at index.js:31:4
at index.js:63:3
This must be related to the .force(‘link’, forceLink(links). As far as I understand, the links-array is not in a form suitable for forceLink.
Could someone share a solution and explain the reasons behind?
Any help is very much appreciated.
Chris