HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
dagrejs
dagre
TypeScript2014–2025
dagrejs / dagre

dagre

Directed graph layout for JavaScript

16Distinct people
16Mentions
0Explicit recommenders
5.9KGitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

Directed graph layout for JavaScript

GitHub

Where it is used

No documented product use was verified in the last source check.

What people are saying

No recommendation phrase was found in the indexed comments.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

No other repository is repeatedly linked in the same discussions.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 5:04:57 PM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by year16 dated mentions

Observed mentions: 2014-02-04 19:23:49 UTC to 2025-10-29 15:23:01 UTC.

01232014-01-01 00:00:00 UTC to 2015-01-01 00:00:00 UTC (exclusive): 2 mentions; 0 submissions, 2 comments20142015-01-01 00:00:00 UTC to 2016-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2016-01-01 00:00:00 UTC to 2017-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2017-01-01 00:00:00 UTC to 2018-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2018-01-01 00:00:00 UTC to 2019-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2019-01-01 00:00:00 UTC to 2020-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments20192020-01-01 00:00:00 UTC to 2021-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2021-01-01 00:00:00 UTC to 2022-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2022-01-01 00:00:00 UTC to 2023-01-01 00:00:00 UTC (exclusive): 3 mentions; 0 submissions, 3 comments2023-01-01 00:00:00 UTC to 2024-01-01 00:00:00 UTC (exclusive): 2 mentions; 1 submissions, 1 comments2024-01-01 00:00:00 UTC to 2025-01-01 00:00:00 UTC (exclusive): 3 mentions; 1 submissions, 2 comments2025-01-01 00:00:00 UTC to 2026-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2025

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
20142014-01-01 00:00:00 UTC2015-01-01 00:00:00 UTC202
20152015-01-01 00:00:00 UTC2016-01-01 00:00:00 UTC101
20162016-01-01 00:00:00 UTC2017-01-01 00:00:00 UTC101
20172017-01-01 00:00:00 UTC2018-01-01 00:00:00 UTC101
20182018-01-01 00:00:00 UTC2019-01-01 00:00:00 UTC101
20192019-01-01 00:00:00 UTC2020-01-01 00:00:00 UTC000
20202020-01-01 00:00:00 UTC2021-01-01 00:00:00 UTC101
20212021-01-01 00:00:00 UTC2022-01-01 00:00:00 UTC000
20222022-01-01 00:00:00 UTC2023-01-01 00:00:00 UTC303
20232023-01-01 00:00:00 UTC2024-01-01 00:00:00 UTC211
20242024-01-01 00:00:00 UTC2025-01-01 00:00:00 UTC312
20252025-01-01 00:00:00 UTC2026-01-01 00:00:00 UTC101

What Hacker News says

16 sources
>graph-viz is MASSIVE and a binary. mermaid requires the browser's svg rendering system to work. I succeeded to use resvg-js [1] with dagre/graphlib [2] to render graphs. resvg-js uses a 4 MB node library to render SVGs. dagre is used by mermaid for graph layout (for some of the diagram types). if you disable loading system fonts in resvg-js it just takes milliseconds to render the SVG. I know that mermaid is well-known and very useful, but I don't like the code quality (especially consistency) and the bloat of dependencies. Last time I went through the code I assessed it requires significant refactorings to make it work with resvg-js, i.e. server-side graph layout and rendering. There is also nomnoml [1], which is so great, it should deserve at least the same amount of attention as mermaid. the nomnoml codebase is a joy to read. the auth
Read the rest
or even converted the dagre/graphlib codebase to typescript [4]. [1] https://github.com/thx/resvg-js [2] https://github.com/dagrejs/dagre [3] https://github.com/skanaar/nomnoml [4] https://github.com/skanaar/graphre --- Edit: One of the refactorings to make mermaid work with resvg-js is related to measuring svg text width. It's needed to determine the width of the graph node boxes. mermaid needs to be able to also use `resvg.getBBox()` to make it work with server-side rendering.
In Who needs Graphviz when you can build it yourself?
jgoertler·Sep 6, 2024Submission

Show HN: Mycelium – A graph viewer library for neural networks

