简体   繁体   中英

Javascript library for visualization of Lists (data structure)

I need to create web page where user can choose a type of a list (linked, doubly linked, circular linked list etc.) and see how it looks like. User can add and remove elements from a list and see how list is changing. Which library is better to use for visualization of List? It would be good to find library which can take a list as input param and return image or canvas. But If such library doesn't exists I need library which can draw rectangles with text inside and connect it with each other with lines.

在此处输入图片说明

D3.js is more than powerful enough to do what you want. However, if all you want rectangles with in a list, you could use a table or divs for that.

Edit: To figure out how to do this, I would recommend running through a tutorial on D3. Here are links to several. There is a bit of a learning curve, but once you get over the learning curve, it is very nice. As far as examples, what you want is similar to this or this except your layout is much simpler.

This question may also be helpful

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