Skip to content

tbo47/dagre-es

Folders and files

NameName
Last commit message
Last commit date

Latest commit

f634472 · Oct 4, 2024

History

95 Commits
Sep 20, 2024
Oct 1, 2024
Sep 20, 2024
Sep 20, 2024
Mar 15, 2023
Sep 20, 2024
Dec 13, 2022
Sep 25, 2024
Oct 4, 2024
Oct 4, 2024
Oct 4, 2024
Oct 4, 2024
Sep 23, 2024
Mar 12, 2023

Repository files navigation

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);
});