ELK Demonstrators

Automatic layout algorithms compute layouts for diagrams. Never tried them? Well, here's your chance. Choose one of the thingies below and start playing!

Everything runs in your browser: the layout is computed by elk-lean, the Eclipse Layout Kernel 0.12.0 ported to pure Lean 4 and compiled to WebAssembly. No server is involved.

Interactive Editor

Interactively edit a textual description of a graph while a corresponding diagram is generated on-the-fly. Basically, build your own graphs and see what automatic layout does with them. You can choose out of the following two formats:

elkt

ELK's textual graph DSL, with highlighting, error markers and content assist (Ctrl+Space) for layout options. Parsed and laid out within your browser by elk-lean (WebAssembly).

json

ELK's JSON format (JSON5 syntax accepted). Laid out within your browser by elk-lean (WebAssembly).

Examples

An annotated collection of example graphs. Their main purpose is to illustrate various configuration possibilities, in particular those that are often-used.

The source of the examples can be found in ELK's models repository.

Model Browser

elk-live's browser for ELK's repository of test models is not part of this demo: it would copy about 1,450 more models (some 60 MB) into the static site.

Graph Format Conversion

Not available: elk-lean converts ELK Text to ELK JSON only (no elkg/XMI, no JSON to ELK Text). The ELKT editor's "Open as JSON" covers that direction.

Used Technologies

Eclipse Layout Kernel (ELK)
Java-based implementations of automatic layout algorithms; elk-lean ports its version 0.12.0.
elk-lean
ELK ported to pure Lean 4, compiled to WebAssembly and run in a Web Worker. Parses ELK Text and computes the layouts of the diagrams so you don't have to.
Sprotty
A web-based diagramming framework. This is what shows the diagrams.
Monaco Editor
The code editor that powers Visual Studio Code. The thing that lets you specify your graphs.
elk-live
The original ELK demonstrators (Java server, elkjs), whose pages this demo follows.

EPL-2.0 OR GPL-3.0-or-later; parts ported from elk-live are EPL-2.0.