d3.js中的网络多路径正交图 [英] Network multi-route orthogonal graph in d3.js

查看:175
本文介绍了d3.js中的网络多路径正交图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们希望使用d3绘制一个网络路由图,它具有固定的起始和结束节点,但两者之间可能共享某些节点的路径不同,例如:



我从解决了我们的问题。它完全符合我们的需要。


We want to use d3 to draw a network route graph that has fixed start and end node but different paths in between that might share some nodes, for example:

I read comments from Configure fixed-layout static graph in d3.js and successfully created a simple graph like:

But as I add more nodes to the graph it becomes random (not static after refresh) and not orthogonal anymore:

So my questions are:

  • Is it possible to use d3.js to draw something close to the desired graph?
  • Or is there an algorithm out there I should employ in my graph implementation?

解决方案

Dagre solved our problem. It does exactly what we need.

这篇关于d3.js中的网络多路径正交图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