vasturiano / force-graph

Force-directed graph rendered on HTML5 canvas
https://vasturiano.github.io/force-graph/example/directional-links-particles/
MIT License
1.49k stars 241 forks source link

d3.forceManyBody() error : e.quadtree is not a function #304

Open moda20 opened 1 year ago

moda20 commented 1 year ago

trying to set the d3Force for charge using forceManyBody would trigger this "error : e.quadtree is not a function" i call this after the graph has been initialised : Graph.d3Force('charge', d3.forceManyBody().strength(-60).distanceMax(250));

it seems the simple use of d3.forceManyBody() causes this issue. i ma importing the forceManyBody function from cdn version of d3-force-3d

here is the error screenshot image

this also happens with the regular d3-force package

vasturiano commented 1 year ago

@moda20 thanks for reaching out.

Would you mind doing a quick example on https://codepen.io/ or https://codesandbox.io/ that reproduces your issue? So we can have a closer look.