Hey HN, we're happy to release Mycelium, a JavaScript library for creating graph visualizations of machine learning models or any other directed acyclic graphs. Mycelium powers the graph viewer of the Talaria [0] a research model visualization and optimization system, which was used to optimize the efficiency of Apple Foundation Models [1]. Everything works entirely on the client-side in the browser — we provide a rudimentary ONNX loader out of the box, which you can try by dragging model files into our website. It is also simple to define loaders for your own model formats. The library was heavily inspired by Lutz Roeder's Netron viewer [2] but adds additional features: * Hierarchical grouping of nodes/modules to visualize and explore large graphs more efficiently. * An UI framework that allows users to customize the contents of each nod
Read the rest
e and tooltip. * Can be embedded into any web application or framework by mounting it directly to the DOM (similar to the Monaco text editor). In contrast to Model Explorer [3] by Google Research (which uses WebGL) we decided to stick with an SVG-based renderer because it gives us more flexibility for the representation of the data. Plus, we found that the limiting factor for usability, in our case, is not rendering performance but the time it takes to compute the layout of the graph (we use Dagre [4] as a layout engine). Being able to hierarchically group nodes alleviates this to a large degree! Mycelium was developed for my project at Apple together with Xiaoyi Zhang and Fred Hohman, with advice from Dominik Moritz and Donghao Ren. I'm happy to answer any questions! --- Shameless plug: I'm working as an independent research scientist and software engineer [5]. I love working on hand-tailored visualization systems and interactive articles [6] — please feel free to reach out if that is interesting to you too! [0](https://machinelearning.apple.com/research/talaria [1](https://machinelearning.apple.com/research/introducing-apple...) [2](https://github.com/lutzroeder/netron) [3](https://research.google/blog/model-explorer/) [4](https://github.com/dagrejs/dagre) [5](https://jgoertler.com) [6](https://distill.pub/2019/visual-exploration-gaussian-process...)
4 points · Open discussion
Doing a layout algorithm is very difficult, and the DOT code made me curious, so I decompiled the wasm and looked around a bit. I see this appears to use or build on Dagre (https://github.com/dagrejs/dagre/wiki), though I've seen no citation of that work. What's up with that? How much of this is original work vs pulling together tools in a new way or improving their API?
In Vizdom: Diagrams as Code
The issue I have with a lot of these tools is they work fine when depicting relationships between tables in the same schema (talking mainly about PostgreSQL databases), but few support showing relationships between tables across different schemas. Also, when the number of tables grows large, few have layouts arranged in an optimal way. I use D2 (https://d2lang.com/) to create ERDs. However, of the free layout engines available in D2, Dagre (https://github.com/dagrejs/dagre) and ELK (https://github.com/eclipse/elk) both don't have optimal placement of layouts for a sufficiently complicated database.
In Show HN: Private, text to entity-relationship diagram tool
nateless·Feb 20, 2023Submission

Ask HN: Are There Any Layered Graph Layout Algorithms in Active Development?

Hello, I've been researching layered graph algorithms, but it appears that this market is mostly inactive at the moment. Dagre (https://github.com/dagrejs/dagre) is considered outdated, with a codebase from 2015 that is no longer being updated, although they still accept some pull requests. KLAY (https://github.com/kieler/klayjs) has been succeeded by ELK, and development stopped in 2016. ELK (https://github.com/kieler/elkjs) is currently being developed by the KIELER Project, mostly by students and professors, written in Java. They are doing a great job, but the library is written in Java and then transpiled to JavaScript. They also rely on students for help with the development, which makes progress slow. Do you happen to know of any new projects that are actively addressing this problem?
2 points · Open discussion
For web things, I would recommend the combination of dagre (https://github.com/cpettitt/dagre), which will calculate node and edge positions, and d3.js (https://d3js.org/), which you can use to layout your nodes as an SVG. I did some work on something a little bit similar for an EU research project, which you are welcome to take a look at. It's probably not directly applicable, but it may give you some thoughts about what does and doesn't work as a UI: https://github.com/cse-bristol/process-model/ https://tools.smartsteep.eu/process-model/?name=actionplanni...
In I spent three months working full time to get a job

Showing the 15 most recent of 16 sources. Enable JavaScript to search and browse every indexed mention.

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.