dagre-d3-es

<p align="center"> <a href="https://tbo47.github.io/" ><img src="https://img.shields.io/badge/created_by-tbo47-blue.svg" alt="Created by tbo47"></a> <a href="https://www.npmjs.com/dagre-d3-es"><img src="https://img.shields.io/npm/v/dagre-d3-es.svg?log

MIT 16 个版本
安装
npm install dagre-d3-es
yarn add dagre-d3-es
pnpm add dagre-d3-es
bun add dagre-d3-es
README

Created by tbo47 dagre-d3-es on npm  dagre-d3-es on npm

dagre-d3-es

dagre-d3-es is a fork of dagre-d3 using the more modern ES6 javascript syntax.

It uses ES modules, thus the name dagre-d3-es.

dagre-d3-es follows d3 versions. Ex: dagre-d3-es version 7 depends on d3 version 7.

Demos

Install

npm install dagre-d3-es

Code example

Coming from the legacy dagre-d3, the main changes in your code will be:

import * as dagreD3 from 'dagre-d3-es';
...
const g = new dagreD3.graphlib.Graph().setGraph({});
...
const zoom = d3.zoom().on('zoom', (zoomEvent) => {
  inner.attr('transform', zoomEvent.transform);
});

版本列表
7.0.14 2025-12-03
7.0.13 2025-10-24
7.0.12 2025-10-07
7.0.11 2024-10-01
7.0.10 2023-03-11
7.0.9 2023-02-24
7.0.8 2023-02-02
7.0.6 2022-12-14
7.0.5 2022-12-13
7.0.4 2022-11-20
7.0.2 2022-11-06
7.0.1 2022-04-09
7.0.0 2022-01-06
5.0.2 2022-01-06
5.0.1 2022-01-06
5.0.0 2022-01-06