Expand description
Interactive HTML knowledge-graph visualization for Cognee-Rust.
This crate ports the Python cognee_network_visualization module to Rust.
It renders all nodes + edges of a GraphDBTrait into a single self-contained
HTML file that uses d3.js v7 for force-directed layout and Canvas rendering.
§Quick start
use cognee_graph::GraphDBTrait;
use cognee_visualization::visualize;
use std::path::Path;
// Write the visualization to a caller-specified file.
let _path = visualize(graph_db, Some(Path::new("/tmp/graph.html"))).await?;
// Or write it to `~/graph_visualization.html` (matches Python behavior).
let _path = visualize(graph_db, None).await?;Enums§
- Visualization
Error - Errors that can occur while generating an HTML graph visualization.
Functions§
- render
- Render the HTML visualization string for the supplied graph database, without writing it anywhere.
- render_
multi_ user - Render a combined HTML visualization aggregating multiple
(user_label, graph_db)pairs into one output. - visualize
- Generate an interactive HTML knowledge-graph visualization of the supplied graph database.