{"id":13547009,"url":"https://github.com/blitzarx1/egui_graphs","last_synced_at":"2026-03-12T04:34:19.347Z","repository":{"id":152270143,"uuid":"620517607","full_name":"blitzarx1/egui_graphs","owner":"blitzarx1","description":"Interactive graph visualization widget for rust powered by egui and petgraph","archived":false,"fork":false,"pushed_at":"2026-02-26T20:23:32.000Z","size":1066,"stargazers_count":656,"open_issues_count":10,"forks_count":66,"subscribers_count":7,"default_branch":"main","last_synced_at":"2026-02-27T01:31:42.589Z","etag":null,"topics":["data-visualization","egui","graph-visualization","petgraph","rust","wasm"],"latest_commit_sha":null,"homepage":"https://blitzarx1.github.io/egui_graphs/#g=bipartite.json","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/blitzarx1.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-03-28T20:54:55.000Z","updated_at":"2026-02-26T20:23:36.000Z","dependencies_parsed_at":null,"dependency_job_id":"d62d59d4-10e0-414d-b7ed-469b4b80d163","html_url":"https://github.com/blitzarx1/egui_graphs","commit_stats":null,"previous_names":["blitzar-tech/egui_graphs","blitzarx1/egui_graphs"],"tags_count":79,"template":false,"template_full_name":null,"purl":"pkg:github/blitzarx1/egui_graphs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blitzarx1%2Fegui_graphs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blitzarx1%2Fegui_graphs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blitzarx1%2Fegui_graphs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blitzarx1%2Fegui_graphs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/blitzarx1","download_url":"https://codeload.github.com/blitzarx1/egui_graphs/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blitzarx1%2Fegui_graphs/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30415592,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-12T04:25:42.844Z","status":"ssl_error","status_checked_at":"2026-03-12T04:25:34.624Z","response_time":114,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["data-visualization","egui","graph-visualization","petgraph","rust","wasm"],"created_at":"2024-08-01T12:00:49.448Z","updated_at":"2026-03-12T04:34:19.329Z","avatar_url":"https://github.com/blitzarx1.png","language":"Rust","readme":"![build](https://github.com/blitzarx1/egui_graphs/actions/workflows/rust.yml/badge.svg)\n[![Crates.io](https://img.shields.io/crates/v/egui_graphs)](https://crates.io/crates/egui_graphs)\n[![docs.rs](https://img.shields.io/docsrs/egui_graphs)](https://docs.rs/egui_graphs)\n\n# egui_graphs\nGraph visualization with rust, [petgraph](https://github.com/petgraph/petgraph) and [egui](https://github.com/emilk/egui) in its DNA.\n\n![Screenshot 2023-04-28 at 23 14 38](https://user-images.githubusercontent.com/32969427/235233765-23b0673b-70e5-4138-9384-180804392dba.png)\n\nThe project implements a Widget for the egui framework, enabling easy visualization of interactive graphs in rust. The goal is to implement the very basic engine for graph visualization within egui, which can be easily extended and customized for your needs.\n\n- [x] Visualization of any complex graphs;\n- [x] Zooming and panning;\n- [x] Node and Edge labels;\n- [x] Node and edges interactions and events reporting: click, double click, select, drag;\n- [x] Style configuration via egui context styles;\n- [x] Dark/Light theme support via egui context styles;\n- [x] Events reporting to extend the graph functionality by the user handling them;\n- [x] Layots and custom layout mechanism;\n\n## Status\nThe project is on track for a stable release v1.0.0. For the moment, breaking releases are very possible.\n\nPlease use master branch for the latest updates. \n\nCheck the [demo example](https://github.com/blitzarx1/egui_graphs/tree/master/examples/demo) for the comprehensive overview of the widget possibilities.\n\n## Layouts\nIn addition to the basic graph display functionality, the project provides a layout mechanism to arrange the nodes in the graph. The `Layout` trait can be implemented by the library user allowing for custom layouts. The following layouts are coming from the box:\n- [x] Random layout;\n- [x] Hierarchical layout;\n- [ ] Force-directed layout; (coming soon)\n\n![Screenshot 2024-10-28 at 3 57 05 PM](https://github.com/user-attachments/assets/48614f43-4436-42eb-a238-af196d2044b4)\n\nCheck the [layouts example](https://github.com/blitzarx1/egui_graphs/blob/master/examples/layouts/src/main.rs).\n\n## Examples\n### Basic setup example\nThe source code of the following steps can be found in the [basic example](https://github.com/blitzarx1/egui_graphs/blob/master/examples/basic/src/main.rs).\n#### Step 1: Setting up the `BasicApp` struct. \nFirst, let's define the `BasicApp` struct that will hold the graph.\n```rust \npub struct BasicApp {\n    g: egui_graphs::Graph,\n}\n```\n\n#### Step 2: Implementing the `new()` function. \nNext, implement the `new()` function for the `BasicApp` struct.\n```rust\nimpl BasicApp {\n    fn new(_: \u0026eframe::CreationContext\u003c'_\u003e) -\u003e Self {\n        let g = generate_graph();\n        Self { g: egui_graphs::Graph::from(\u0026g) }\n    }\n}\n```\n\n#### Step 3: Generating the graph. \nCreate a helper function called `generate_graph()`. In this example, we create three nodes and three edges.\n```rust \nfn generate_graph() -\u003e petgraph::StableGraph\u003c(), ()\u003e {\n    let mut g = petgraph::StableGraph::new();\n\n    let a = g.add_node(());\n    let b = g.add_node(());\n    let c = g.add_node(());\n\n    g.add_edge(a, b, ());\n    g.add_edge(b, c, ());\n    g.add_edge(c, a, ());\n\n    g\n}\n```\n\n#### Step 4: Implementing the `eframe::App` trait. \nNow, lets implement the `eframe::App` trait for the `BasicApp`. In the `update()` function, we create a `egui::CentralPanel` and add the `egui_graphs::GraphView` widget to it.\n```rust \nimpl eframe::App for BasicApp {\n    fn update(\u0026mut self, ctx: \u0026egui::Context, _: \u0026mut eframe::Frame) {\n        egui::CentralPanel::default().show(ctx, |ui| {\n            ui.add(\u0026mut egui_graphs::GraphView::new(\u0026mut self.g));\n        });\n    }\n}\n```\n\n#### Step 5: Running the application. \nFinally, run the application using the `eframe::run_native()` function.\n```rust \nfn main() {\n    eframe::run_native(\n        \"egui_graphs_basic_demo\",\n        eframe::NativeOptions::default(),\n        Box::new(|cc| Ok(Box::new(BasicApp::new(cc)))),\n    )\n    .unwrap();\n}\n```\n\n![Screenshot 2023-10-14 at 23 49 49](https://github.com/blitzarx1/egui_graphs/assets/32969427/584b78de-bca3-421b-b003-9321fd3e1b13)\nYou can further customize the appearance and behavior of your graph by modifying the settings or adding more nodes and edges as needed.\n\n## Features\n### Events\nCan be enabled with `events` feature. Events describe a change made in graph whether it changed zoom level or node dragging. \n\nCombining this feature with custom node draw function allows to implement custom node behavior and drawing according to the events happening.\n","funding_links":[],"categories":["Libraries"],"sub_categories":["Data visualization"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblitzarx1%2Fegui_graphs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fblitzarx1%2Fegui_graphs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblitzarx1%2Fegui_graphs/lists"}