Jump to content

Rendering interactive graph with thousands of vertices and edges


voidmen
 Share

Recommended Posts

hi Folks,

I am new to here and I'm trying to find out whether pixijs could be a good choice for me.

What I need to do is render a possibly very large graph on the canvas, like the attached picture shows. As a bottom line, I need to draw like thousands of vertices and maybe 4-10 times of that many edges on the canvas and still stay responsive to user actions like panning around, zooming and selecting nodes and moving nodes around( the attached edge should be updated while moving). Other stuff like highlight and scale some vertex/edge I think should be trivial. 

No layout computing is required. The graph layout is calculated in advance.

I've tried some other frameworks like fabricjs and echarts. They could not handle more than 1000 vertices.

My questions is pixijs suitable for such task? And can I achieve the performance goal with reasonable amount of tweaks?

 

Thanks in advance!

social-network.png

Link to comment
Share on other sites

I don't see any reason why Pixi can not handle this, it's optimised to draw many many sprites, maybe not so much for primitive stuff like circles and lines but I'd imagine you could get it to work without pulling your hair out too much.

Looks like maybe d3 would be a more natural fit though, as it was built with exactly this sort of visualisation and interaction in mind.

edit: just seen there is actually a d3 demo that is maybe very close to what you need.

Link to comment
Share on other sites

19 hours ago, mattstyles said:

I don't see any reason why Pixi can not handle this, it's optimised to draw many many sprites, maybe not so much for primitive stuff like circles and lines but I'd imagine you could get it to work without pulling your hair out too much.

Looks like maybe d3 would be a more natural fit though, as it was built with exactly this sort of visualisation and interaction in mind.

edit: just seen there is actually a d3 demo that is maybe very close to what you need.

But d3 is rendering with SVG, right? I'm afraid that too many elements would make the DOM heavy.  But I could take a try though.

Link to comment
Share on other sites

50 minutes ago, voidmen said:

But d3 is rendering with SVG, right? I'm afraid that too many elements would make the DOM heavy.  But I could take a try though.

Yeah I think so, but I wouldn't worry about it. d3 is designed to handle huge datasets, if SVG couldn't handle it they'd have created another rendering solution by now.

Link to comment
Share on other sites

  • 10 months later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...