Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

dash_interactive_graphviz

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dash_interactive_graphviz

An interactive graphviz viewer for Dash

  • 0.1.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
42
increased by40%
Maintainers
1
Weekly downloads
 
Created
Source

Dash Interactive Graphviz

Dash Interactive Graphviz renders the graphviz or dot language in a a dash component.

Graphviz is open source graph visualization software. Graph visualization is a way of representing structural information as diagrams of abstract graphs and networks. It has important applications in networking, bioinformatics, software engineering, database and web design, machine learning, and in visual interfaces for other technical domains.

It supports:

  • Displaying graphviz sources as a graph
  • Rendering is fully client side
  • Zooming and Panning around the graph (With a reset)
  • Selecting nodes
  • Animation between different graphs

Usage

You can install with pip (or anything else)

pip install dash_interactive_graphviz

Usage is simple, below shows how to instantiate the component on its own.

import dash_interactive_graphviz

dot_source = """
digraph  {
  node[style="filled"]
  a ->b->d
  a->c->d
}
"""

dash_interactive_graphviz.DashInteractiveGraphviz(
    id="graph",
    dot_source=dot_source
)

When a node is clicked the selected property will change, this allows you to change elements of your Dash app when a node is selected. For example:

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

Often you may want to update the dot_source based on the selected node. This is supported by Dash. You can see a more complex example in usage.py.

Behaviour

The following behaviors are enabled:

  • When the dot_source is changed the graph will smoothly animate between the two states.
  • You can click and drag the graph around
  • You can zoom in and out with the scroll wheel
  • You can reset the graph position and zoom by clicking the reset icon in teh top right corner
  • The graph pane will size to whet ever it's parents size is, the graph will re-render but the re-render is debounced so as not to overload the browser.
  • You can select a node which will fire an update to any dash callbacks that are connected.

FAQs

Package last updated on 29 Jan 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc