Skip to content

Releases: mdaines/viz-js

@viz-js/viz 3.2.1

09 Oct 18:36
26f1232
Compare
Choose a tag to compare
  • Update TypeScript declarations to match API docs

@viz-js/lang-dot 1.0.2

09 Oct 18:24
53db73c
Compare
Choose a tag to compare
  • Add TypeScript declaration file to package

@viz-js/lang-dot 1.0.1

09 Oct 17:21
d670ce4
Compare
Choose a tag to compare
  • Add TypeScript declaration file

@viz-js/viz 3.2.0

12 Sep 22:18
Compare
Choose a tag to compare
  • Update Graphviz to 9.0.0.

  • Update Emscripten SDK to 3.1.45.

  • Accept HTML attribute values in object input.

    HTML attribute values are written as an object literal with a "html" property:

    { label: { html: "<i>the label</i>" } }
    
  • Accept a "reduce" option. This has the same effect as using the -x Graphviz command-line option. When using the neato layout engine, it prunes isolated nodes.

  • Accept default attributes for graphs, nodes, and edges in render options. This is similar to the -G, -N, -E options provided by the Graphviz command-line.

    Setting the default shape for nodes:

    viz.render("digraph { a -> b }", { nodeAttributes: { shape: "circle" } } });
    

    These attributes take precedence over default attributes specified in string and object input.

  • Accept an object that represents a graph as input for render(). This is a JSON object similar in structure to the Graphviz DOT syntax.

    Rendering with an object:

    // DOT: digraph { a -> b }
    viz.render({ directed: true, edges: [{ tail: "a", head: "b" }] });
    

    Another example:

    viz.render({
      nodeAttributes: {
        shape: "circle"
      },
      nodes: [
        { name: "a", attributes: { label: "A", color: "red" } },
      ],
      edges: [
        { tail: "a", head: "b" },
      ],
      subgraphs: [
        {
          name: "cluster_1",
          nodes: [
            { name: "b", attributes: { label: "B", color: "blue" } }
          ]
        }
      ]
    });
    

    Edge ports can be specified using the headport and tailport attributes.

@viz-js/lang-dot 1.0.0

01 Aug 15:11
03f4a0f
Compare
Choose a tag to compare
  • Initial release

v3.1.0

16 Jul 22:13
Compare
Choose a tag to compare
  • Update Graphviz to 8.1.0.

  • Export the Graphviz version, supported formats, and supported engines as constants generated at build time.

  • Include an ES module build as well as UMD.

  • Add Typescript declarations.

v3.0.1

15 Jun 18:43
Compare
Choose a tag to compare
  • Catch the error Emscripten throws when exit() is called.

  • Don't add an error message about no valid graphs in input.

  • Improve error message handling when an error reported from agerr has multiple lines.

v3.0.0

14 Jun 17:55
Compare
Choose a tag to compare
  • Viz.js now uses WebAssembly.

  • Adds a new render() method that returns the result of rendering, including Graphviz error and warning messages, in a structured format.

  • Adds getters for the Graphviz version string, and lists of supported layout engines and output formats.

  • Memory leaks that could be identified by calling rendering methods many times have been fixed.

  • Can be used as a single JavaScript source file (in UMD format).

  • Rendering methods are now synchronous. But constructing an instance of the Viz class is now asynchronous, because it depends on compiling and instantiating the WebAssembly code. Use the instance() method exported by the main source file, lib/viz-standalone.js, which returns a promise that resolves to an instance of the Viz class.

  • The default value of the format option is now "dot", rather than "svg", as with the Graphviz dot program. This change only affects the render() and renderString() methods, since the format for, eg, renderSVGElement() is always "svg".

  • The renderJSONObject() method is now called renderJSON().

  • The built-in Worker support has been removed.

  • The files and images options have been removed. This allows the Emscripten module to be smaller.

  • The renderImageElement method has been removed in favor of SVG.

  • The nop option has been removed. Instead, set the engine option to one of nop, nop1, nop2.

v2.1.2

08 Dec 16:13
Compare
Choose a tag to compare
  • Fix redeclared variable (#160)

v2.1.2-pre.1

05 Dec 02:50
Compare
Choose a tag to compare
v2.1.2-pre.1 Pre-release
Pre-release
  • Fix redeclared variable (#160)