Black Lives Matter. Please consider donating to Black Girls Code today.

An Interactive Graphviz Widget

Just as an FYI to the community I have built an interactive Graphviz viewer for dash. You can see it at It uses viz.js (via d3-graphviz) on the client side to do the layout and will animate between states, while rendering pretty much the entire language (great thanks to the d3-graphviz maintainers).

Usage is reasonably straight forward

import dash_interactive_graphviz

dot_source = """
digraph  {
  a ->b->d


It also exposes a selected property which will change when you click on a node.

    Output( ..., ...),
    [Input('graph', 'selected')]
def change_my_view(selected):
    # Do something with selected

This allows you to alter the rendering to say highlight the selected node, but importantly the behaviour is all up to you in lovely python code.

The widget itself allows for zooming and panning, as well as a reset button.

I have always found Graphviz to be extremely useful, I hope someone else finds this useful.


Hi @jhsaunders the github link you sent does not work, is the repo public?

AHHH!! Sorry I had left ii private. I have made it public now, here is the link again:

This is great stuff, thanks for sharing @jhsaunders!