Releases: mdaines/viz-js
@viz-js/viz 3.2.1
- Update TypeScript declarations to match API docs
@viz-js/lang-dot 1.0.2
- Add TypeScript declaration file to package
@viz-js/lang-dot 1.0.1
- Add TypeScript declaration file
@viz-js/viz 3.2.0
-
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
- Initial release
v3.1.0
-
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
-
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
-
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 theinstance()
method exported by the main source file,lib/viz-standalone.js
, which returns a promise that resolves to an instance of theViz
class. -
The default value of the
format
option is now"dot"
, rather than"svg"
, as with the Graphvizdot
program. This change only affects therender()
andrenderString()
methods, since the format for, eg,renderSVGElement()
is always"svg"
. -
The
renderJSONObject()
method is now calledrenderJSON()
. -
The built-in
Worker
support has been removed. -
The
files
andimages
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 theengine
option to one ofnop
,nop1
,nop2
.
v2.1.2
v2.1.2-pre.1
- Fix redeclared variable (#160)