ipyelk#
Jupyter Widgets for interactive graphs powered by the Eclipse Layout Kernel (ELK).
Install |
Build |
Docs |
|---|---|---|
Screenshots#
what can you do… |
… with |
|---|---|
automatically lay out complex, nested data as diagrams |
|
interactive activity/flow-chart diagrams |
|
collapsible blocks |
|
visual simulations |
|
embed other widgets in diagrams |
|
interact with dynamic systems |
Prerequisites#
python >=3.10
JupyterLab compatibility#
|
|
special concerns |
|---|---|---|
|
|
needs |
|
|
untested |
|
|
|
|
|
Install#
ipyelk is distributed on conda-forge and PyPI.
To upgrade from ipyelk 2.x, read Migrating from ipyelk 2.x to 3.0.
ipyelk with conda (recommended)#
conda install -c conda-forge ipyelk "jupyterlab>=4.1,<5"
# or
mamba install -c conda-forge ipyelk "jupyterlab>=4.1,<5"
ipyelk with pip#
pip install ipyelk "jupyterlab>=4.1,<5"
Developing#
See CONTRIBUTING for a development install.
How it works#
In your kernel, ipyelk:
In your jupyter_server:
serve the
@jupyrdf/jupyter-elkassets as a federated module
In the browser, @jupyrdf/jupyter-elk:
ELK lays out the diagram in a WebWorker
sprotty draws the diagram as SVG
interaction information (like selection and hovering) are passed back to the browser
For upstream widget limitations and their workarounds, see the known issues in the changelog.
Uninstall#
pip uninstall ipyelk
Open Source#
This work is licensed under the BSD-3-Clause License. Some of its source
files are derived from other works under the Eclipse Public License 1.0 or
2.0, and it bundles JavaScript packages under the Eclipse Public License 2.0. So the
package’s license expression is BSD-3-Clause AND EPL-1.0 AND EPL-2.0.
- Migrating from ipyelk 2.x to 3.0
- Find the changes that affect you
- The errors for removed names
- The warnings for deprecated names
- Tools
- Tool invocation and lifecycle names
- Disable a tool with
disabled - Bind a tool after you make it
- Tools add their change reports to the pending flow
- Resolve a selection that has unknown ids
- Compare
Selection.idsto a tuple - Type-check
Toolbar.order()as tool widgets - Read the hovered element from
Hover.hovered_id - Expect
Nonewhen the pointer leaves an element - Paint elements with
Viewer.painter
- Diagrams and viewers
- Override
fit()andcenter()with the full signatures - Add a
ControlOverlaybefore you use it - Read the camera from
Viewer.viewport - Move the camera with
set_viewport() - Give each diagram its own tools and toolbar
- Make a new diagram or tool after you close one
- Set
layout,children,inletandoutletbefore you close - Give each open diagram its own source
- Give the viewer to the diagram when you make it
- Call
sync_value()for browser code that reads a mark - Use a
MarkIndexas a kernel object, not as a widget
- Override
- Elements and layout options
- Option classes use the option ids that ELK knows
- Set the label-port spacing in each direction
- Select a layout algorithm other than Draw2D
- Give
layoutOptionsstring keys and values - An unknown key on an element raises
- JSON loads a shape as the class of its type string
- Give each shape a payload of its type
- Expect
NotFoundErrororNotUniqueErrorfromElementIndex.root() - Do not use the data classes of
layout_options.model - Do not use
GraphWrappingStrategy.horizontal - Expect a label to have the size that you assign
- Find elements by id with a
Document - Read the ids of a pipe from
MarkIndex.document - Index an element that has no id
- Find the hidden element of a slack port with
Document.resolve - Give each element one parent
- Imports
- Node size and label placement
- Changelog
- Contributing to
ipyelk



