#graphviz #web-components #dot #dot-ix #graphs

dot_ix_web_components

Web components provided by the dot_ix library

14 releases (9 breaking)

Uses new Rust 2024

0.10.0 Apr 18, 2025
0.9.2 Jan 26, 2025
0.9.0 Dec 15, 2024
0.8.1 Sep 27, 2024
0.5.0 Mar 30, 2024

#622 in Visualization

Download history 7/week @ 2025-02-09 42/week @ 2025-02-16 10/week @ 2025-02-23 5/week @ 2025-03-02 9/week @ 2025-03-09 21/week @ 2025-03-16 49/week @ 2025-03-23 123/week @ 2025-03-30 19/week @ 2025-04-06 274/week @ 2025-04-13 53/week @ 2025-04-20 16/week @ 2025-04-27 14/week @ 2025-05-04 48/week @ 2025-05-11 3/week @ 2025-05-18 4/week @ 2025-05-25

69 downloads per month
Used in 11 crates (via dot_ix)

MIT/Apache

365KB
4K SLoC

✒️ dot_ix

Crates.io docs.rs CI Coverage Status

🚧 This is very much a work in progress

Try it yourself: (demo_1, demo_2)

Example

Original Concept

https://user-images.githubusercontent.com/2993230/253878816-0729970f-651f-45ef-a986-470f383b8018.mp4

Usage

Add the following to Cargo.toml

dot_ix = "0.10.0"

# Enables the `FlexDiag` web component.
dot_ix = { version = "0.10.0", features = ["flex_diag"] }

Development

cargo install cargo-leptos

# Then, one of:
# * client side rendering -- uses WASM compiled graphviz to generate the graph.
cargo leptos watch

To Do

🦜 Feel free to do any of these -- this project isn't my main focus, but I should be responsive in reviewing / merging things.

  • Split crate into multiple subcrates.
  • Split app::info_graph::InfoGraph into smaller components.
  • Get rid of main.scss and replace with tailwind classes.
  • Inline styles in SVG.
  • Inline font in SVG styles.
  • Change rt/into_graphviz_dot_src/info_graph.rs to write to a buffer, instead of individual strings.
  • Take each node with a "type".
  • Take in tailwindcss classes to attach to node types.
  • Take in theme / merge with default theme.
  • Split dot_ix library from the web app, so it can be embedded in other apps.
  • GitHub Actions / automated testing / releasing / publishing.
  • Playground: Render pre-written graphs
    • Graph in URL
    • Link to gist

Dependencies

~23–39MB
~660K SLoC