0.0.2 • Published 5 years ago

d0_graphviz v0.0.2

Weekly downloads
2
License
BSD-3-Clause
Repository
github
Last release
5 years ago

jupyterlab_graphviz

A JupyterLab extension for interactively viewing Graphviz data files, powered by viz.js.

Screenshot

Editing and viewing DOT language files

Right-click on a supported file in the Files sidebar and choose Open with... ▶ dot.

The following DOT language file extensions are supported with live preview and syntax highlighting:

  • .gv
  • .neato
  • .dot

Inline rendering

The following MIME types can also be rendered inline in Notebooks and Consoles:

  • application/vnd.graphviz.neato
  • application/vnd.graphviz

Check out some MIME examples in the Cookbook(./samples/Graphviz Rich Display Cookbook.ipynb).

Pan and zoom

File-based and inline diagrams can be panned by clicking and dragging. Use a mouse wheel, double click or the Zoom slider. Shift and double click zooms out.

Text Search in Diagrams

Diagrams are rendered directly as SVG elements, so normal browser search can find text.

Installation

Prerequisites

For example, via conda:

conda install -c conda-forge jupyterlab nodejs
jupyter labextension install jupyterlab_graphviz

Development

Install dependencies

jlpm

Build the extension

jlpm build

Install into to my JupyterLab

jupyter labextension link .

Rebuild once

To rebuild the package and the JupyterLab app:

jlpm build
jupyter lab build

Develop continuously

jlpm watch
# and in another terminal
jupyter lab --watch

Check and apply project style

jlpm lint

TODO

  • add tests
  • add Save as...
  • build bundle for nbviewer