gpt4 book ai didi

javascript - d3 : Make a static directed graph

转载 作者:可可西里 更新时间:2023-11-01 02:23:47 25 4
gpt4 key购买 nike

我想在 d3 中可视化一个 20K 节点的依赖关系图。力导向图,例如 http://bl.ocks.org/mbostock/1153292对于这个数量的节点,在浏览器中呈现太慢。

基本上我想表示节点 包含文本 和从一个节点到另一个节点的有向边,并添加缩放和平移功能。我怎样才能在 d3 中做到这一点?

Directed dependency graph

最佳答案

这里有一个替代方案,它似乎没有使用强制来布置节点 - 没有弹跳,性能良好,并且内置了上传/下载工具。它的许可证是 MIT/X:

Interactive tool for creating directed graphs using d3.js

directed-graph-creator

Operation:

  • drag/scroll to translate/zoom the graph
  • shift-click on graph to create a node
  • shift-click on a node and then drag to another node to connect them with a directed edge
  • shift-click on a node to change its title
  • click on node or edge and press backspace/delete to delete

github snapshot

关于javascript - d3 : Make a static directed graph,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19389063/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com