force-graph icon indicating copy to clipboard operation
force-graph copied to clipboard

Can I draw an image on the basic symbol?

Open NoviceInWeb opened this issue 2 years ago • 2 comments

Hello master, @vasturiano.

Can I draw an image on the basic symbol? like this. pictures

there are 5 basic nodes and 2 images(MICKEY MOUSE)

this is my draw image code on a basic symbol.

 myGraph
            .graphData(nowgData)
            .nodeCanvasObject((node, ctx) => {
                        ctx.drawImage(mickey_imgs, 25, 40, 50, 50);
            })

I tried, but the image didn't show up. Only basic symbols were drawn. Is there a way to draw images on a basic symbol?

thank you ..!

NoviceInWeb avatar Aug 11 '22 10:08 NoviceInWeb

@NoviceInWeb should be doable. But depends on what is the content of your mickey_imgs variable. Best is if you can do a simple online example on https://codepen.io/.

vasturiano avatar Aug 18 '22 13:08 vasturiano

@NoviceInWeb should be doable. But depends on what is the content of your mickey_imgs variable. Best is if you can do a simple online example on https://codepen.io/.

thank you master! I will try again !😎

NoviceInWeb avatar Aug 23 '22 07:08 NoviceInWeb