magjac / d3-graphviz

Graphviz DOT rendering and animated transitions using D3
BSD 3-Clause "New" or "Revised" License
1.7k stars 103 forks source link

Not working in React? #174

Closed lexax666 closed 3 years ago

lexax666 commented 4 years ago

I can't get this to working in React. What am I doing wrong? My sample code: https://codesandbox.io/s/romantic-feather-exf32?file=/src/Dot.js

magjac commented 4 years ago

It looks as if it's working to me. What is the problem?

lexax666 commented 4 years ago

Hi @magjac I got it working after lowering its version. The newest version still doesn't work for me. Can you check it out again. Thanks in advance!

magjac commented 4 years ago

I think you need to copy or link the graphvizlib.wasm file from https://www.npmjs.com/package/@hpcc-js/wasm to the public folder.

You may want to have a look at how I do it in https://github.com/magjac/graphviz-visual-editor. Take a look at these commits:

Perhaps this issue also can help you: https://github.com/magjac/d3-graphviz/issues/152.