在哪里可以找到 sigma.js 的文档?

发布于 2025-01-12 09:51:58 字数 768 浏览 0 评论 0原文

我正在尝试测试 sigma.js (v2) 的限制,以确定它是否适合我们的项目。 从我在各种示例应用程序中看到的情况来看,它看起来非常有前途。不幸的是,我无法找到适当的文档。

我能找到的只是演示应用程序和一些(看起来相当过时的)Wiki 子页面(即 设置)。

基本上,我需要了解 SigmaJS 的功能集,并且我不想通过挖掘整个源代码来做到这一点;)

我目前正在寻找什么:

  • 什么全局设置 当我这样做时我可以通过西格玛吗?

    const sigmaRenderer = new Sigma(图形、容器、设置);

  • 什么节点&边缘属性在 Sigma 中实现?

    例如,我可以像这样设置坐标、大小、类型和图像:

    graph.addNode("节点-A", {
      x:0,
      y:0,
      尺寸:10,
      类型:“图像”,
      图片:“我的图片.png”
    })
    

    还有什么可能?还有哪些其他可能的类型选项?

  • 在哪里可以找到受支持的事件侦听器的列表?返回的对象的模型是什么?

  • 等等

是否有我错过的官方最新文档或维基?

I am trying to test the limits of sigma.js (v2) to determine whether it is a suitable option for our project.
From what I have seen in various sample applications it looks very promising. Unfortunately, I am unable to find proper documentation.

All I can find are demo applications and some (seeming rather outdated) Wiki subpages (i.e. for Settings).

Basically, I need to know the feature set of SigmaJS, and I would like to not have to dig through the entire source code to do that ;)

What I am currently looking for:

  • What global settings can I pass Sigma when I do... ?

    const sigmaRenderer = new Sigma(graph, container, settings);

  • What node & edge properties are implemented in Sigma?

    For example, I can set the coordinates, size, type and image like this:

    graph.addNode("Node-A", {
      x: 0,
      y: 0,
      size: 10,
      type: "image",
      image: "my-image.png"
    })
    

    What else is possible? What other options for type are possible?

  • Where can I find a list of supported event listeners? What is the model of the returned object?

  • etc.

Is there an official, up-to-date documentation or wiki that I have missed?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

木有鱼丸 2025-01-19 09:51:58

Sigmajs 是用 typescript 编写的,因此很多信息可以直接在类型中获得。

如果您有一个处理打字稿的 IDE,您会看到自动完成以及您可以提供给构造函数的内容。

对于设置,您可以查看此链接 https://github.com/jacomyal/sigma.js/blob/339be9ed274fcfb881ddd3585974ea7be46ca7dd/src/settings.ts#L34-L82

对于属性节点,您可以定义:

x: number;
y: number;
image: string;
label: string | null;
size: number;
color: string;
hidden: boolean;
forceLabel: boolean;
zIndex: number;
type: string; 

对于事件:

"clickNode",
  "rightClickNode",
  "downNode",
  "enterNode",
  "leaveNode",
  "doubleClickNode",
  "wheelNode",
  "clickEdge",
  "rightClickEdge",
  "downEdge",
  "enterEdge",
  "leaveEdge",
  "doubleClickEdge",
  "wheelEdge",
  "clickStage",
  "rightClickStage",
  "downStage",
  "doubleClickStage",
  "wheelStage",
  "kill",

Sigmajs is written in typescript, so a lot of information are directly available in types.

If you have an IDE that handles typescript, you see the auto-completion with what you can give to the constructor.

For the settings, you can take a look at this link https://github.com/jacomyal/sigma.js/blob/339be9ed274fcfb881ddd3585974ea7be46ca7dd/src/settings.ts#L34-L82

For attributes node, you can define :

x: number;
y: number;
image: string;
label: string | null;
size: number;
color: string;
hidden: boolean;
forceLabel: boolean;
zIndex: number;
type: string; 

For events :

"clickNode",
  "rightClickNode",
  "downNode",
  "enterNode",
  "leaveNode",
  "doubleClickNode",
  "wheelNode",
  "clickEdge",
  "rightClickEdge",
  "downEdge",
  "enterEdge",
  "leaveEdge",
  "doubleClickEdge",
  "wheelEdge",
  "clickStage",
  "rightClickStage",
  "downStage",
  "doubleClickStage",
  "wheelStage",
  "kill",
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文