gpt4 book ai didi

java - 在 Google App Engine 上呈现有向图(类似于 graphviz)的库

转载 作者:IT老高 更新时间:2023-10-28 20:59:28 27 4
gpt4 key购买 nike

我正在寻找可以将 Dot 语言中的图形呈现为图像文件的 Java 或 Python 库。问题是我需要一个可以在 Google App Engine 上使用的库。基本上我正在寻找一个可以将有向图的文本描述转换为图形图像的库。

例如:

隐藏这个边列表:

[A,B]
[B,C]
[A,C]
[C,D]

进入这张图片:

example image

我使用了 Graphviz对于此示例,但我知道我无法将它与 Google App Engine 一起使用。

最佳答案

Canviz是您正在寻找的:它是一个用于将 Graphviz 图形绘制到 Web 浏览器 Canvas 的 JavaScript 库。它适用于 most browsers .

Using Canviz has advantages for your web application over generating and sending bitmapped images and imagemaps to the browser:

  • The server only needs to have Graphviz generate xdot text; this is faster than generating bitmapped images.
  • Only the xdot text needs to be transferred to the browser; this is smaller than binary image data, and, if the browser supports it (which most do), the text can be gzip- or bzip2-compressed.
  • The web browser performs the drawing, not the server; this reduces server load.
  • The user can resize the graph without needing to involve the server; this is faster than having the server draw and send the graph in a different size.

要查看它的实际效果,look here .

关于java - 在 Google App Engine 上呈现有向图(类似于 graphviz)的库,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2264157/

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