简体   繁体   中英

How to draw relationship arrows between DOM elements?

There are columns with elements.

I need to draw relationship arrows between elements.

Relations can be within the same column, between adjacent or non-adjacent columns. Also, the spaces between items should be added automatically to free space for arrows.

Here is the prototype of what it may look like.

在此处输入图像描述

Could you please recommend the direction for investigation?

Are there some libraries for that? Should I use SVG, or canvas (or a library based on canvas)? Maybe a table with thousands of cells and with color borders?

There's currently no simple way to do this. As mentioned in the comments there are libraries that will help you do this, or you can manually produce your own solution.

One way to do this would be to put a canvas element over the top of your entire table and then manually draw the lines onto the canvas.

As you haven't included code, I can't really give any more specific guidance.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM