# SWI Dependency Graph

**URL:** <https://swi-prolog.discourse.group/t/swi-dependency-graph/5978>\
**Category:** General\
**Created:** [November 28, 2022, 9:53pm UTC](https://swi-prolog.discourse.group/t/swi-dependency-graph/5978 "2022-11-28T21:53:25Z")\
**Posts on this page:** 1\
**Showing post:** 8

<div class="post-metadata">

**Author:** ![EricGT](https://avatars.discourse-cdn.com/v4/letter/e/f1d935/32.png) [@EricGT](https://swi-prolog.discourse.group/u/EricGT)\
**Post date:** [November 29, 2022, 12:58pm UTC](https://swi-prolog.discourse.group/t/swi-dependency-graph/5978/8 "2022-11-29T12:58:35Z")

</div>

> [@Boris](#):
>
> [Cytoscape](https://cytoscape.org/) that @EricGT mentioned

Be warned that [Cytoscape](https://cytoscape.org/) is a different code base than [Cytoscape.js](https://js.cytoscape.org/). I have not used Cytoscape which uses Java. Cytoscape.js obviously uses JavaScript and needs a running server to present web pages.

The most complete example of using Cytoscape.js that I posted is found in this [reply](https://swi-prolog.discourse.group/t/wiki-discussion-generating-cytoscape-js-graphs-with-swi-prolog/2816/6), click `Details - Click triangle to expand.` to see the code. Note that that example uses a [Node.js](https://nodejs.org/en/) server but IIRC I was also able to swap that out for an [SWI-Prolog HTTP server](https://www.swi-prolog.org/pldoc/doc_for?object=section(%27packages/http.html%27)) thus obviating the need for node.js. The nice thing about that example is that it uses JSON data files which are easily created from [SWI-Prolog dictionaries](https://www.swi-prolog.org/pldoc/man?section=bidicts) using IIRC [json\_write\_dict/N](https://www.swi-prolog.org/pldoc/doc/_SWI_/library/http/json.pl). See  
[Json\_dict/2 - Helpful for learning how to use JSON with SWI-Prolog dict](https://swi-prolog.discourse.group/t/json-dict-2-helpful-for-learning-how-to-use-json-with-swi-prolog-dict/4450) for caveats. 🙂

---

_[View the full topic](https://swi-prolog.discourse.group/t/swi-dependency-graph/5978)._
