Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to do Visio-like diagramming with HTML5 + Javascript? [closed]

I'm looking for options to draw Visio-like diagrams using HTML and Javascript.

Some examples of what I'm trying to accomplish:

  • https://live.yworks.com/demos/view/vsdxexport/ (the computer-network example)
  • This Lucidchart example

So far options I can think to explore are:

  • Drag and Drop API with SVGs
  • d3.js
  • HTML5 Canvas

Is there any other tech or NPM packages that I should be aware of? It's not a free-form Visio clone, there's a fixed set of icons that I need to be able to "snap" together with lines. Lines can be straight or curved at 90 degrees like here:

Diagramm

And the icons can be dragged around in the canvas

like image 962
charmeleon Avatar asked Nov 16 '25 15:11

charmeleon


1 Answers

You can use the mxGraph library, licensed under Apache 2.0.

Distributed as an npm package, on his source code you can find a fantastic example of an editor build upon it that you can also try online.

enter image description here

like image 57
nilsandrey Avatar answered Nov 18 '25 05:11

nilsandrey