Skip to content
This repository has been archived by the owner on Dec 12, 2022. It is now read-only.

Releases: ts-graphviz/deno

Release v0.5.0

17 Jul 14:33
Compare
Choose a tag to compare

Release v0.4.0

08 May 13:58
Compare
Choose a tag to compare

Release v0.3.0

11 Jan 08:09
Compare
Choose a tag to compare

This version is compatible with the v0.14.0 specification of the npm ts-graphviz package.

Release v0.2.2

02 Sep 00:05
Compare
Choose a tag to compare

This version is compatible with the v0.13.2 specification of the npm ts-graphviz package.

Release v0.2.1

28 Jun 15:38
Compare
Choose a tag to compare

Release v0.2.0

03 Jun 12:07
Compare
Choose a tag to compare

renderDot function outputs the dot command execution result to the specified path by supplying diagram object.

renderDot function requires allow-write, allow-run permission, and dot command.

import * as path from "https://deno.land/std/path/mod.ts";
import { digraph, attribute, renderDot } from "https://deno.land/x/graphviz/mod.ts";

const G = digraph("G", (g) => {
  const a = g.node("aa");
  const b = g.node("bb");
  const c = g.node("cc");
  g.edge([a, b, c], {
    [attribute.color]: "red",
  });
  g.subgraph("A", (A) => {
    const Aa = A.node("Aaa", {
      [attribute.color]: "pink",
    });
    const Ab = A.node("Abb", {
      [attribute.color]: "violet",
    });
    const Ac = A.node("Acc");
    A.edge([Aa.port({ compass: "c" }), Ab, Ac, "E"], {
      [attribute.color]: "red",
    });
  });
});

const __dirname = new URL(".", import.meta.url).pathname;
await renderDot(G, path.resolve(__dirname, "./example.svg"), {
  format: "svg",
});

Release v0.1.0

30 May 11:36
Compare
Choose a tag to compare

This version is compatible with the v0.13.1 specification of the npm ts-graphviz package.